Bug 100545 - Calc 5.0.6 crashes with file made in Calc 4
Summary: Calc 5.0.6 crashes with file made in Calc 4
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.6.3 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: OpenCL
  Show dependency treegraph
 
Reported: 2016-06-22 12:50 UTC by M
Modified: 2016-07-19 05:30 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
log file (32.07 KB, text/plain)
2016-06-22 15:26 UTC, M
Details
backtrace for master~2016-06-21_01.16.33_LibreOfficeDev_5.3.0.0.alpha0_Win_x86.msi (6.53 KB, text/plain)
2016-06-26 12:30 UTC, M
Details
SAL_LOG=+INFO.vcl.opengl+WARN (30.81 KB, text/plain)
2016-06-27 13:24 UTC, M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M 2016-06-22 12:50:28 UTC
I have a file that crashes calc each time. 

It can be opened, but attempt to view certain sheets (here 2nd sheet) goes straight to "unexpected error" / "document recovery"

I do not know what in the file causes the issue. (I do not know of any steps to get more info).

I am happy to provide the file, but do not whish for it to go public. (It is ok, if shared between some of the developers).
Comment 1 M 2016-06-22 15:26:38 UTC
Created attachment 125840 [details]
log file

Also happens with 5.1.3 (crash on open, no need to switch to tab)

And with master~2016-06-21_01.16.33_LibreOfficeDev_5.3.0.0.alpha0_Win_x86

logfile attached
Comment 2 Buovjaga 2016-06-25 19:17:51 UTC
Do you have OpenCL enabled?
Do you have OpenGL enabled?

Here is how to get a backtrace: https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg

For the backtrace it might be best to use http://dev-builds.libreoffice.org/daily/master/win-x86@39/current/

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 3 M 2016-06-26 12:14:06 UTC
OpenCL is/was enabled.
That is OpenCL in the "LibreOfficeDev/OpenCL" node of the options tree.
OpenCL in the "LibreOfficeDev Calc/Formula" node is disabled.

Disabling OpenCL prevents the crash.

Disabling "Allow use of Software Interpreter" (when OpenCl is enabled) changes the time of the crash. Instead of occurring when opening the document, it will then crash when switching to the problematic sheet in the document. 

Enabling/Disabling "Allow use of Software Interpreter" when OpenCl is disabled is fine (no crash in either case)


OpenGl is disabled (despite being checked)
Comment 4 Buovjaga 2016-06-26 12:19:28 UTC
Thanks. You could try getting a backtrace of the crash with OpenCL enabled.
Otherwise the file would be nice to have.. if you could anonymize it and still make it crash, it would be good.
Comment 5 M 2016-06-26 12:30:55 UTC
Created attachment 125921 [details]
backtrace for master~2016-06-21_01.16.33_LibreOfficeDev_5.3.0.0.alpha0_Win_x86.msi

added backtrace

for master~2016-06-21_01.16.33_LibreOfficeDev_5.3.0.0.alpha0_Win_x86.msi
Comment 6 M 2016-06-26 12:38:30 UTC
I can send the file by private email.

There is no IP (or other legal binding) issue that requires any attention.

As I said I have no issue if the file becomes available to a few individuals, but I do not wish to publish it to everyone.
Comment 7 Aron Budea 2016-06-27 03:38:34 UTC
Thanks for the trace. Could you also attach 'cache/opencl_devices.log' from 5.3.0.0.alpha0's user profile?


Adding Tomaz to CC. Since it crashes in a clGetExtensionFunctionAddress() call, could it be an extension not supported by the device?
Comment 8 How can I remove my account? 2016-06-27 06:34:55 UTC
Aron, the very point of the function clGetExtensionFunctionAddress() is to figure out whether some OpenCL extension function is unsupported. Besides, I doubt the backtrace is based on real debug information from the OpenCL and amdocl modules (system DLLs), but just exported symbols. OpenCL!clGetExtensionFunctionAddress+0x877 means 0x877 bytes after the exported clGetExtensionFunctionAddress, which is quite far and might quite well be in some totally unrelated, internal, function in the OpenCL module. Unfortunately the stack trace does not show anything inside LibreOffice.

M, yes, the problematic file would be essential to figure out what is going on.

