To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=68357





------- Additional comments from [EMAIL PROTECTED] Wed Aug  6 12:36:08 +0000 
2008 -------
We have here a valid Outliner object that uses an already destroyed OutlinerView
object.

My hypothesis of how this could happen:

A search is started in an outline view.  This leads to a call of
Outliner::Implementation::ProvideOutlinerView() where the OutlinerView of the
current OutlineViewShell is stored in mpOutlineView.  The search switches from
view shell to view shell until it finally fails and switches back to outline
view.  However, the OutlineViewShells and their OutlinerViews on which the
search starts and where it ends are not identical.  Switching to another view
shell destroyes the current one.  As a result mpOutlineView points to an already
destroyed OutlinerView object.

When the search is triggered a second time then ProvideOutlinerView() is called
again.  It just checks the *type* of the current view shell.  As this is the
same as the one the last time ProvideOutlinerView() was called it does not
modify the value of mpOutlineView.  The following access of mpOutlineView
triggers the valgrind error and possibly a GPF.


If this hypothesis is correct then this error can be fixed by resetting
mpOutlineView when the OutlinerView it points to is destroyed.  To ways to do
this come to mind:

- Listen to changes of the main view shell.  When a currently avtive
OutlineViewShell is deactivated then reset mpOutlineView.

- Store a shared pointer to the view shell from which mpOutlineView is
initialized.  When the view shell is destroyed the shared pointer is set to NULL
(even when later another OutlineViewShell is created at the same place in memory
as the previous one).  In ProvideOutlinerView check the shared pointer and reset
mpOutlineView when the shared pointer is empty.


---------------------------------------------------------------------
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