Apache OpenOffice (AOO) Bugzilla – Issue 120045
Format case change crashes OOo
Last modified: 2012-08-13 06:48:18 UTC
I opened a document in .doc format and attempted to use Format>Case Change>lower case on the following phrase: Men Who have The entire program crashed and all work was lost. Auto save didn't function and documents were not recovered … only the original documents which existed prior to making any changes. When I re-opened the documents and attempted, again to apply Format>Case Change>lowercase to the above phrase, selected in the open document, nothing happened. Then, while composing this bug report, I attempted again to do the same thing and the program crashed again. Apparently an error report was sent to Apple or you automatically (I'm not sure which.)
The problem happened to Mac platform when changing to lower case with word contains upper case characters. It's obviously serious problem. Propose 3.4.1 release blocker
set release blocker flag for 3.4.1
This can be fixed by changing the name of struct TransliterationChgData and related vairables defined.
Created attachment 78552 [details] minimal document for reproducing the reported crash
Created attachment 78553 [details] backtrace of the crash The crash is so bad it even takes gdb with it, but the partial stack available looks interesting enough.
Frame 3 of the backtrace shows that the TransliterationChgData constructor from sw/source/core/txtnode/txtedt.cxx gets called indirectly from EditEngine's TransliterateText() method, which is in main/editeng/source/editeng/impedit4.cxx That file has its own definition of a TransliterationChgData structure which is slightly different from the one in Writer. So there are two structures with the same name and the dynamic loader seems to mix them up. Using namespaces to disambiguate the classes and their methods fixes the problem. Committed as revision 1356318 into trunk and merged into AOO34 as rev 1356327. This particular crash could be the tip of an iceberg for a much bigger problem, so we should check which of the dynamically exported symbols have conflicting definitions in multiple libraries. With the AOO code base using templates so massively and the multiple instantiations of even generally useful containers (e.g. for vector<int>) in different libraries this could be a very tiresome task though.
For completeness here are the conflicting methods for allocation. In libediteng.dylib: 000a1576 T __gnu_cxx::new_allocator<TransliterationChgData>::allocate(unsigned long, void const*) and in libsw.dylib: 004e7320 T __gnu_cxx::new_allocator<TransliterationChgData>::allocate(unsigned long, void const*)
For the general problem with multiple different instantiations for the same symbol name I created the tracker bug 120169.
As both definitions of TransliterationChgData are in-public, we may need not to use namespace on this issue for distinguishing. Just change the struct name directly would be OK.
Verified steps: 1)open sample file in attachment. 2)use Format>Case Change>lower case to change two lines "Men Who Have" to lowercase. no crash, pass on Mac10.7 with AOO341 branch r1359641
Verified pass on Mac with AOO trunk r1362376.
*** Issue 120370 has been marked as a duplicate of this issue. ***
*** Issue 120537 has been marked as a duplicate of this issue. ***