https://issues.apache.org/ooo/show_bug.cgi?id=122095
--- Comment #5 from Andre <[email protected]> --- The root cause of this crash (on Windows this manifests as a looping attempt to update a slot with a lot of exceptions thrown) is that the SidebarController reacts to context change synchronously. The insertion of a table is also notified synchronously, so the SidebarController creates new panels after new tool bars and, more importantly, new shells (in this case the table and the text tool bar shells) have been created but before SFX2 has fully updated its internal state. What is missing in SFX2 seems to be an invalidate of at least one SfxStateCache object. That references the wrong shell (has an index of before the new tool bar shells where pushed on the shell stack). That wrong shell is accessed like it where another shell (in this case there is a hard cast from TableObjectBar to DrawViewShell) and this leads to either a crash (on Linux) or an exception (Windows/Debug). While debugging this I have seen scary things: - SfxStateChache indexes the shells on the shell stack by index. When, like in this case, such an index is not invalidated after a change of the shell stack, this causes a crash or other subtle errors. - In SfxBindings::CreateSet_Impl() there is this code: const SfxSlot *pSibling = pRealSlot->GetNextSlot(); while ( pSibling > pRealSlot ) { ... pSibling = pSibling->GetNextSlot(); } I have yet to understand why this works. -- You are receiving this mail because: You are on the CC list for the bug.
