Apache OpenOffice (AOO) Bugzilla – Issue 106390
Crash when closing stylist via closer
Last modified: 2017-05-20 10:29:22 UTC
Open a new impress, hit F11, right click on background objects, choose modify, close the dialog via the closer and the stylist, too: Office crashes.
Keyword set.
we crash in SfxDispatcher::PostMsgHandler and only if sfx2 is not compiled with debug information :-( Valgrind shows an illegal 4 byte read in PostMsgHandler but I suspect we have a corruption inside the "Call_Impl( *pSh, *pSlot, *pReq, pReq->AllowsRecording() );" line which should close the stylist. The slot in question is SID_STYLE_DESIGNER. I'm out of ideas currently I will try to remove my recent changes to the template dialog to see if they are the root cause...
the revert of issue 23221 didn't change anything, still crashes. It only crashes in impress and only if one of the presentation styles is selected, context menu modify is selectend and then either ok, cancel or closer is pressed. Since debuging does not help here and I'm out of ideas I will start to review the code..
interesting, if I disable the creation of the dialog to edit the style in FuTemplate::DoExecute, the crash still happens. I think I can rule out that dialog as the source of this problem...
if I make FuTemplate::DoExecute a noop, it still crashes. This gets even more interesting...
Just return in the slots exec method FuTemporary does still crash. So the issue is unlikely to be in sd module, at least not during slot execution. I tried a non pro build dev300m63 but like building sfx2 with debug this also does not crash and does not give any assertions (which I hoped for). I will investigate further what happens in sfx2 after the slot is called. Maybe an issue with updating the slot state? Compiler bug since this is a linux only issue? I'm running out of ideas fast...
the crash does not happen if I build all obj files in sfx2/source/app without optimization. This looks more and more like a compiler error. I will try to pinpoint which obj file fails...
in sfx2/source/control/makefile.mk, there already is this code # w.g. compilerbugs .IF "$(GUI)"=="WNT" .IF "$(COM)"!="GCC" CFLAGS+=-Od .ENDIF .ENDIF If a append +.IF "$(COM)"=="GCC" +CFLAGS+=-O0 +.ENDIF then the crash does not happen anymore. cl->mba: I don't like to do such changes to modules I do not own so please take over or dispatch
I will have to do a lot of research to find out if this is a real bug that switching off optimization just fixes by accident. So for the time being I take your fix. We have planned to check "noopt" compiles anyway, so we can postpone that now.
mav->wg: Please verify the issue.
Verified in CWS.