You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2013/05/29 10:18:26 UTC

[Bug 122405] New: [sidebar] UI element's real interface is disposed

https://issues.apache.org/ooo/show_bug.cgi?id=122405

            Bug ID: 122405
        Issue Type: DEFECT
           Summary: [sidebar] UI element's real interface is disposed
           Product: General
           Version: AOO400-dev
          Hardware: All
                OS: All
            Status: CONFIRMED
          Severity: normal
          Priority: P3
         Component: code
          Assignee: issues@openoffice.apache.org
          Reporter: arielch@apache.org
                CC: issues@openoffice.apache.org
            Blocks: 121420

Created attachment 80743
  --> https://issues.apache.org/ooo/attachment.cgi?id=80743&action=edit
GDB backtrace

Build the custompanel example from the SDK.
Run the example.
Attach the debugger.

Set two break points:
a) on the UI element's disposing()
sd::colortoolpanel::PanelUIElement::disposing()

b) on its tool panel disposing()
sd::colortoolpanel::SingleColorPanel::disposing()

Activate the custompanel on the sidebar, switch to the gallery or the navigator
panel.

sd::colortoolpanel::SingleColorPanel::disposing() is called before
sd::colortoolpanel::PanelUIElement::disposing()

sfx2::sidebar::Panel::Dispose() is disposing the UI element's real interface,
then the UI element itself:


    if (mxElement.is())
    {
        Reference<lang::XComponent> xComponent (mxElement->getRealInterface(),
UNO_QUERY);
        if (xComponent.is())
            xComponent->dispose();
    }

    {    
        Reference<lang::XComponent> xComponent (mxElement, UNO_QUERY);
        mxElement = NULL;
        if (xComponent.is())
            xComponent->dispose();
    }

The real interface of the UI element is the UI element's responsibility (this
means, when the UI element is disposed, it will free its resources, among other
things, disposing its real interface - whatever that could be).
In the custompanel example, this is handled nicely by the C++ component
implementation helper class. In other cases, it may end up in a crash, as with
the Watching Window extension from
http://extensions.openoffice.org/en/project/watchingwindow

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 122405] [sidebar] UI element's real interface is disposed

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=122405

--- Comment #2 from SVN Robot <sv...@dev.null.org> ---
"af" committed SVN revision 1487475 into trunk:
122405: Sidebar panels no longer dispose XUIElement's inner objects.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 122405] [sidebar] UI element's real interface is disposed

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=122405

Andre <aw...@googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |awf.aoo@googlemail.com

--- Comment #1 from Andre <aw...@googlemail.com> ---
This is left-over from the early days of sidebar development when the Impress
panels where still view shell based and needed very special handling and had to
be disposed at exactly the right time.

Disposing just the mxElement should be enough, now that the Impress panels are
"regular" dialogs/controls.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 122405] [sidebar] UI element's real interface is disposed

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=122405

hdu@apache.org <hd...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |AOO 4.0

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 122405] [sidebar] UI element's real interface is disposed

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=122405

Andre <aw...@googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |RESOLVED
         Resolution|---                         |FIXED
           Assignee|issues@openoffice.apache.or |awf.aoo@googlemail.com
                   |g                           |

--- Comment #3 from Andre <aw...@googlemail.com> ---
The object returned by XUIElement::getRealInterface() is no longer disposed(). 
The XUIElement interface does not state who is responsible for the returned
object it seems reasonable to assume that the XUIElement object is.  A quick
look into two implementations of XUIElement confirms that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.