Welcome! Log In Create A New Profile

Advanced

Host Software on OS X crashes

Posted by matt 
Host Software on OS X crashes
July 31, 2008 04:27PM
I need some help please.

I have followed all instructions in the Wiki to install the host software on my Mac running OS X 10.5, including recompiling the serial port library, etc. . No when I launch the app from the command line, I get a dialog telling me that I need /dev/ttyS0 (so far so good, the app starts up at least), but right after dismissing the dialog I get:

[Annika:/Applications/reprap-host-20080523] matt% ./reprap-host.sh
Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
java.lang.Exception:
Could not connect at /dev/ttyS0.

Check to make sure that is the right path.
Check that you have your serial connector plugged in.The program will continue but your geometry preference has been set to 'nullcartesian' for this session.
at org.reprap.Main.initComms(Unknown Source)
at org.reprap.Main.access$2200(Unknown Source)
at org.reprap.Main$22.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/swing/GroupLayout$Group
at org.reprap.Main$22.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Thanks, Matt
Re: Host Software on OS X crashes
July 31, 2008 05:19PM
I'm guessing it's the serial port configuration. For Windows, I had to change "/dev/ttyS0" to "COM1". I'm not familiar with OS X but, after poking around a bit, it looks like the serial device might be named something more like "/dev/usbc0".
Re: Host Software on OS X crashes
August 01, 2008 12:35AM
But how can I set the serial port before the app starts? Is there some config file or a launch parameter?
Re: Host Software on OS X crashes
August 01, 2008 08:05PM
Have a look at the thread [forums.reprap.org]

Do a search for the reprap.properties file and manually edit it.
Re: Host Software on OS X crashes
August 02, 2008 07:06AM
Ah, thanks. I found the config file and put a valid port in. I still get the same crash since I do not have the original Arduino controller to connect yet.

Is it by design that the software will not run without any hardware connected and active? The message:

"The program will continue but your geometry preference has been set to 'nullcartesian' for this session."