M, please provide also a log file produced with SAL_LOG=+INFO.opencl+INFO.sc.opencl+WARN .
Comment 9 Buovjaga 2016-06-27 08:25:46 UTC
(In reply to Tor Lillqvist from comment #8)
> M, please provide also a log file produced with
> SAL_LOG=+INFO.opencl+INFO.sc.opencl+WARN .

Detailed instructions: https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#Windows:_how_to_get_OpenCL_debug_output
Comment 10 M 2016-06-27 13:24:26 UTC
Created attachment 125944 [details]
SAL_LOG=+INFO.vcl.opengl+WARN

New logfile.

As far as I can tell, not much more info. (But echo $SAL_LOG% shows the env was set.

this is still based on master~2016-06-21_01.16.33_LibreOfficeDev_5.3.0.0.alpha0_Win_x86.msi
If it is important to use an even newer version (todays) then please let me know.

I send info about the ods file in private. (to Tor)
Comment 11 M 2016-06-27 13:29:15 UTC
(In reply to Aron Budea from comment #7)
> Thanks for the trace. Could you also attach 'cache/opencl_devices.log' from
> 5.3.0.0.alpha0's user profile?

The cache folder only contains an opengl_device.log 
Folder is 
C:\Users\martin\AppData\Roaming\LibreOfficeDev\4\cache

Not sure why there is a "4" in the path.
Comment 12 How can I remove my account? 2016-06-27 13:38:56 UTC
Did you turn use of OpenCL (and use of the "software interpreter") back on before producing the log file?
Comment 13 M 2016-06-27 13:45:01 UTC
They were both checked (already checked when starting calc, so no restart needed).

And I got the crash when producing the log. (I then discarded the recovery info, and quit the restarted office)
Comment 14 M 2016-06-27 13:51:58 UTC
(In reply to M from comment #11)
> (In reply to Aron Budea from comment #7)
> > Thanks for the trace. Could you also attach 'cache/opencl_devices.log' from
> > 5.3.0.0.alpha0's user profile?
> 
> The cache folder only contains an opengl_device.log 

In case its needed, I found the opencl.dll in my windows folder

File Version 1.2.1.0
Product Version 1.2.1.0
Comment 15 Michael Meeks 2016-07-14 13:15:15 UTC
Hi there, we've implemented new code to test and validate the OpenCL implementation on first start and/or driver / version change - if this fails we disable OpenCL - which should avoid your apparent driver problem here from biting you in future.

If you can re-validate using a 5.1.5.1 build or a new 5.2.x snapshot built yesterday or today, and see if the problem recurs - that would be extremely helpful.

Thanks =)
Comment 16 M 2016-07-15 20:15:52 UTC
Testing with libo-master~2016-07-14_23.42.51_LibreOfficeDev_5.3.0.0.alpha0_Win_x86
from http://dev-builds.libreoffice.org/daily/master/Win-x86@42/2016-07-14_23.42.51/

from the "About":

Version: 5.3.0.0.alpha0+
Build ID: fc305bb6d656736bedc2f89789e18d8c9a3bbf2c
CPU Threads: 2; OS Version: Windows 6.0; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-07-14_23:42:51
Locale: en-GB (en_GB); Calc: group

-----------------------
I can no longer enable the "Allow use of OpenCL".

It says on the "OpenCl" tab: "OpenCl is not used"
And there are no listboxes or grids for opencl black/whitelist (I saw them in the released version, not sure if they exists in 5.3 at all).

However:

If I check the "Allow use of OpenCL" checkbox (which it lets me do), then I get as expected the message that I need to restart libre office.

I close calc.
I click the calc shortcut in the start menu (I always use the shortcut directly to calc).
The splash screen appears for a brief moment, and then nothing happens.
If I click the calc shortcut again, then it starts. (and the checkbox is NOT set)

If I did not try to enable the opencl, then it always starts right away.
Comment 17 Buovjaga 2016-07-16 06:19:11 UTC
Apparently Michael forgot to add himself to CC, so adding. Michael: see previous comment.
Comment 18 Michael Meeks 2016-07-16 07:02:33 UTC
Buovjaga - thanks for the CC 1 =)

M -> great news =) the behaviour you describe - of catching the broken CL driver on startup, and crashing / restarting there - while turning OpenCL off:

"I can no longer enable the "Allow use of OpenCL"." <with a crashy driver>

is exactly what we want. Can you confirm that other than this all is well, and your spreadsheets re-calculate nicely etc. ? =)

Unfortunately it is hard for us to fix your broken OCL driver - that is not our bug - but I'll mark this as FIXED anyhow.

Ideally for master we'd also add some details / user-readable warning when the CL driver causes a crash so the user can understand / take action.

Thanks !
Comment 19 M 2016-07-16 13:44:52 UTC
It seems to work fine, yes.



I understand that when the option is enabled, and the driver not working, then calc must be restarted.

Unfortunately it just closes.

This is really bad user experience.

The option was on after installation.
So when I first started calc, I saw the flash screen, and then it disappeared and nothing.

I had to start it a 2nd time myself.

So there either is no restart, or the restart crashes.


IMHO it should restart itself. Or it should display a dialog, that explains you have to start it again.

The way it currently is, if it just disappears, it looks like the install is broken.

I set it back to unconfirmed, because I think the fix should be improved as described.
(I confirm however that the initial described crash is fixed)
Comment 20 Michael Meeks 2016-07-16 16:02:07 UTC
Fair enough feedback - but please open a new, and more descriptive bug with a sensible title to describe this new problem =) also please CC me and/or make it block bug#97391.

Thanks !