Welcome! Log In Create A New Profile

Advanced

Exception in thread "GUI Poll" java.lang.NullPointerException

Posted by Andromodon 
Exception in thread "GUI Poll" java.lang.NullPointerException
May 01, 2008 09:30PM
Hi! I have gone through the steps at [www.reprap.org], and have gotten to the part that says:

"Now you can run the RepRap software. As you, not the superuser, open Eclipse, open the RepRap project, go to src -> org.reprap and right-mouse-click on Main.java. Select Run as -> Java application."

When I run it, an empty window pops up that is supposed to hold the RepRap window, and I get the following messages in my Java Console:

Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
Exception in thread "GUI Poll" java.lang.NullPointerException
at org.reprap.gui.botConsole.GenericExtruderTabPanel.refreshTemperature(GenericExtruderTabPanel.java:479)
at org.reprap.gui.botConsole.GenericExtruderTabPanel.access$1(GenericExtruderTabPanel.java:478)
at org.reprap.gui.botConsole.GenericExtruderTabPanel$1.run(GenericExtruderTabPanel.java:44)
Exception in thread "GUI Poll" java.lang.NullPointerException
at org.reprap.gui.botConsole.GenericExtruderTabPanel.refreshTemperature(GenericExtruderTabPanel.java:479)
at org.reprap.gui.botConsole.GenericExtruderTabPanel.access$1(GenericExtruderTabPanel.java:478)
at org.reprap.gui.botConsole.GenericExtruderTabPanel$1.run(GenericExtruderTabPanel.java:44)
Experimental: JNI_OnLoad called.


Do you guys have any idea what the problem might be?

I am running Ubuntu Hardy Heron, 32bit.
I get the same when I run reprap off the liveCD from both my IntelMac and Dell.
Re: Exception in thread "GUI Poll" java.lang.NullPointerException
May 06, 2008 02:57AM
Sorry, this isn't one I've seen before.

From the FAQ at [publib.boulder.ibm.com] it would appear "The most likely cause is when the application attempts to invoke a method on an object that it believes has been instantiated, but that is, in fact, null."

so from your first post this would point to a software issue with the current post 0.8.3 SVN version. However, as you are getting this from the LiveCD which is the 0.8.1 version it looks like some weird hardware thing. Probably due to a video card/monitor given that the issue is in the 'GUI Poll' thread.

Try going round a few friends' computers with the LiveCD and find a machine where it works and swap video cards and monitors with your machine.

Actually, before doing that, try a few different screen resolutions. I've found a few issues over the years that just go away with the right resolution.

Over the next couple of days I'll rebuild my machine and see if I can replicate the issue (in which case it will be a software issue).
Re: Exception in thread "GUI Poll" java.lang.NullPointerException
June 16, 2008 05:27AM
Anybody figure this one out?

I couldn't replicate the problem at the time but now with a different computer (Dell GX260) installed using the LiveDVD 0.6 I've got the same issue trying to run the 0.9 host.

I'll try a different computer in the next couple of days and see if it is a specific hardware issue (as I suspect).
Re: Exception in thread "GUI Poll" java.lang.NullPointerException
July 05, 2008 09:00PM
Hey, I've got the same error on Ubuntu Hardy running 0.9 of the Reprap host software. 0.8.3 runs absolutely perfectly as long as I run it as root, but it won't work with my thermocouple. Oops.

I did the complete developer install, minus loading the latest software out of Subclipse/Subversion, as I get a "Unable to load default SVN client." error. Perhaps if I get that sorted and run the mythical host-package-release script, things may start working.

Been working on this off and on for a week; my Darwin is essentially complete now, so I'll be focusing on this. I'll let you guys know if I come up with anything.
Re: Exception in thread "GUI Poll" java.lang.NullPointerException
July 07, 2008 09:16PM
Scary. It works now, but why, I'm not exactly sure. Your mileage may vary, as I don't claim to know what I'm doing here.

Just to recap, I'm running Ubuntu Hardy, fresh install with all the updates, Reprap host software 0.9 in /usr/lib/reprap.

Here's what I did:

Installed all the development tools as per [dev.www.reprap.org], including Netbeans.

Noticed that I now have a new JVM installed now, at:
/usr/lib/jvm/java-6-openjdk
cool, open is good, as I'm rapidly learning.

Not sure where that came from, but it appears to be the new default java version on my machine, so I ran with it, in the hopes that it might actually work.

Updated the directories in the reprap-host file to match my new JDK, and re copied all the J3D and RXTX stuff into the appropriate openjdk directories. Here's my new reprap-host file:


#!/bin/sh
# reprap-host -- runs Reprap Java host code with an appropriate classpath

RAM_SIZE=384M # Amount of RAM to allow Java VM to use
REPRAP_DIR="/usr/lib/reprap" # reprap.jar file and stl file
# JAVA_LIBRARY_DIR="/usr/share/java" # Java3D and j3d.org libraries
# JAVA_LIBRARY_DIR="/usr/lib/jvm/java-6-sun/jre/lib/ext" # Java3D and j3d.org libraries
JAVA_LIBRARY_DIR="/usr/lib/jvm/java-6-openjdk/jre/lib/ext" # Java3D and j3d.org libraries
# cd so we can find the reprap-wv.stl file. Can we avoid this??
[ ! -f ./reprap-wv.stl ] && cd "$REPRAP_DIR"
java -cp ".:./reprap.jar:$REPRAP_DIR:$REPRAP_DIR/reprap.jar:$JAVA_LIBRARY_DIR/*" \
-Xmx$RAM_SIZE org/reprap/Main

I had to update both paths before it would work nicely.

And, I still have to run the reprap-host as root, despite chmodding +x everything I could think of. I'm also getting a swing error:
Exception in thread "RepRap" java.lang.NullPointerException
at javax.swing.ImageIcon.(ImageIcon.java:155)

But it doesn't seem to matter yet; I can run the stepper exerciser. Still no thermocouple support, but I can check out code from the repository, so I'm now armed and dangerous.

Off to hack my way though the host software repository. I've got a bead on Zach's code, won't be long now. This is getting fun!

Wade
Sorry, only registered users may post in this forum.

Click here to login