Installed LibreOffice_24.8.0_Win_x86-64.msi on a long in use Windows 10 PC. Large spreadsheet in use for years now crashes instantly when using Calc solver. Solver is set up, option "non-negative variables" selected then solve clicked; insta crash LO. Small solver window remains up and will not go away without Windows forcing it closed. NB Solver works as per usual with Calc in 7.6.7. Solver used is SCO. In Safe Mode... SCO always crashes as per above, but DEPS does not crash. Once DEPS has run OK, SCO now works.... is SCO using an uninitialised variable which DEPS sets correctly?
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided. (Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Investigating this and editing to create a smaller sample file - the new file does not crash. But that saving was using the new/present LO version. The original S/S still crashes with SCO; have refined the conditions such that opening and immediately selecting/using DEPS solver - does not crash. Saving the file now (using the present LO version) on re-opening the saved file SCO does not crash. Something has changed in the data written to file with the two LO versions. Suspect that the present/new version saves internal solver data-states differently to 7.6.7, hence the initial crash (data block format has changed). However once the file is opened and DEPS solver used, saving writes the new format to file and crashing is gone as a symptom. The only way I can create a small, releasable test file is to reload the old LO - but alas I'm not a dev and my time is on other things. Suggest a workaround - Open solver in DEPS, save, then do what you like.
(In reply to brodders from comment #2) > Suspect that the present/new version saves internal solver data-states > differently to 7.6.7, hence the initial crash (data block format has > changed). However once the file is opened and DEPS solver used, saving > writes the new format to file and crashing is gone as a symptom. Indeed there was a change on how solver settings are saved to the file. Which is why it would be valuable to get a file where the crash happens, so we can fix it. I could not reproduce on my machine... it's possibly some edge case.
Created attachment 196213 [details] Trimmed down test Spreadsheet - made by 7.6.2
This file is from LO Calc 7.6.2, crashes when using SCO solver in 24.8.0.3 1. Select PZX_Master sheet 2. Menu selection: Solver > Options > SCO Evolutionary and check Assume Non-Negative Variables 3. OK and Solve CRASH However if DEPS solver used, will not crash out of the box. Saving always fixes things.
Comment on attachment 196213 [details] Trimmed down test Spreadsheet - made by 7.6.2 This file is from LO Calc 7.6.2, crashes when using SCO solver in 24.8.0.3 1. Select PZX_Master sheet 2. Menu selection: Solver > Options > SCO Evolutionary and check Assume Non-Negative Variables 3. OK and Solve CRASH However if DEPS solver used, will not crash out of the box. Saving always fixes things.
[Automated Action] NeedInfo-To-Unconfirmed
Thanks for the sample file. I can now reproduce the crash in: Version: 24.2.5.2 (X86_64) / LibreOffice Community Build ID: 420(Build:2) CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Ubuntu package version: 4:24.2.5-0ubuntu0.24.04.2 Calc: threaded
So the problem is that your file does not contain the solver engine settings, then the LibrarySize parameter is read as zero and then it causes the solver to crash (since this parameter can't be zero). The saving of SCO/DEPS parameters to the file started with LO 24.2 (which is why you did not have them saved). So there are 2 things here: 1) We need to catch exceptions by the solver engine (since they can fail unexpectedly as in this case) 2) If a certain engine setting does not exist in the file, we should use its default value (instead of zero) Patch incoming.
Proposed patch here https://gerrit.libreoffice.org/c/core/+/172955
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/57ecae2843c80d67ab9a3aaaf004fe131c4f13ae tdf#162760 Fix solver crashing with unset parameters It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.