Bug 1251 : java.lang.NullPointerException when opening sketch
Last modified: 2009-10-09 01:45



Assigned To:

Attachment Type Created Size Actions

Description:   Opened: 2009-05-23 04:46
When opening a sketch by double-clicking the .pde file, Processing (1.0.3) often throws a "java.lang.NullPointerException" and quits.

In Console.app one can see these messages when this error happens (actually, the "JavaAppLaucher Error" line appears every time Processing is started):

[JavaAppLauncher Error] Non-String for 8 value in 'Properties' sub-dictionary in 'Java' sub-dictionary of Info.plist
[LaunchRunner Error] processing.app.Base.main(String[]) threw an exception:
at ch.randelshofer.quaqua.Quaqua14PopupMenuUI.uninstallListeners(Quaqua14PopupMenuUI.java:95)
at javax.swing.plaf.basic.BasicPopupMenuUI.uninstallUI(BasicPopupMenuUI.java:149)
at javax.swing.JPopupMenu.setInvoker(JPopupMenu.java:911)
at javax.swing.JMenu.ensurePopupMenuCreated(JMenu.java:516)
at javax.swing.JMenu.add(JMenu.java:550)
at processing.app.Base.addSketches(Base.java:1064)
at processing.app.Base.addSketches(Base.java:1072)
at processing.app.Base.addSketches(Base.java:1072)
at processing.app.Base.rebuildExamplesMenu(Base.java:986)
at processing.app.Editor.buildFileMenu(Editor.java:448)
at processing.app.Editor.buildMenuBar(Editor.java:411)
at processing.app.Editor.<init>(Editor.java:161)
at processing.app.Base.handleOpen(Base.java:736)
at processing.app.Base.restoreSketches(Base.java:402)
at processing.app.Base.<init>(Base.java:319)
at processing.app.Base.main(Base.java:236)
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:585)
at apple.launcher.LaunchRunner.run(LaunchRunner.java:115)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
Additional Comment #1 From fry 2009-05-26 12:27
is it because multiple versions of processing are on your machine, and
double-clicking a pde file is opening an older release?
Additional Comment #2 From crlf 2009-05-27 01:53
I only have Processing 1.0.3 installed. Well, I also have the Arduino IDE,
but I'm sure sketches are opening with Processing, if not only because:

- A processing window with the .pde actually opens, but the exception
dialog offers no other choice but to close the whole app.
Additional Comment #3 From fry 2009-05-27 04:41
k, i'll try to see if i can get this to reproduce on a machine.

it seems to be dying while trying to load the examples, so you might also
check to see if there's a file that's inaccessible in the examples folder.
though if the problem is intermittent, it's likely something else.
Additional Comment #4 From crlf 2009-06-02 00:03
Just an update, this is also an issue in the 1.0.4.
Additional Comment #5 From fry 2009-06-02 04:14
Yeah, I've found the problem but haven't been able to fix it yet. I'll mark
the bug as fixed once it's done.
Additional Comment #6 From sonic 2009-10-09 01:45
I have a similar (or the same) problem. When i open a sketch, i get this

Uncaught exception in main method: Java.lang.NullPointerException

Typically, on the third try it will open successfully. I'm running 10.5.8
on a quad core.
This bug is now being tracked here.