Bug 43388 - Crash (Runtime error) when using SCO (or DEPS) Evolutionary Algorithm Solver
Summary: Crash (Runtime error) when using SCO (or DEPS) Evolutionary Algorithm Solver
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:6.2.0 target:6.1.0.1 target:6.0.6
Keywords:
Depends on:
Blocks: Solver
  Show dependency treegraph
 
Reported: 2011-11-30 10:37 UTC by alexander.buchner
Modified: 2018-07-05 14:59 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file for crash (7.68 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-11-30 10:37 UTC, alexander.buchner
Details
bt + console logs on master (8.21 KB, text/plain)
2013-01-06 18:26 UTC, Julien Nabet
Details
Fatal Error - NullPointerException (38.08 KB, image/png)
2014-02-12 22:23 UTC, alexander.buchner
Details
Result in 5.3.0.0_alpha (34.93 KB, image/png)
2016-09-17 12:41 UTC, alexander.buchner
Details
Screenshot of error message in LibreOffice 5.4 (17.81 KB, image/png)
2017-09-29 10:01 UTC, alexander.buchner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alexander.buchner 2011-11-30 10:37:23 UTC
Created attachment 53981 [details]
Example file for crash

I just noticed an error when using the solver module in calc. I will attach an example file.

In this file, go Tools, Solver.

- Target cell is $B$1.
- Optimize result to Minimum
- By changing cells $A$1:$A$2
- Limiting conditions: $A$3 should be Integer

Then hit "Solve" and calc crashes:

Microsoft Visual C++ Runtime Library

Runtime Error!

Program: C:\Program Files (x86)\LibreOffice 3.4\program\soffice.bin

This application has requested the Runtime to terminate it in an unusual
way. Please contact the application's support team for more information.
Comment 1 Rainer Bielefeld Retired 2011-11-30 22:04:01 UTC
[Reproducible] with reporter's sample and "LibreOffice 3.4.4  - WIN7 Home Premium (64bit) German UI [OOO340m1 (Build:402)]". LibO Linear solver will not crash.

Error Message is: "Microsoft Visual C++ Runtime Library
Runtime Error
Program C:\.....\soffice.bin
This applicaton has requested the runtime to terminate it in an unusúal way. Please contact the application's support team for more information.

Not a regression, 3.3.3 also crashes.

Bug of feature? Master only has the "Linear solver" what will not crash

@David: 
Help and Documentation might be affected.

LibreOffice 3 Calc Guide:
"The default solver supports only linear equations. For nonlinear programming
requirements, try the EuroOffice Solver or Sun’s Solver for Nonlinear Programming
[Beta]. Both are available from the LibreOffice extensions repository."

For 3.4.4 that's not correct, "SCO Evolutionary Algorithm Solver" and "DEPS Evolutionary Algorithm Solver" indeed are Extensions, but they are in the installation bundle and can not be removed.

For 3.5 those 2 Solvers no longer are in the installation bundle, but they are not available from <http://extensions.libreoffice.org/>.

@Kohei:
Please feel free to reassign (or reset Assignee to default) if it’s not your area or if provided information is not sufficient. Please set Status to ASSIGNED if you accept this Bug.
Comment 2 Rainer Bielefeld Retired 2011-11-30 22:25:30 UTC
BTW: it seems that the crashing solver is the default one (at least for me with my LibO version).
Comment 3 Rainer Bielefeld Retired 2011-12-01 01:52:54 UTC
Concerning Solver versions in installation package:
Server installation of  Master "LibO-dev 3.5.0 – WIN7 Home Premium (64bit) GERMAN UI [Build ID: 130028f-b211287-090bcba-45cf606-05891e7]" Win-x86@9-Voreppe  - 111130) contains "Solver for Nonlinear Programming 0.9", can be used after activatin "Experimental functions".  
Reintroduced or difference between the builds?

A.M. LibO Master version also shows the crash
Comment 4 Rainer Bielefeld Retired 2011-12-01 01:57:20 UTC
Works with Server installation of  Master "LibO-dev 3.5.0 – WIN7 Home Premium (64bit) GERMAN UI [Build ID: 130028f-b211287-090bcba-45cf606-05891e7]" Win-x86@9-Voreppe  - 111130)

Bug gone or build specific?
Comment 5 Rainer Bielefeld Retired 2011-12-01 02:00:05 UTC
Please ignore Comment 4 - wrong Bug!
Comment 6 Julien Nabet 2013-01-06 18:26:09 UTC
Created attachment 72592 [details]
bt + console logs on master

On pc Debian x86-64 with master sources updated today, I reproduced the crash.

