Keystone library and the dreaded ks.load()
in
Contributed Library Questions
•
10 months ago
I'm running Processing 2.0b6 on a Mac, and I'm running the really helpful Keystone library (by David Bouchard). Problem is, the ks.load() insists on causing me a
NullPointerException
.
I've tried using a solution described in the old version of this forum:
But to no avail. The file generated seems fine:You can try and do:
Locale locale = new Locale("EN");
Locale.setDefault(locale);
before doing the save.
- <?xml version="1.0" encoding="UTF-8"?>
- <keystone>
- <surface h="300" res="20" w="400" x="169.0" y="168.0">
- <point i="0" u="0.0" v="0.0" x="-76.0" y="-124.0"/>
- <point i="20" u="400.0" v="0.0" x="491.0" y="-121.0"/>
- <point i="420" u="0.0" v="300.0" x="-168.0" y="572.0"/>
- <point i="440" u="400.0" v="300.0" x="572.0" y="573.0"/>
- </surface>
- </keystone>
java.lang.NullPointerException at processing.mode.java.runner.Runner.findException(Runner.java:682) at processing.mode.java.runner.Runner.reportException(Runner.java:627) at processing.mode.java.runner.Runner.exception(Runner.java:570) at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367) at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255) at processing.mode.java.runner.EventThread.run(EventThread.java:89) Exception in thread "Animation Thread" java.lang.NullPointerException at processing.data.XML.getString(XML.java:575) at processing.data.XML.getString(XML.java:570) at processing.data.XML.getFloat(XML.java:639) at processing.data.XML.getFloat(XML.java:627) at deadpixel.keystone.CornerPinSurface.load(Unknown Source) at deadpixel.keystone.Keystone.load(Unknown Source) at deadpixel.keystone.Keystone.load(Unknown Source) at CornerPin.keyPressed(CornerPin.java:102) at processing.core.PApplet.handleKeyEvent(PApplet.java:2756) at processing.core.PApplet.dequeueKeyEvents(PApplet.java:2699) at processing.core.PApplet.handleDraw(PApplet.java:2140) at processing.opengl.PGL$PGLListener.display(PGL.java:2595) at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:189) at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:177) at javax.media.opengl.awt.GLCanvas$DisplayAction.run(GLCanvas.java:928) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364) at javax.media.opengl.awt.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:945) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:702) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:663) at java.awt.EventQueue$2.run(EventQueue.java:661) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:672) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
1