Bug 98678 - Libreoffice Crash when trying to add Custom Animation ("bad allocation" error and crash)
Summary: Libreoffice Crash when trying to add Custom Animation ("bad allocation" error...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Armin Le Grand
URL:
Whiteboard: target:5.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-15 10:49 UTC by Mayank Gupta
Modified: 2016-10-25 19:09 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
ZIP file contains screenshots of problems stated in BUG Description (470.60 KB, application/x-zip-compressed)
2016-03-15 10:49 UTC, Mayank Gupta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mayank Gupta 2016-03-15 10:49:49 UTC
Created attachment 123587 [details]
ZIP file contains screenshots of problems stated in BUG Description

After a successful build on Windows 10 Home Edition (x64), LibreOffice crashes when trying to add custom animation to a simple text in presentation to only one slide. The source wasn't cloned but was downloaded as tarball. I tried executing soffice.exe in multiple ways:

1.By Cygwin terminal
2.By Cygwin terminal as Administrator.
3.Directly navigating to directory containing soffice.exe and executing right from there.
4.Directly navigating to directory containing soffice.exe and executing right from there as Administrator.

But in all the cases, LibreOffice first freezes for sometime. I checked Task Manager at that time. The Ram usage peaked to about 750 MB. Then after the usage becomes somewhat low, "bad allocation" error pops up. And after clicking "OK" on it. The whole LibreOffice crashes.
(Screenshots of the problem are included)

I also tried 'make clean', then 'make' but the problem still wasn't solved.

I also build LibreOffice on Linux Ubuntu 15.10 (x64). Build was successful and there is no such problem in LibreOffice Impress on Ubuntu.
Comment 1 Usama 2016-03-15 11:16:51 UTC
I can confirm the crash in Master Version: 5.2.0.0.alpha0+ 

However it happens to me when I try to play or select another effect not after pressing the + button

Sometimes it shows Fatal Error windows with: "SEH Exception: Access Violation"

Version: 5.2.0.0.alpha0+
Build ID: 129d199d27f6961ea0c850686f76c83e2fc1953d
CPU Threads: 1; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-03-11_06:16:01
Locale: en-US (en_US)
Comment 2 Armin Le Grand 2016-03-15 16:47:04 UTC
Can you try with first deactivating the 'Automatic Preview' at the bottom of the Custom Animation panel, please?
Comment 3 Mayank Gupta 2016-03-15 18:33:00 UTC
Yes, I tried that already. However, the animation works if just the typing cursor is on the text (i.e. text is not selected). But when '+' button is pressed after selecting the test. The stated problem occurs.
Comment 4 Armin Le Grand 2016-03-16 09:03:55 UTC
Hi Mayank, thanks for checking.
I found a problem in CustomAnimationPane.cxx which seems to have come in by ommit e4aa4472f84dc9fcf0acaab80ede005603a4b93c (tdf#87813: Moving effects list into the animation tab). When adapting, all looks good.
Doing some more experiments, though...
Comment 5 Armin Le Grand 2016-03-16 14:51:09 UTC
Oky, change is comitted to gerrit
Comment 6 Commit Notification 2016-03-16 16:47:33 UTC
Armin Le Grand committed a patch related to this issue.
It has been pushed to "master":

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

tdf#98678 removed double for-loop

It will be available in 5.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 7 Mayank Gupta 2016-03-17 10:48:58 UTC
Armin Le Grand,
I don't think the problem is due to loop.
My system is on Dual boot and on Lunix (Ubuntu (x64)), it works perfectly and I checked CustomAnimationPane.cxx on Linux source, the for loop was there and LO Impress is running perfectly fine. I think the patch was successful because Jenkins checks for build errors, not logical one.
Comment 8 Armin Le Grand 2016-03-17 15:10:52 UTC
That double loop was by error, and the iterator might have been changed different in that combination on different compilers. I already thought about that when handling it - in principle, the two loops should do the same as the single one, but it definitely leaded to triggering an exception on windows
Comment 9 Mayank Gupta 2016-03-18 13:09:43 UTC
Armin Le Grand,
I applied your patch and did a partial build. 'bad allocation' error is gone. But what Usama mentioned in comment. The problem of FATAL ERROR "SEH Exception:Access Violation" still remains. It now crashes with the stated error when I try to play a different effect.
Comment 10 Armin Le Grand 2016-03-18 14:19:47 UTC
@Mayank Gupta: May be, but that is then another error which may be worth another error report (if there is none yet?). Still, I'll have a look...
Comment 11 Mayank Gupta 2016-03-18 14:26:45 UTC
Yes,that's why I'm setting this bug as resolved and filing another one (if it doesn't exist). Thanks for you effort. :)
Comment 12 Armin Le Grand 2016-03-18 14:40:27 UTC
@Mayank Gupta: Added and changed effects on a simple text, using selecting text and selection custom animation in sidebar, with and without automatic preview, could not get another error here. I am on win7, using 32bit office version

Version: 5.2.0.0.alpha0+
Build ID: 4331b137fdbe6992ca63ceb70a6f48ed6f9a86ea
CPU Threads: 8; OS Version: Windows 6.1; UI Render: GL; 
Locale: de-DE (de_DE)

If you can still reproduce on this or newer version, please give exact step-by-step intorductions how to do so (and maybe open a new task, set me on CC)
Comment 13 Mayank Gupta 2016-03-19 01:07:39 UTC
Armin Le Grand,
Here's what I did:
1)Open Impress
2)Type simple Text in body.
3)Add Custom Animation
4)Change the effect on simple text multiple times(3-4 approx).
5)Type text in title portion of the slide
6)Add custom animation and try to change it 3-4 times.
Comment 14 Armin Le Grand 2016-03-21 12:51:37 UTC
Tried with and without 'Automatic preview' (no info in text), randomly choosing effects (no info), all works well here on win7 32bit version. I do not get FATAL ERROR "SEH Exception:Access Violation"