FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Software Bugs
(Moderator: fry)
   v68: code folder bug
« Previous topic | Next topic »

Pages: 1 2 3 
   Author  Topic: v68: code folder bug  (Read 3346 times)
mattgilbert

tangramkid WWW Email
Re: v68: code folder bug
« Reply #15 on: Apr 16th, 2004, 6:16am »

When I download processing versions 66-69 for mac, and look for the RXTXcomm.jar file in the lib folder of each one, I come up with nothing. With all these version installed, a search of my entire hard drive for "RXTXcomm.jar" or even just "RXTXcomm" or "comm" comes up with nothing.
 
My friend who uses Mac OSX and processing 68 doesn't have the file either.
 
I did find a file by that name in the Linux version of Processing 68. But putting it in the code folder didn't help any. Putting it in the lib folder didn't help either.
 
If any Mac OSX users have this file, I'ld love it if you could send it to me: matt at mattgilbert dot net.
 
If I'm supposed to have this file, something really weird is going on.
 
Matt
 
 
***Added later***
 
So then I tried installing RXTX myself onto my machine. I installed it fine, then found the RXTXcomm.jar file and put it in my code folder and Processing's lib folder. When I try to run a processing sketch that uses both serial and sonia libraries, it seems to recognize the new RXTX stuff, because when the sketch is starting up, the debug window says:
 
Devel Library
=============================
Native lib Version = RXTX-2.1-7pre7
Java lib Version   = RXTX-2.1-7pre7
JSyn using native library JSynV142
JSyn for OS X, Built 5/5/03.
Input Device #0: Built-in Audio has 2 channels
Input Device #1: Built-in Audio has 2 channels
 
The first 4 lines weren't there before I installed RXTX. It's worth noting that it says the same thing when a copy of the RXTXcomm.jar file is not in the code folder. Also, whether or not the RXTXcomm.jar file is in the lib folder doesn't seem to make a difference either. With everything I've tried, the sketch still doesn't receive serial events. (The sound stuff works as usual, though, and like i said before, a sketch that uses the serial library and not a code folder or the sonia library works wonderfully.)
 
I don't know if that helps at all, but I'm trying to do as much as I can to define the problem on my end.
 
Matt
« Last Edit: Apr 16th, 2004, 9:23am by mattgilbert »  
fry


WWW
Re: v68: code folder bug
« Reply #16 on: Apr 16th, 2004, 6:37pm »

k, appears that there's a goof with the mac distro that it doesn't include the jar file. but the weird thing is that i don't know why it would be working at all for you, versus just not when run in java mode.
 
serial works when not using a code folder for you, right?
 
(those four lines are RXTX jabbering that it's installed.. however, you're using a different version than what's supposed to be included with p5, so that's gonna give you trouble prolly)
 
update, a copy of the rxtx comm file:  
http://acg.media.mit.edu/people/fry/temp/RXTXcomm.jar
try placing this in your 'code' folder, along with libSerial.jnilib and hopefully that'll get things on track...
« Last Edit: Apr 16th, 2004, 6:44pm by fry »  
mattgilbert

tangramkid WWW Email
Re: v68: code folder bug
« Reply #17 on: Apr 16th, 2004, 7:54pm »

it's not fixed yet, but i think i found a useful clue.
 
when I include this line of code:
println(gnu.io.RXTXVersion.getVersion());
in the setup() method, the sketch that uses only serial and works fine (has always worked fine, even before I tried installing RXTX myself), always prints "RXTX-1.5-667". This is the same version as the download you provided, and so whatever RXTXcomm.jar file it's looking to (I haven't figured out where it's looking) is the right one.  
 
However, when I run the sketch that uses serial and sonia (and a code folder), with the same version check, it prints "RXTX-2.1-7pre7". We allready knew that it was using the wrong version, but here's the real clue:
 
The serial/sonia sketch reports "RXTX-1.5-667" only when I replace the RXTXcomm.jar file in the /Library/Java/Extensions folder with the 1.5-667 version. Putting the 1.5-677 version file in the sketch's code folder, the lib folder, or the Processing folder doesn't change anything. It only reports the 1.5-667 version when I replace the RXTXcomm.jar file that's used by everything else java on my computer.  
 
