question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: overflow_error with ibeta_derivative not throwing an exception

See original GitHub issue

Describe your issue.

Similar to https://github.com/scipy/scipy/issues/14606, I’m getting a boost overflow error. Unfortunaterly the bug is quite hard to pinpoint as the codebase I’m working on is big and complex (and believe me, I tried). See below for the error message.

Reproducing Code Example

I’m running scipy 1.8.0.dev0+1704.ff34402 installed from Anaconda’s pypi repo (https://anaconda.org/scipy-wheels-nightly/scipy). I installed the nightly. I believe the version of Scipy I’m running should contain https://github.com/scipy/scipy/pull/14618.

I knew it was a long shot, but I had hoped this version would wrap the boost error into a Python exception. No luck there, it looks like overflow_error is not caught.

I confirm that I also get this error with scipy 1.7.0 and 1.7.1, but not with versions <1.7.0 (so before boost libraries were vendored by scipy).

Error message

terminate called after throwing an instance of 'boost::wrapexcept<std::overflow_error>'
  what():  Error in function ibeta_derivative<double>(double,double,double): Overflow Error

SciPy/NumPy/Python version information

1.8.0.dev0+1704.ff34402 1.19.4 sys.version_info(major=3, minor=8, micro=11, releaselevel='final', serial=0)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
mckib2commented, Sep 9, 2021

Yes, I can look at this in the next few days. Even without a reproducer we can at least get a fix in and hopefully you can help us track down the offending distribution once it’s caught

1reaction
mckib2commented, Oct 9, 2021

Apologies for the delay in getting this fix ready. @JPFrancoia can you pull the fix and see if it raises the exception correctly in your program?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python OverflowError | Working of Overflow Error in ...
So to handle this we have to raise overflowError exception. This exception in hierarchal found in order is BaseException, Exception, ArithmeticError, ...
Read more >
python - is OverflowError actually raised?
exception OverflowError Raised when the result of an arithmetic operation is too large to be represented. This cannot occur for long integers ( ......
Read more >
OverflowError Exception in Python
An OverflowError exception is raised when an arithmetic operation exceeds the limits to be represented. This is part of the ArithmeticError ...
Read more >
std::overflow_error
Defines a type of object to be thrown as exception. It can be used to report arithmetic overflow errors (that is, situations where...
Read more >
1161097 – backtrace with bogus PC : Python Exception ...
Description of problem: I've got a libreoffice core I was trying to examine in gdb, but 'bt full' and where are showing: (gdb)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found