Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: UDIG 1.2.M0
-
Fix Version/s: UDIG 1.3.0
-
Component/s: framework
-
Labels:None
Description
The bundle net.refractions.udig.project.ui delegates some work to the display thread during bundle start:
public void start( BundleContext context ) throws Exception { super.start(context); final URL iconsUrl = context.getBundle().getEntry(ICONS_PATH); PlatformGIS.syncInDisplayThread(new Runnable(){ public void run() { images.initializeImages(iconsUrl, getImageRegistry()); } }); new ActiveMapTracker().startup(); }
Normally uDig starts up so slowly this code gets a chance to run before the first map is displayed. When used in an RCP application (and the GISWidget) this "luck" no longer applies and we manage to deadlock...
In summary (in Eclipse's Debug View), to us the timeline looks as follows:
| PlatformGIS.syncInDisplayThread | redraw job |
|---|---|
| owns the default classloader | currently executed by UISynchroniser |
| waits for execution by UISynchroniser | waits for the default classloader |
Proposed fixes:
- The easiest fix woudl be to replace the call with an "async" call - but I have no great idea what those Icons are for
- It would also be wise to just load the icons lazily as needed - indeed I am surprised this is not the case?
- https://github.com/uDig/udig-platform/commit/e762cb1fc43204673aa61607768bfefcfa6cd140 and
- https://github.com/uDig/udig-platform/commit/2bccb0dc43c9bf890a1faaae95daf2cde1e74334
this issue seems to be resolved. The the Image-Registry "Images" doesn't exists anymore and the existing plugins are on the standard eclipse way registering and accessing images after that ...