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

Bug 333267

Summary: [Workbench] UILockListener overwritten in LockManager#setLockListener
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: ivan, wolfgang.pedot
Version: 1.4   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ralf Sternberg CLA 2010-12-28 11:09:50 EST
Since the org.eclipse.core.internal.jobs.LockManager can only keep one single lock listener, different sessions in RAP overwrite each other's listeners. As a result, only the one Workbench instance that has been started latest, will receive aboutToWait() and aboutToRelease() notifications from the JobManager. See Workbench#runUI, line 2545.
Comment 1 Wolfgang Pedot CLA 2016-08-29 11:38:52 EDT
This also keeps the Display instance from being GCed until the locklistener is overwritten by a new one.

Is using "allowDeadLock" a feasible workaround for this? The name of that parameter sure is scary...
Comment 2 Ivan Furnadjiev CLA 2016-08-30 03:17:44 EDT
(In reply to Wolfgang Pedot from comment #1)
> This also keeps the Display instance from being GCed until the locklistener
> is overwritten by a new one.
> 
> Is using "allowDeadLock" a feasible workaround for this? The name of that
> parameter sure is scary...

Could you provide a fix through Gerrit [1]?

[1] https://eclipse.org/rap/source/ 
[2] https://wiki.eclipse.org/RAP/Git
Comment 3 Wolfgang Pedot CLA 2016-08-30 03:57:00 EDT
Maybe I was not perfectly clear: "allowDeadLock" is a commandline-parameter for the framework so there is no code-change. If it is set the code-block that calls setLockListener is skipped (Workbench.runUI) but I dont know enough internals to decide if its a good idea to set that parameter.