I attached console logs + bt
Comment 7 alexander.buchner 2014-02-12 22:21:32 UTC
In Version 4.2.0.4 the error message changed to a NullPointerExeption.
Comment 8 alexander.buchner 2014-02-12 22:23:40 UTC
Created attachment 93968 [details]
Fatal Error - NullPointerException
Comment 9 Joel Madero 2015-05-02 15:43:17 UTC Comment hidden (obsolete)
Comment 10 Julien Nabet 2015-05-24 17:19:11 UTC
On pc Debian x86-64 with master sources updated today, I still reproduce the error:
[jni_uno bridge error] UNO calling Java method solve: non-UNO exception occurred: java.lang.NullPointerException
java stack trace:
java.lang.NullPointerException
	at net.adaptivebox.encode.EvalStruct.evaluate(EvalStruct.java:44)
	at net.adaptivebox.problem.ProblemEncoder.evaluate(ProblemEncoder.java:96)
	at net.adaptivebox.problem.ProblemEncoder.getEncodedSearchPoint(ProblemEncoder.java:84)
	at net.adaptivebox.knowledge.Library.<init>(Library.java:38)
	at com.sun.star.comp.Calc.NLPSolver.BaseEvolutionarySolver.initializeSolve(BaseEvolutionarySolver.java:298)
	at com.sun.star.comp.Calc.NLPSolver.DEPSSolverImpl.solve(DEPSSolverImpl.java:119)
Comment 11 alexander.buchner 2015-06-05 13:42:44 UTC
This bug is still there.

Version: 4.4.3.2, Windows 7.
Comment 12 Joel Madero 2016-09-17 03:58:21 UTC
Version: 5.3.0.0.alpha0+
Build ID: d9cff00683d31fbd4b3c4c2d6afbe164f4a85d47
CPU Threads: 2; OS Version: Linux 3.16; UI Render: default; 
Locale: en-US (en_US.UTF-8); Calc: group

I get "Invalid Input" not a crash.

Can you test again with 5.3 and if it's the same result as I'm getting close this bug as WORKSFORME. Thanks
Comment 13 alexander.buchner 2016-09-17 11:52:45 UTC
Where can I get Version 5.3.0.0.alpha0+?

"Invalid Input" is better than a crash, but I don't see why the input should be invalid. This optimization problem is unbounded. Perhaps the message should simply say this if this is the problem.
Comment 14 Julien Nabet 2016-09-17 12:00:04 UTC
(In reply to alexander.buchner from comment #13)
> Where can I get Version 5.3.0.0.alpha0+?
> ...
See http://dev-builds.libreoffice.org/daily/master/
Comment 15 alexander.buchner 2016-09-17 12:40:00 UTC
My result for
Version: 5.3.0.0.alpha0+
Build ID: 8697d18f717c75ddeedfe08161091da71007b859
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-09-15_02:55:18
Locale: de-DE (de_DE); Calc: group

is shown in the attachment 5.3.0.0_alpha.png

So there is no crash but the result is just wrong. It seems that the constraint "Integer" is interpreted as "non-negative Integer".
Comment 16 alexander.buchner 2016-09-17 12:41:03 UTC
Created attachment 127378 [details]
Result in 5.3.0.0_alpha
Comment 17 Xisco Faulí 2017-09-29 08:51:55 UTC Comment hidden (obsolete)
Comment 18 alexander.buchner 2017-09-29 10:01:02 UTC
This is bug is still present in Version: 5.4.1.2 (x64)
Build ID: ea7cb86e6eeb2bf3a5af73a8f7777ac570321527 on Windows 10.

I'll attach a screenshot of the errormessage.
Comment 19 alexander.buchner 2017-09-29 10:01:42 UTC
Created attachment 136611 [details]
Screenshot of error message in LibreOffice 5.4
Comment 20 Julien Nabet 2018-06-24 19:55:55 UTC
Just for information, I submitted a patch on gerrit
https://gerrit.libreoffice.org/#/c/56359/

I noticed there was a crash too when choosing BINARY

If someone wants to give it a try...
Comment 21 Commit Notification 2018-06-26 05:52:36 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=02a66f29fec36aed5fb1e800a08c1390d3674b59

tdf#43388: add missing info for Evolutionary Algorithm Solver

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2018-07-02 10:36:54 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b8fc43af43626c3895033063d10eb547f64c01d0&h=libreoffice-6-1

tdf#43388: add missing info for Evolutionary Algorithm Solver

It will be available in 6.1.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Julien Nabet 2018-07-02 12:34:15 UTC
For 6.0, the patch is waiting for review here:
https://gerrit.libreoffice.org/#/c/56435/
Comment 24 Commit Notification 2018-07-05 14:59:50 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=12e092b414208ba4342f20fe190681d73d9c6ff9&h=libreoffice-6-0

tdf#43388: add missing info for Evolutionary Algorithm Solver

It will be available in 6.0.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.