Bug 98515 - File created with Libreoffice 4 does not open (OpenCL)
Summary: File created with Libreoffice 4 does not open (OpenCL)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Jan Holesovsky
URL:
Whiteboard: target:5.3.0 target:5.2.0.2 target:5.1.5
Keywords: perf
Depends on:
Blocks: OpenCL
  Show dependency treegraph
 
Reported: 2016-03-08 07:38 UTC by Stefan
Modified: 2016-10-25 18:38 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
This file does not open with LO 5, but works fine on LO 4 (386.40 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-03-08 07:38 UTC, Stefan
Details
sc_opencl_device_profile.dat (383 bytes, text/plain)
2016-03-15 07:34 UTC, Stefan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan 2016-03-08 07:38:51 UTC
Created attachment 123398 [details]
This file does not open with LO 5, but works fine on LO 4

I created a file with LO 4.4. now I upgraded to LO 5 and when I try to open it, LO freezes, while opening with the old version on another PC still works.
Comment 1 raal 2016-03-08 13:14:13 UTC
I can open file with  5.1.0.3, win7. For the test, could you rename your LibreOffice directory profile (see https://wiki.documentfoundation.org/UserProfile) and give it a new try?
Comment 2 Buovjaga 2016-03-10 13:02:18 UTC
Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 3 Stefan 2016-03-11 06:43:18 UTC
Renaming the libreoffice directory did not help. Now I tried to remove 5.1.0 and installed 4.5 on this PC, but it doesn't open the file either. So I guess ther are some other settings on this PC preventing it from opening the file. Any other ideas?
Comment 4 Buovjaga 2016-03-11 08:17:10 UTC
Document has macros, I wonder if it is related to that. Opens fine here, though.

Yet, 5.1.0 had quite some problems on Windows, so you should try 5.1.1, which was released yesterday.

64-bit, KDE Plasma 5
Build ID: 5.1.0.3 Arch Linux build-1
CPU Threads: 8; OS Version: Linux 4.4; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Comment 5 raal 2016-03-11 08:51:53 UTC
(In reply to Stefan from comment #3)
> Renaming the libreoffice directory did not help. Now I tried to remove 5.1.0
> and installed 4.5 on this PC, but it doesn't open the file either. So I
> guess ther are some other settings on this PC preventing it from opening the
> file. Any other ideas?

Please try to disable openCL .
Tools - Options - openCL

Attach error message.
Comment 6 Stefan 2016-03-11 09:33:24 UTC
Nope... no difference with 5.1.1.
Comment 7 Stefan 2016-03-11 09:37:11 UTC
Thats it... disabling OpenCL works. Thank you!
Comment 8 Buovjaga 2016-03-13 12:15:10 UTC
Stefan: can you give us this file:
C:\Users\User\AppData\Roaming\LibreOffice\4\cache\sc_opencl_device_profile.dat
Comment 9 gga 2016-03-14 19:15:57 UTC
I can confirm this problem too (and the similar bug 97915).
I post in this one because my ods file is older than LibreOffice 5.0.
The file is OK with LO 5.0.4, but not OK with the 5.1.0 and 5.1.1 all in x64 version.
Attempt to make a backtrace gives me the same "Symbol file could not be found" as Edgar Steimel in the other bug report.
And turning OFF OpenCL does the trick.
One more thing, I've no sc_opencl_device_profile.dat file in my user directory even if I turn ON OpenCL and open an ods file that opens correctly => It's another important thing, the problem is not for all my ods files.
Comment 10 Stefan 2016-03-15 07:34:52 UTC
Created attachment 123585 [details]
sc_opencl_device_profile.dat

here is my sc_opencl_device_profile.dat
Comment 11 Buovjaga 2016-03-16 12:23:36 UTC
I guess this is NEW per comment 9..
Comment 12 Aron Budea 2016-06-22 04:09:25 UTC
I checked the attached document with OpenCL enabled in several versions (5.1.3.2, 5.2 beta2, debug build from master branch), and it doesn't freeze, but loads extremely slowly: in ~2:30 - 3 mins.

Stefan, gga, can you test if it's the case with your files as well?

Note: it's also quick if only OpenCL Software Interpreter is enabled (loads in a few seconds).

Note 2: for me it didn't finish loading in 5 mins in 4.4.0.3, might be frozen.
Comment 13 Tor Lillqvist 2016-06-23 17:47:58 UTC
Ouch. The OpenCL (source) code generated for the one formula group in the sample document is very pathological, it has functions with almost a thousand parameters. Also the actual kernel has that many parameters. Not surprisingly the compilation of the OpenCL program fails. Obviously the OpenCL generating code needs some more sanity checks.

But as such that is not a problem, the code will fall back to the traditional code path (or the software interpreter, if the formula in question is a such for which that is tried). Need to investigate further.
Comment 14 Tor Lillqvist 2016-06-27 08:47:26 UTC
It takes quite a long time for me to open, too (I did not bother timing, just did other things and checked after a while), but does open eventually. Maybe five minutes? Stefan, how long did you wait?
Comment 15 Commit Notification 2016-06-27 10:22:44 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "master":

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

tdf#98515: Bail out early if kernel would have ridiculously many parameters

It will be available in 5.3.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 16 Tor Lillqvist 2016-06-27 12:08:07 UTC
Fixed in master, cherry-pick requests for the 5.2 and 5.1 branches in gerrit. Assuming that the "does not open" indeed meant that it took unreasonably long to open it (several minutes). Resolving as fixed.
Comment 17 Commit Notification 2016-06-28 03:37:44 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=449a599109f4c16a384dba4df6cd953518396395&h=libreoffice-5-2

tdf#98515: Bail out early if kernel would have ridiculously many parameters

It will be available in 5.2.0.2.

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 18 Commit Notification 2016-06-28 03:37:52 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

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

tdf#98515: Bail out early if kernel would have ridiculously many parameters

It will be available in 5.1.5.

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.