Skip to content

CIF simulator command line tool's plot visualizer crashes if window is resized

Steps to reproduce:

  • Run the test-cif-simulator-tank launch configuration from the ESCET development environment.
  • Confirm the option dialog without changing any options.
  • Resize the window of the plot visualizer.
  • Observe the following crash:
    Exception in thread "org.eclipse.escet.cif.simulator.output.plotviz.PlotVisualizerUpdateThread" java.lang.NullPointerException: Cannot invoke 
    "org.knowm.xchart.internal.chartpart.Axis.getAxisTickCalculator()" because the return value of "org.knowm.xchart.internal.chartpart.AxisPair.getLeftMainYAxis()" is null
          at org.knowm.xchart.internal.chartpart.PlotSurface_AxesChart.paint(PlotSurface_AxesChart.java:73)
          at org.knowm.xchart.internal.chartpart.Plot_.paint(Plot_.java:32)
          at org.knowm.xchart.internal.chartpart.Plot_AxesChart.paint(Plot_AxesChart.java:34)
          at org.knowm.xchart.XYChart.paint(XYChart.java:417)
          at org.eclipse.escet.cif.simulator.output.plotviz.PlotVisualizerCanvas.paint(PlotVisualizerCanvas.java:106)
          at org.eclipse.escet.common.eclipse.ui.G2dSwtCanvas.paintInMemory(G2dSwtCanvas.java:157)
          at org.eclipse.escet.cif.simulator.output.plotviz.PlotVisualizerCanvas.updatePixels(PlotVisualizerCanvas.java:98)
          at org.eclipse.escet.cif.simulator.output.plotviz.PlotVisualizerUpdateThread.run(PlotVisualizerUpdateThread.java:141)

This somehow does not occur in the ESCET IDE, nor the ESCET runtime instance started from a development environment. Not even when the visualizer is detached to a separate window.