To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=80282
                 Issue #|80282
                 Summary|assertion: Can't get core metric without shell!
               Component|framework
                 Version|680m222
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|code
             Assigned to|cd
             Reported by|af





------- Additional comments from [EMAIL PROTECTED] Thu Aug  2 08:31:57 +0000 
2007 -------
The assertion "Can't get core metric without shell!" is triggered in
sfx2/source/control/unoctitm.cxx, line 1009, when I am leaving the Impress
presentation.

At the moment I can reproduce this only on the CWS presenterview.  However, I
have seen this before and the cause for this assertion being triggered looks
like it can occur in other contexts as well.  What happens is this:

The SfxStateCache for a slot (in this case slot 12008, SID_ATTR_METRIC) is
invalidated, by calling its Invalidate() method.  This leads to calling
aSlotServ.SetSlot(0) which resets the SfxSlot pointer of the SfxSlotServer
member but not its _nShellLevel.

When then eventually SfxDispatchController_Impl::StateChanged() is called with
the SfxSlotServer of the above SfxStateCache, the _nShellLevel member of the
former is used to determine the shell from which to get the item pool.  The slot
server is still invalidated, i.e. its _pSlot member is still NULL, but
nevertheless the _nShellLevel is used to retrieve a shell from the stack.  This
fails (probably because the shell stack has been modified since the slot server
was last initialized) and an empty SfxShell pointer leads to the assertion being
triggered.


Two possible solutions come to mind:
1. When an SfxSlotServer object is invalidated, either by calling its
Invalidate() method or be explicitly calling SetSlot(NULL), reset the
_nShellLevel to 0.  This value does not point to the right shell but with high
probability will point to shell at all.

2. In SfxDispatchController_Impl::StateChanged() check the slot server state
before its GetShellLevel() method is called.  Maybe an invalidated SfxSlotServer
can be revalidated before being accessed.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to