When a CML session file is used to invoke Corelyzer (via double-click, right-click + Open, or dragging CML file onto Corelyzer app), the session loads incompletely. Data files are added correctly, but tracks and sections don't appear.
CorelyzerAppController.doAssociatedFile() calls loadStateFile(). This eventually leads to CorelyzerAppController.createTrack(), where the SceneGraph.addTrack() call returns -1 instead of a valid, non-negative ID.
However, if I create a Runnable with Thread.sleep(2000) before calling loadStateFile(), everything works correctly.
So it appears the problem is a race condition: we try to add a track before SceneGraph is ready.
To fix, ensure app initialization is complete, then load the CML file.
When a CML session file is used to invoke Corelyzer (via double-click, right-click + Open, or dragging CML file onto Corelyzer app), the session loads incompletely. Data files are added correctly, but tracks and sections don't appear.
CorelyzerAppController.doAssociatedFile() calls loadStateFile(). This eventually leads to CorelyzerAppController.createTrack(), where the SceneGraph.addTrack() call returns -1 instead of a valid, non-negative ID.
However, if I create a Runnable with Thread.sleep(2000) before calling loadStateFile(), everything works correctly.
So it appears the problem is a race condition: we try to add a track before SceneGraph is ready.
To fix, ensure app initialization is complete, then load the CML file.