Bug 404948 - Error Message First time running a downloadable scenario in V2.0 M1 (runs fine after first try)
Summary: Error Message First time running a downloadable scenario in V2.0 M1 (runs fin...
Status: ASSIGNED
Alias: None
Product: STEM
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Stefan Edlund CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-04 16:17 EDT by James Kaufman CLA
Modified: 2013-04-05 19:26 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Kaufman CLA 2013-04-04 16:17:53 EDT
Download and run STEM v2.0 M1
Download and install the Mexico/USA downloadable scenario
import it to workspace
run the scenario (tested with no interventions)

The first time you try to run you get the error below in the error log and STEM does not start
Second try and later it works just fine,

Population model platform:/resource/UsaMexico/decorators/Humans.standard cannot locate any static population labels of type "human".

ava.lang.Exception
	at org.eclipse.stem.populationmodels.standard.impl.PopulationModelImpl.decorateGraph(PopulationModelImpl.java:365)
	at org.eclipse.stem.populationmodels.standard.impl.StandardPopulationModelImpl.decorateGraph(StandardPopulationModelImpl.java:185)
	at org.eclipse.stem.core.model.impl.ModelImpl.invokeNodeDecorators(ModelImpl.java:483)
	at org.eclipse.stem.core.model.impl.ModelImpl.getCanonicalGraph(ModelImpl.java:234)
	at org.eclipse.stem.core.scenario.impl.ScenarioImpl.initialize(ScenarioImpl.java:487)
	at org.eclipse.stem.jobs.simulation.SimulationManager.createSimulation(SimulationManager.java:326)
	at org.eclipse.stem.jobs.simulation.SimulationManager$2.run(SimulationManager.java:392)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 James Kaufman CLA 2013-04-04 16:18:21 EDT
assigning to Stefan
Comment 2 Stefan Edlund CLA 2013-04-05 18:07:14 EDT
A quick update on the progress on this. A problem occurs when loading a graph resource first time after launching STEM. For instance, in the UsaMexicoScenarioLevel2, I see exceptions loading this graph:

platform:/plugin/org.eclipse.stem.data.geography.infrastructure.transportation/resources/data/relationship/air/USA_1_USA_2.graph

This is the exception:

org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference '//@nodeLabels.0/@value'. (platform:/plugin/org.eclipse.stem.data.geography.infrastructure.transportation/resources/data/relationship/air/USA_1_USA_2.graph, 14801, 239)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1149)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHandler.java:1223)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:737)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:516)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
...


Since it's not able to load any graphs the population labels are missing hence we see the problem described in the defect.

The second time the scenario is launched loading the graphs works just fine.
Comment 3 Stefan Edlund CLA 2013-04-05 19:26:55 EDT
Found the problem. It's in the bundle change listener in IdentifiableContentProvider. The listener unloads resources so that any disease models that are not available any longer are removed and added back in again when the bundle is loaded.

Will discuss on Monday best way for fixing this.