Bug 115700 - DemuxingMListener notifies clients that resource is loaded even when the load actually failed
Summary: DemuxingMListener notifies clients that resource is loaded even when the load...
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 critical
Target Milestone: 1.0   Edit
Assignee: Chris McGee CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-11-09 16:01 EST by Dusko CLA
Modified: 2010-07-19 12:24 EDT (History)
0 users

See Also:


Attachments
Patch for the gmf.runtime.emf.core plugin. (18.67 KB, patch)
2005-11-25 16:55 EST, Chris McGee CLA
no flags Details | Diff
Patch for the tests.gmf.runtime.emf.core plugin. (17.14 KB, patch)
2005-11-25 16:55 EST, Chris McGee CLA
no flags Details | Diff
Final Patch (18.51 KB, patch)
2006-02-23 15:01 EST, Chris McGee CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dusko CLA 2005-11-09 16:01:42 EST
The actual culprits are ResourceUtil.load(...) and 
MSLEditingDomain.loadResource(...) methods. They attempt to load resource and 
if the load method throws an exception, they unload it. On the other hand, the 
algorithm that determined if the resource is loaded has changed from checking 
if a root object has been added to checking a flag, changing the timing.

Methods ResourceUtil.load(...) and MSLEditingDomain.loadResource(...) are 
atomic operations: when they return the resource is not loaded so there should 
not be notification that it is loaded (even though it is followed by the 
unload notification).

This is marked as critical because of the following:
1) This is regression that puts existing code in a bad shape.
2) Most event listeners handling those events are running in either asyncExec, 
syncExec or UIJob. Depending on which methods they chose they run in different 
troubles, ranging from wasted processing and memory to bad things in the UI 
(like multiple dialog boxes in one case).
Comment 1 Chris McGee CLA 2005-11-25 16:55:27 EST
Created attachment 30650 [details]
Patch for the gmf.runtime.emf.core plugin.
Comment 2 Chris McGee CLA 2005-11-25 16:55:48 EST
Created attachment 30651 [details]
Patch for the tests.gmf.runtime.emf.core plugin.
Comment 3 Chris McGee CLA 2005-11-25 17:41:08 EST
Delivered the M4 fix that will revert the MSL to the old behaviour. The M5 fix will remove the automatic unloading of resources and all listeners will receive both load and unload events for resources that loaded with errors.
Comment 4 Chris McGee CLA 2006-02-23 15:01:29 EST
Created attachment 35257 [details]
Final Patch

The final patch is attached to remove all of the auto-unloading and squelching events on resources that failed to load with errors.
Comment 5 Chris McGee CLA 2006-02-24 09:56:38 EST
The patch has been committed.
Comment 6 Richard Gronback CLA 2008-08-13 13:06:53 EDT
[target cleanup] 1.0 M5 was the original target milestone for this bug
Comment 7 Eclipse Webmaster CLA 2010-07-19 12:24:16 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime EMF was the original product and component for this bug