seems to imply that it can run without hardware. But still, how can I get around that crash? (If I only knew more Java, I'd trace through the source...)
Re: Host Software on OS X crashes
August 02, 2008 10:19AM
There should be a geometry setting in the properties file. Changing it from "cartesian" to "nullcartesian" should allow it to work without hardware attached. On the other hand, the host shouldn't have crashed.
Re: Host Software on OS X crashes
August 02, 2008 08:57PM
If the error trace is still the same as in you first post I do not think the problem is not with the com port settings.
The host software is doing what it should when it cant find or communicate with the reprap hardware

Looks to me like this is the error stopping it all:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/swing/GroupLayout$Group
at org.reprap.Main$22.run(Unknown Source)

Java can't find the layout manager for one of the host windows/forms

A few threads on the net suggested that GroupLayout is only in the swing package from java 1.6 which is not available for Mac

but... I thought this had been sorted out [blog.reprap.org]

There's a link in the last post for swing-layout-1.0.3.jar

hope that works
Re: Host Software on OS X crashes
August 03, 2008 06:19AM
Steve: OK, found all that. It was set correctly.

xsainnz: Ah, that makes sense. I downloaded swing-layout and put it into Extensions, but the exception is still the same. I am on 10.5, so maybe this swing library is not 64bit enabled? I wish I knew more about Java!

Maybe my /Library/Java/Extensions folder helps:
[Annika:/Applications/reprap-host-20080523] matt% ls -asl /Library/Java/Extensions/ total 21888
0 drwxrwxr-x 32 root admin 1088 3 Aug 12:09 .
0 drwxrwxr-x 4 root admin 136 13 Mai 07:52 ..
120 -rw-r-xrwx 1 matt admin 59319 31 Jul 21:53 RXTXcomm.jar
40 -rw-r-xrwx 1 matt admin 18416 31 Jul 21:39 gluegen-rt.jar
1328 -rw-r-xrwx@ 1 matt matt 676352 31 Jul 21:37 j3d-org-code-0.9.tar.gz
8 -rwxr-xrwx@ 1 matt matt 3036 5 Dez 2005 j3d-org-elumens.jar
152 -rwxr-xrwx@ 1 matt matt 76085 17 Apr 2006 j3d-org-geom-core.jar
40 -rwxr-xrwx@ 1 matt matt 16695 17 Apr 2006 j3d-org-geom-hanim.jar
64 -rwxr-xrwx@ 1 matt matt 29357 17 Apr 2006 j3d-org-geom-particle.jar
56 -rwxr-xrwx@ 1 matt matt 25071 17 Apr 2006 j3d-org-geom-spline.jar
32 -rwxr-xrwx@ 1 matt matt 15783 17 Apr 2006 j3d-org-geom-terrain.jar
8 -rwxr-xrwx@ 1 matt matt 2283 17 Apr 2006 j3d-org-inputdevice.jar
800 -rwxr-xrwx@ 1 matt matt 407487 17 Apr 2006 j3d-org-java3d-all.jar
88 -rwxr-xrwx@ 1 matt matt 42502 17 Apr 2006 j3d-org-loader-3ds.jar
24 -rwxr-xrwx@ 1 matt matt 11231 17 Apr 2006 j3d-org-loader-core.jar
24 -rwxr-xrwx@ 1 matt matt 9382 17 Apr 2006 j3d-org-loader-dem.jar
24 -rwxr-xrwx@ 1 matt matt 8747 17 Apr 2006 j3d-org-loader-stl.jar
8 -rwxr-xrwx@ 1 matt matt 4044 17 Apr 2006 j3d-org-loader-vterrain.jar
32 -rwxr-xrwx@ 1 matt matt 14091 17 Apr 2006 j3d-org-navigation.jar
56 -rwxr-xrwx@ 1 matt matt 27547 17 Apr 2006 j3d-org-terrain.jar
8 -rwxr-xrwx@ 1 matt matt 2077 17 Apr 2006 j3d-org-texture.jar
112 -rwxr-xrwx@ 1 matt matt 53368 17 Apr 2006 j3d-org-util.jar
5784 -rw-r-xrwx 1 matt admin 2957997 31 Jul 21:41 j3dcore.jar
3336 -rw-r-xrwx 1 matt admin 1704635 31 Jul 21:41 j3dutils.jar
2200 -rw-r-xrwx 1 matt admin 1126370 31 Jul 21:39 jogl.jar
104 -rw-r-xrwx 1 matt admin 49800 31 Jul 21:39 libgluegen-rt.jnilib
5552 -rw-r-xrwx 1 matt admin 2838744 31 Jul 21:39 libjogl.jnilib
104 -rw-r-xrwx 1 matt admin 50312 31 Jul 21:39 libjogl_awt.jnilib
920 -rw-r-xrwx 1 matt admin 470352 31 Jul 21:39 libjogl_cg.jnilib
8 lrwxr-xr-x 1 root wheel 35 5 Nov 2007 libsvnjavahl.jnilib -> /usr/local/lib/libsvnjavahl-1.dylib
232 -rwxrwxrwx@ 1 matt matt 118119 11 Nov 2007 swing-layout.jar
624 -rw-r-xrwx 1 matt admin 318956 31 Jul 21:41 vecmath.jar
Re: Host Software on OS X crashes
August 03, 2008 06:49AM
Phew, I got it running.

1: the issue at hnd seems to be pretty common. Googeling for the error message got me a few hundred hits. After reading a lot of what to me is gibberish, I figured it is just a huge messup with GroupLayout beeing part of Swing for 1.5, but then beeing integral with 1.6. So I rechecked and even though I installed Java 1.6, "java-version" gives me java 1.5. Oooops!

2: The solution: well, first make sure you have the latest update of Java for OS X 1.5. Then launch Java Preferences and in the "General" tab, change the "Java Runtime Application Settings" to execute Java 1.6 as a first choice (funny drag'n'drop interface).

3: launch! Yay! The host software runs.

4: Next, I will try to compile the host software from scratch to be able to change serial communication to be compatible with my controller. So expect me bak in this Forum for more questions. I hope you don't mind.

Anyway. Thanks for your help. Couldn't have done it without you!

Matt
Re: Host Software on OS X crashes
November 22, 2009 11:42PM
I'm running on Mac OSX 10.5.8, with version 5 of Java.

I had the same original problem. So at the micro level, what I did was:

unjar reprap.jar into a fresh directory;

found reprap.properties (actually reprap.properties.dist, but that was the only .properties file there, so I went with it);

edited the property Port(name)--changed it from /dev/ttyS0 to /dev/tty.usbserial-A70063lu, same device used in the Arduino compiler/uploader thing;

saved the file;

rejared it up;

copied the new jar back to the main directory;

ran again;

and got the same damn message about not finding /dev/ttyS0.

I unjared into another directory just to verify that it was running against the modified version. It was. I did a grep -R to see if it was picking up ttyS0 somewhere else. No luck.

Anyone got any ideas? I must be doing something dumb.
Matt,

I'm trying to get as far as you have with the Mac 10.5 host software. When I try to launch the .sh file I get the following error. I was wondering where you found the wiki instructions about compiling.

Errors:
Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/PortInUseException
Caused by: java.lang.ClassNotFoundException: gnu.io.PortInUseException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)

Cheers!
Re: Host Software on OS X crashes
June 05, 2010 04:31AM
Taylor: You should find a reprap.properties file in ~/.reprap/ after running the host software for the first time. If you do not see it there, search for it, maybe OS X puts it in a different location? You can edit this file to ask the RepRap host software to use a different serial port (and to configure lots of other things, too!).

See Java_Software_Preferences_File for more about that file.

The error you are seeing (NoClassDefFound) suggests that java on your machine is not finding the RXTX serial libraries, or is finding an old or different version of them, perhaps??

Some USB to TTL cables under OSX create very "strange" serial device names, really long ones. I saw this on Wade's Macbook Pro at the San Mateo Maker Faire a couple of weeks ago. I don't have a Mac myself to test with.



Jonathan
Regarding "got the same damn message about not finding /dev/ttyS0"
When reprap comes up, hit preferences and put your desired device in the Port (Name) field. Then hit the create button before exiting the preferences screen. Next time you run, it will try the alternate device ...

I hope that helps. All I get is port already in use.
Sorry, only registered users may post in this forum.

Click here to login