Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361583

Summary: AbstractStructuredModel deadlock when reusing lock from JobSafeStructuredDocument
Product: [WebTools] WTP Source Editing Reporter: Nick Sandonato <nsand.dev>
Component: wst.sseAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3    
Version: 3.3.2   
Target Milestone: 3.3.2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Nick Sandonato CLA 2011-10-20 14:55:39 EDT
+++ This bug was initially created as a clone of Bug #361302 +++

A lock is shard between the JobSafeStructuredDocument and the AbstractStruturedModel when aboutToChangeModel/modelChanged pair are invoked. This lock is largely ineffective, though, as only one thread ever truly attempts to require it as the model is changing, so other threads will proceed as normal. However, it has a potential to cause a deadlock in the case where modelChanged is not invoked after aboutToChangeModel.

To avoid this problem, I'm proposing that this lock is no longer acquired from the model. The internal state will continue to be used to correctly fire the appropriate events, however. All changes to the structured document are still controlled by the lock as before.
Comment 1 Nick Sandonato CLA 2011-10-24 11:00:24 EDT
Code released for 3_3_Maintenance and HEAD.