So, to recap, it seems that a sketch with no code folder sees the correct version of RXTX (RXTX-1.5-667),  although I don't know where it's looking to find that file, and a sketch with a code folder and sonia is looking to the OS's RXTXcomm.jar file, and it isn't looking for it anywhere in the Processing folder.
 
However, even when the correct rxtx version is in the Library/Java/Extensions folder, the sketch with the code folder and sonia still doesn't recieve serial events while the sketch with no code folder does.
 
Does that clear anything up?
 
Matt
 
 
« Last Edit: Apr 16th, 2004, 7:56pm by mattgilbert »  
fry


WWW
Re: v68: code folder bug
« Reply #18 on: Apr 16th, 2004, 8:41pm »

k.. so the 1.5 version is the one that you want. it soudns like there's some other app that might have the rxtx stuff installed in your CLASSPATH somehow, and that seems to be affecting things. but that's a guess.
 
also, you may need to restart processing in-between attempts on this stuff, if you're not doing so already. who knows how the dynamic loading works on the mac. it may not be so dynamic.
 
things to try:  
 
1. keep that RXTXcomm.jar in your /System/Library/Java/Extensions/ folder, and copy libSerial.jnilib to  
/System/Library/Frameworks/JavaVM.framework/Libraries
 
2. hopefully you've tried this one, but remove the RXTXcomm.jar from Extensions (and the libSerial.jnilib from Libraries) and put them both in your 'code' folder. thoguh i think what we're finding is that the mac doesn't seem to like that idea for libs.  
 
3. panic
 
4. report back and we'll try more things. sorry this is a pain in the ass.
 
mattgilbert

tangramkid WWW Email
Re: v68: code folder bug
« Reply #19 on: Apr 16th, 2004, 9:50pm »

tried those things, here's what happens:
 
1. no change.
 
2. i hadn't tried this one before, and when i did, the sketch passed this error:
 
java.lang.UnsatisfiedLinkError: no Serial in java.library.path thrown while loading gnu.io.RXTXCommDriver
Esception in thread "main" java.lang.UnsatisfiedLinkError: no Serial in java.library.path
  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
  at java.lang.Runtime.loadLibrary0(Runtime.java:78
  at java.lang.System.loadLibrary(System.java:834)
  at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
 
so that doesn't seem to work.
 
3. panicing was fun, but it didn't change anything.
 
4. so here i am. don't worry, it's not such a pain. i only hope that this is helpful to the development of processing and not just a nuisance to you.
 
Matt
 
 
 
 
fry


WWW
Re: v68: code folder bug
« Reply #20 on: Apr 16th, 2004, 10:57pm »

another idea.. it's about the two versions of java. so p5 uses java 1.3, where just running java externally (with a code folder) runs java 1.4 (the system default). rxtx might not work with 1.4.
 
to test the hypothesis (the fix comes later):
 
open Processing.app -> "show package contents" -> Contents/Resources/MRJApp.properties
 
and remove the # in front of this line:
#com.apple.mrj.application.JVMVersion=1.3+
to make it:
com.apple.mrj.application.JVMVersion=1.3+
 
and put a # in front of the later line that reads:
com.apple.mrj.application.JVMVersion=1.3.1
 
this will move you to java 1.4. then, try running the serial example with no serial folder, and see if it's broken. if so, that at least tells us where the workaroudn needs to be..
 
mattgilbert

tangramkid WWW Email
Re: v68: code folder bug
« Reply #21 on: Apr 17th, 2004, 4:33am »

i did as you said, and it broke the serial-with-no-code-folder sketch. When run, it passes this error:
(in the top of the debug window)
You need to modify your classpath, sourcepath, bootclasspath, and/or extdirs setup. Package "netscape/javascript" could not be found in:  
 
(then in the lower part)
lib/build/Temporary_1926_6993.java:1:200:1:218: Semantic Error: You need to modify your classpath, sourcepath, bootclasspath, and/or extdirs setup. Package "netscape/javascript" could not be found in:
...
 
And then a whole bunch of file directory paths where java stuff is supposed to be, such as "/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/clas ses.jar"
and similar stuff. I would copy and paste them all, but  there are maybe 50, and anyway you get the idea. (Also, I can't seem to copy and paste stuff from the debug window. I always have to retype it.)
 
Matt
 
 
 
 
 
fry


WWW
Re: v68: code folder bug
« Reply #22 on: Apr 17th, 2004, 6:07pm »

k, that's helpful.. that means rxtx 1.5 doesn't work with java 1.4, as suspected. which means i need to either 1) hack p5 to explicitly launch 1.3 as the external vm, requiring a new release or 2) hack the serial stuff to make rxtx 2.1 work.  
 
