hallvard / plantuml

Embed UML diagrams in files and view them in Eclipse
http://plantuml.sourceforge.net/
209 stars 57 forks source link

NullPointerException in SWTImageCanvas #32

Closed nicolaichuk closed 6 years ago

nicolaichuk commented 7 years ago

@hallvard, eclipse plugin don't work.

java.lang.NullPointerException
    at net.sourceforge.plantuml.eclipse.views.SWTImageCanvas.pan(SWTImageCanvas.java:430)
    at net.sourceforge.plantuml.eclipse.views.SWTImageCanvas.access$4(SWTImageCanvas.java:429)
    at net.sourceforge.plantuml.eclipse.views.SWTImageCanvas$PanHandler.mouseMove(SWTImageCanvas.java:126)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:213)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

eclipse version: Neon.3 Release (4.6.3) Build id: 20170314-1500

  PlantUML Ecore Feature    1.1.18.201704180954 net.sourceforge.plantuml.ecore.feature.feature.group    PlantUML Team
  PlantUML Feature  1.1.18.201704180954 net.sourceforge.plantuml.feature.feature.group  PlantUML Team
  PlantUML Library Feature  1.1.18.8059 net.sourceforge.plantuml.lib.feature.feature.group  PlantUML Team
hallvard commented 7 years ago

Strange, the line numbers in the stack trace don't match the methods. Is there an image showing in the view? I ask because from my reading of the code, the only way you can get an NPE is of there is no image there.

nicolaichuk commented 7 years ago

@hallvard, Yes, the output window is empty. There is no image. There is this error in eclipse log-file.