Summary: | : Crash after trying to rename autotext entry | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | adam-art |
Component: | Writer | Assignee: | Caolán McNamara <caolanm> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | low | CC: | christopher.m.penalver, oliver.brinzing |
Version: | 3.4.4 release | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
See Also: | https://launchpad.net/bugs/945685 | ||
Whiteboard: | BSA target:3.6.0 | ||
i915 platform: | i915 features: | ||
Attachments: | No longer crashes when renaming AutoTexts. |
Description
adam-art
2012-03-03 14:10:18 UTC
. Did this bug also happen with previous versions of LibreOffice? Also: You state 3.4.4 as the affected version bug in launchpad 3.5.0-1ubuntu4/precise is reported. Actually, when I reported this bug on Launchpad i meant Ubuntu 11.10. See: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/945685/comments/0 Libreoffce version in 11.10 is 3.4.4 and is affected. My description was replaced by the current one by penalvh. He states that it affects also 3.5.0-1ubuntu4. Now I'm writing from my laptop with Ubuntu 11.04 installed where Libreoffice version is 3.3.4-0ubuntu1. It is also affected. Created attachment 58098 [details] [review] No longer crashes when renaming AutoTexts. Hi! So... after a long debugging session, I managed to trace the crash all the way from glossary.cxx through gloshdl.cxx->swblock.cxx->shellio.cxx->SwXMLTextBlocks.cxx to storage.cxx. First of all, the crash only happens when I rename an AutoText but set the shortcut to something already existing. storage.cxx:3282 here's where the exception throw happens. Although don't know why. Someone already was thinking about this very same question, hence the question marks in the comments at the end of the line :) This thrown exception is caught a few lines later only to create a log entry, and to be rethrown. And this rethrown exception is not handled. -> that is our problem. So I added a try catch block in the nearest place (not in xstorage.cxx because someone might want to catch that rethrown exception elsewhere). And that nearest place is: SwXMLTextBlocks.cxx:218 xRoot->renameElement ( aOldStreamName, aNewStreamName ); It can be seen a few lines later, that xBlkRoot is handled the same way, catching a container::ElementExistException, but doing nothing in the catch block. I tested it, it worked for me. At least I think it's working, if you spot any errors, just let me know. Szabolcs Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=dbe20175fed8e82bec3578ae3af800dac7bc45f4 Resolves: fdo#46939 don't rename autotext when source and dest are the same applied your patch, and moved the offending code inside "newname != oldname" conditional |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.