(also helpful is the error re: netscape/javascript, since that means that the javascript classes are no longer included in 1.4, thus some of the weird errors that people have been seeing elsewhere. so that solves another mystery.)
 
unfortunately rxtx is really finicky and 2.1 isn't likely to work out of the box. it might be worth trying, though. to do so:
 
1. remove Processing.app/Contents/Resources/Java/RXTXcomm.jar (that's where the comm.jar is that i couldn't recall).  
 
2. download this release of rxtx:
ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz
and from the MACOSX_IDE\ForPackageMaker\Install\Library\Java\Extensions subfolder of that archive, copy RXTXcomm.jar to your /System/Library/Java/Extensions/ folder, and copy libSerial.jnilib to  
/System/Library/Frameworks/JavaVM.framework/Libraries
 
3. put a copy of that RXTXcomm.jar inside Processing.app (where you removed the 1.5 from) and replace the libSerial.jnilib from the "Processing 69" folder.  
 
4. set the java version of Processing.app to 1.4, and check to see if serial will work in a non-code folder situation.  
 
4a. if not, set java back to 1.3 and try that. if that's not working, then 2.1 is useless and needs more testing.
 
4b. if it works in 1.4, then you're just about solved, and adding the code folder in shouldn't be a problem anymore.
 
5. you'll need a copy of netscape.javascript, so that you don't get all that error spew. in that linux copy of processing, there should be a 'netscape' folder that's a subfolder of 'lib'. you can drop that into the 'lib' folder of your mac copy of processing. or, unzip jaws.jar from /System/Library/Frameworks/JavaVM.framework/Versions/1.3.1 and pull the netscape folder from there.
 
mattgilbert

tangramkid WWW Email
Re: v68: code folder bug
« Reply #23 on: Apr 17th, 2004, 8:08pm »

By the way, I'm using Processing 68 instead of 69. While I tried 69 because of the code folder fix that it was said to have, it didn't work for me and i was having other errors when I tried to dump projects from 68 directly over to 69, so I just stuck with 68. I hope all these suggestions and things you've been giving me aren't 69 specific. If so, oops. I guess I should have made that clearer along the way. Let me know if I whould repeat any of these experiments in 69 before moving on.
 
 
I tried your suggestiongs anyway, and here are my results:
 
Having done all the file replacements you said, and working in java 1.4:
 
For 5), moving the netscape/javascript folders into the lib folder didn't change anything. It still passed the same error looking for those folders. So I took a closer look at the error message and all the folders that it complained it couldn't find the netscape/javascript stuff in. The lib folder wasn't listed, so it apparently wasn't looking for it there, BUT the "/Applications/Processing 68/Processing.app/Contents/Resources/Java/build" folder was listed. That folder didn't exist, but I made it, and put the netscape/javascript stuff in there. That made it stop passing the error message. (If you want to see the complete error message, with all the folders it looked for the netscape/javascript folder in, it is here: http://www.mattgilbert.net/netscapeFolderErrorGrab.gif )
 
So it stopped passing that error message, but it still works as before when it's set to use java 1.4: The sketch with only serial stuff and no code folder works fine, and the sketch with serial and sonia and a code folder doesn't receive serial events. (It does do one thing differently; when closing the sketch with a code folder, it passes this error: http://www.mattgilbert.net/ErrorOnClose.gif . This doesn't cause any real problem, since I'm closing the sketch at that point anyway.)
 
So, in response to 4) on your list, the non-code folder sketch works with the new RXTX files and java 1.4
 
But, in response to 4b) on your list, adding in the code folder actually does screw things up, same as before, except for this added error message: http://www.mattgilbert.net/ErrorOnClose.gif . Setting Processing back to work with java 1.3 makes the sketches behave the same way, but without this error coming up.
 
Matt
 
 
 
 
fry


WWW
Re: v68: code folder bug
« Reply #24 on: Apr 17th, 2004, 8:19pm »

could you verify that you're in fact running java 1.4 with the non code folder serial sketch, and that the rxtx is version 2.1,  
 
