gephi/gephi — Issue #503: Preview throws NPE at startup when opening a file
Author: mbastian
Created: 2012-01-07 02:10:35+00:00
State: open
Labels: Preview

Stack trace:
java.lang.NullPointerException
at org.gephi.desktop.preview.PreviewTopComponent.initTarget(PreviewTopComponent.java:187)
at org.gephi.desktop.preview.PreviewTopComponent.(PreviewTopComponent.java:138)
at org.gephi.desktop.preview.PreviewTopComponent.getDefault(PreviewTopComponent.java:410)
at org.gephi.desktop.preview.PreviewTopComponent$ResolvableHelper.readResolve(PreviewTopComponent.java:465)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...

The code throws NPE because the 'getApplet()' returns null. It's probably because the width and height are somehow written as simple values in the file. That causes the ProcessingTarget to be in headless mode.