Bug 444880 - MapViewLogger throws Exceptions on Win7 x86_64
Summary: MapViewLogger throws Exceptions on Win7 x86_64
Status: RESOLVED FIXED
Alias: None
Product: STEM
Classification: Technology
Component: UI (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 2.0.0   Edit
Assignee: Matthew Davis CLA
QA Contact:
URL:
Whiteboard:
Keywords: info, ui, usability
Depends on:
Blocks:
 
Reported: 2014-09-23 17:26 EDT by Vincent Ruslan CLA
Modified: 2014-09-24 21:24 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot of debug showing null variable in stack (131.67 KB, image/png)
2014-09-23 17:26 EDT, Vincent Ruslan CLA
no flags Details
Shows the failed MapView simulation logging in Progress (87.35 KB, image/png)
2014-09-23 17:29 EDT, Vincent Ruslan CLA
no flags Details
Shows config of simulation including MapViewLogger Properties Details (102.60 KB, image/png)
2014-09-23 17:30 EDT, Vincent Ruslan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Ruslan CLA 2014-09-23 17:26:38 EDT
Created attachment 247316 [details]
Screenshot of debug showing null variable in stack

The MapViewLogger class consistently throws Exceptions on Win7 x86_64 with STEM 2.0.2 and STEM 2.0.1. This particular logger will not record any screenshots of an otherwise operable simulation.

This occurs under the STEM Release Version, the STEM Latest Build, and a STEM Custom Build in Both Eclipse 4.4.0 RCP Luna as well as in a STEM Custom Build on Eclipse 3.8 Juno.

ENVIRONMENT:

The problem can be reproduced with JRE1.6, JRE1.7, and JRE1.8 (for pre-built installs) and JRE1.6 (for custom builds).  

All tests were done on Windows 7 x86_64 with 8GB RAM.  Memory to STEM was also increased to 2GB wit no effect.

What is curious is that the other Map Loggers (and CSV loggers) work just fine:

-*Map View Logger :: FAILS*
-Equirectangular Map Logger :: Success
-Mercator Map Logger :: Success
-Orthographic Map Logger :: Success
-Azimuth Map Logger :: Not Tested
-CSV File Logger :: Success


PROCEDURE:

1. Added Map View Image Logger to a working and tested scenario (with working CSV logger).  Selected File / Save All.  Selected Window / Reset Perspective.

2. Right clicked Simulation in Designer / Selected Run.  Simulation runs.

3. Pause simulation and check console.  Exceptions are visible.   but Map View Logger is failing to console with repeating Exceptions (once per simulation cycle).

4. Ensured Map View window is open and selected.  Opened it again with no effect.

5. Other Map loggers work fine. CSV Logger is logging to the default workspace Record directories correctly.

COMMENTS:

Two clues here:

(1) MapViewImageWriterLoggerImpl.java:245 seems to be failing.  When view = getMapViewFromWorkbench(); gets called, the object view is null even after the call to getMapViewFromWorkbench().

(2) In the same file, on line 338 , when GeographicControl control = getMapControlForSimulation();  is called,  control is also coming back with a null value.


EXCEPTIONS:

!ENTRY org.eclipse.stem.loggers.imagewriter 4 0 2014-09-23 17:01:54.986
!MESSAGE Error opening the map view for the map image logger
!STACK 1
org.eclipse.ui.PartInitException: Could not create view: org.eclipse.stem.ui.views.geographic.map
  at org.eclipse.ui.internal.ViewFactory.createView(ViewFactory.java:158)
  at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2244)
  at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1154)
  at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3934)
  at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
  at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3931)
  at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3907)
  at org.eclipse.stem.loggers.imagewriter.impl.MapViewImageWriterLoggerImpl.getMapViewFromWorkbench(MapViewImageWriterLoggerImpl.java:224)
  at org.eclipse.stem.loggers.imagewriter.impl.MapViewImageWriterLoggerImpl.getMapControlForSimulation(MapViewImageWriterLoggerImpl.java:245)
  at org.eclipse.stem.loggers.imagewriter.impl.MapViewImageWriterLoggerImpl.access$0(MapViewImageWriterLoggerImpl.java:243)
  at org.eclipse.stem.loggers.imagewriter.impl.MapViewImageWriterLoggerImpl$1.run(MapViewImageWriterLoggerImpl.java:338)
  at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:164)
  at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:158)
  at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
  at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
  at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
  at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
  at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
  at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
  at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  at org.eclipse.stem.ui.launcher.WorkbenchLauncher.launch(WorkbenchLauncher.java:47)
  at org.eclipse.stem.core.common.presentation.CoreEditorAdvisor$Application.start(CoreEditorAdvisor.java:406)
  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
  at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
!SUBENTRY 1 org.eclipse.ui 4 0 2014-09-23 17:01:54.986
!MESSAGE Could not create view: org.eclipse.stem.ui.views.geographic.map
!ENTRY org.eclipse.stem.loggers.imagewriter 2 0 2014-09-23 17:01:55.330
!MESSAGE The Map View Logger could not find the Map Canvas.
Comment 1 Vincent Ruslan CLA 2014-09-23 17:29:58 EDT
Created attachment 247317 [details]
Shows the failed MapView simulation logging in Progress
Comment 2 Vincent Ruslan CLA 2014-09-23 17:30:36 EDT
Created attachment 247318 [details]
Shows config of simulation including MapViewLogger Properties Details
Comment 3 Matthew Davis CLA 2014-09-23 18:24:51 EDT
This is related to a change in the map viewer code a while back, the logger was never fixed for it.
Comment 4 Matthew Davis CLA 2014-09-23 18:27:27 EDT
Fixed as 03edc2f1
Comment 5 Vincent Ruslan CLA 2014-09-24 21:24:44 EDT
Confirmed as resolved on my local Win7 x64 environment.  Thanks!