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





------- Additional comments from m...@openoffice.org Mon Dec 14 14:14:12 +0000 
2009 -------
a related problem:
various uno objects are "cached": they register as SwClient at a core object,
and there is code to iterate over the registered clients at the core object,
find the uno object, and construct a uno reference from the pointer.

carefully reviewing the design with mhu revealed that it is broken:
- thread A calls OWeakObject::release on a SwXBookmark
- thread A blocks on solar mutex (that is now in the SwXBookmark dtor)
- thread B, which has the solar mutex, iterates over the clients of a core 
bookmark,
   and creates a uno reference to the object
- thread B releases solar mutex
- thread A acquires solar mutex and deletes the SwXBookmark;
   now the uno reference points to deleted object

(after locking the solar mutex in the destructor of SwXBookmark, the complex
test "CheckBookmarks" still crashed on solaris due to this problem)

the best solution seems to be to put a weak reference to the uno object into the
core object (in addition to the entry in the listener list).
the weak reference is notified immediately and invalidated when the reference
count reaches 0.

---------------------------------------------------------------------
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: issues-unsubscr...@sw.openoffice.org
For additional commands, e-mail: issues-h...@sw.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to