println(System.getProperty("java.version"));
println(gnu.io.RXTXVersion.getVersion());
 
also, i'd try also using the full setup (java 1.4, rxtx 2.1, netscape libs) on rev 69, since that does things slightly differently (hopefully better) for the libs.  
 
this is one of those times i wish i could be just sitting at your machine because we could just try a few dozen things and get it straightened out, but oh well..
 
mattgilbert

tangramkid WWW Email
Re: v68: code folder bug
« Reply #25 on: Apr 17th, 2004, 8:44pm »

aw, hell.
 
using:
println(System.getProperty("java.version"));
println(gnu.io.RXTXVersion.getVersion());  
 
both sketches report:
1.4.2_03
RXTX-1.5-667
 
now double checking the versions of all the RXTX files in their respective locations... will get back to you.
 
matt
 
 
*****Added later*****
 
I don't get it, but the file at rxtx-2.1-7pre17/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensio ns/RXTXcomm.jar is version 1.5-667 . Apparently, that release has different versions for different operating systems. I could dig up a 2.1-7pre17 version that was meant for a different OS, I guess, but there's probably a good reason that the mac os x version that was distributed is different.
 
Matt
 
 
****Added later****
 
I asked the rxtx guys about that file, and apparently it's a mistake and they are going to fix it for an upcoming release.
 
Matt
 
 
« Last Edit: Apr 17th, 2004, 10:57pm by mattgilbert »  
fry


WWW
Re: v68: code folder bug
« Reply #26 on: Apr 18th, 2004, 7:46pm »

mistake as in it's actually 2.1? or that they forgot to update that file to 1.5?
 
unfortunately with it working in 1.4 i'm now stumped as to what it's doing differently with the sonia stuff. i need to figure out who scammed by serial adapter and try to replicate the problem on my machine here to see if i can get a fix. grrr.
 
mattgilbert

tangramkid WWW Email
Re: v68: code folder bug
« Reply #27 on: Apr 18th, 2004, 9:00pm »

i meant that the file at rxtx-2.1-7pre17/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensio  ns/RXTXcomm.jar is version 1.5-667, which is a mistake, and it should be 2.1. Even the text document explaining installation on MacOSX was refering to 1.5.  
 
I tried just compiling it from the source, (in "src" folder), but I don't really understand how and so I only got halfway done&#8211;I got the RXTXcomm.jar file of the right version (2.1-7pre17), but not the libSerial.jnilib file. So now, Processing shows this error in the debug window on startup:
 
 Devel Library
=============================
Native lib Version = RXTX-2.1-7pre12
Java lib Version   = RXTX-2.1-7pre17
WARNING:  RXTX Version mismatch
  Jar version = RXTX-2.1-7pre17
  native lib version = RXTX-2.1-7pre12
 
I take that to mean that the libSerial.jnilib I'm using is version 2.1-7pre12 while the RXTXcomm.jar is 2.1-7pre17. Under these conditions, both of the sketches, with and without code folders, print RXTX-2.1-7pre17 as their version when I use println(gnu.io.RXTXVersion.getVersion());, and they both behave the same as before (still no serialEvents with a code folder).
 
Maybe someone has a libSerial.jnilib file (or librxtxSerial.jnilib file, whichever is appropriate) that's the right version that I can try?
 
Matt
 
 
 
ashtonium

kravdraard WWW Email
Re: v68: code folder bug
« Reply #28 on: Apr 26th, 2004, 2:00am »

any solution to this problem thus far?  how about for PC?
 
running: WinXP pro with 68 and trying desperately to bring sonia into a serial controled project of mine.
 
I tried the listed solution i found in another thread (copying win32com.dll, comm.jar and javax.comm.properties into the code folder).  I no longer get any errors, but serial communication is still not functioning when i have the code folder present (as noted by others, it works fine without the code folder).
 
ideas? suggestions? any other files i should copy into the code folder?
-kevin
 
mKoser

WWW Email
Re: v68: code folder bug
« Reply #29 on: Apr 26th, 2004, 2:07am »

so far, no solutions have come up ... not sure (don't have time to try things out in detail right now) but try using 0067 instead, that might work. (don't quote me on it though!)
 
+ m
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
Pages: 1 2 3 

« Previous topic | Next topic »