-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BellNumber java.lang.OutOfMemoryError: Java heap space #262
Comments
:-) Thanks! |
Depending on the system configuration - OutOfMemoryError can happen everywhere ... So I will try to catch it at the very beginning, not just to handle bell number. I will deal with tomorrow :-) |
That is true. Until now I did not find other functions where a short and fast input is enough to run into a OutOfMemoryError (on a default mem. config), but it would be better to catch it on a broader scale. |
Should work now :-) |
Dear @SyrasX - can you contact me on email |
MathParser.org-mXparser version: v.5.0.5
Framework: java
A big value n for the BellNumber Bell(n) leads to an OutOfMemoryError.
Log:
[mXparser-v.5.0.5]
[][Bell(9999999999999)]
[][Bell(9999999999999)] Starting ...
[][Bell(9999999999999)] Starting calculation loop
[][Bell(9999999999999)] Parsing (1, 5) ---> ( 999999.0 * 9999999.0 ) ... ---> Bell ( 9.999989000001E12 ) ... done
[][Bell(9999999999999)] Parsing (1, 3) ---> ( 9.999989000001E12 ) ... ---> Bell 9.999989000001E12 ... done
[][Bell(9999999999999)] Parsing (0, 1) ---> Bell 9.999989000001E12 ... Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at org.mariuszgromada.math.mxparser.mathcollection.MathFunctions.bellNumber(MathFunctions.java:300)
at org.mariuszgromada.math.mxparser.mathcollection.MathFunctions.bellNumber(MathFunctions.java:328)
at org.mariuszgromada.math.mxparser.Expression.BELL_NUMBER(Expression.java:3558)
at org.mariuszgromada.math.mxparser.Expression.f1ArgCalc(Expression.java:6373)
at org.mariuszgromada.math.mxparser.Expression.calculate(Expression.java:6179)
at org.mariuszgromada.math.mxparser.Expression.calculate(Expression.java:5666)
at Tester.callApi(Tester.java:11)
at Tester.main(Tester.java:17)
I tried other java algorithms found on the web but they also had the same result. So probably should just catch the Exception.
The text was updated successfully, but these errors were encountered: