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

Bug 352472

Summary: Possible Deadlock at IForm#waitFor
Product: z_Archived Reporter: Claudio Guglielmo <claudio.guglielmo>
Component: ScoutAssignee: Andreas Hoegger <Andreas.Hoegger>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Andreas.Hoegger, zimmermann
Version: unspecifiedFlags: zimmermann: indigo+
zimmermann: juno+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to resolve the bug. zimmermann: iplog+

Description Claudio Guglielmo CLA 2011-07-19 11:14:33 EDT
Build Identifier: 3.7.0

The following code leads to a deadlock:

ClientSyncJob closeJob = new ClientSyncJob("Close", ClientSyncJob.getCurrentSession()) {
  @Override
  protected void runVoid(IProgressMonitor monitor) throws Throwable {
    form.doClose();
  }
};
closeJob.schedule();

form.start(new FormHandler());
form.waitFor();

Expected result: Closing the form releases the lock. Instead waitFor blocks forever. 

I know it is not a real life example. Nevertheless it should be fixed.

Reproducible: Always
Comment 1 Claudio Guglielmo CLA 2011-07-19 11:19:45 EDT
Created attachment 199911 [details]
Patch to resolve the bug.
Comment 2 Andreas Hoegger CLA 2011-07-22 05:08:12 EDT
Patch applied on trunk and Indigo RC1.
Thank you Claudio.
Comment 3 Matthias Zimmermann CLA 2011-10-10 12:58:22 EDT
shipped with scout 3.7.1
Comment 4 Matthias Zimmermann CLA 2012-05-22 05:55:40 EDT
Comment on attachment 199911 [details]
Patch to resolve the bug.

moved iplog flag from bug to patch