Trouble shooting Linux start up

ricklon
Posts: 178
Joined: Sun May 22, 2011 6:59 am

Trouble shooting Linux start up

Post by ricklon » Tue May 24, 2011 10:48 pm

I've dug into this more. Here's what I found:

It's a requirement that you have Java, and librxtx-java installed. There is a bug in Sun Java version that doesn't include it in the path even if you have it installed. It's nicely documented here:
http://colinharrington.net/blog/2010/11 ... rxtxserial

In any case here's what you'll need to do.
If you know you don't have Java installed do:

Code: Select all

sudo apt-get install openjdk-6-jdk
Check for librxtx-java via:

Code: Select all

dpkg -l | grep rxtx
If not found do:

Code: Select all

sudo apt-get install librxtx-java
If you have more than one version of Java then you'll need to check which version of Java you are running. You can do this by typing:

Code: Select all

update-java-alternatives -l
This will list which version you have installed. Like:

Code: Select all

java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk
java-6-sun 63 /usr/lib/jvm/java-6-sun
The easiest solution is to select java-6-openjkd

Code: Select all

sudo update-java-alternatives -s java-6-openjdk
Once done you can double check by typing:

Code: Select all

java -version
Then run mpide again.
====
If you have to use the Sun JDK here are the options from the article.
1) don’t use sun-java but default-jre instead. This bug is actually a known bug in sun-java. (bug #325506)
2) add export LD_LIBRARY_PATH=/usr/lib/jni to your .bashrc, the .deskop file (in /usr/share/desktop), or on the command line before starting arduino

funlw65
Posts: 16
Joined: Wed May 25, 2011 5:59 am
Location: Romania
Contact:

Re: Trouble shooting Linux start up

Post by funlw65 » Wed May 25, 2011 6:40 am

Unfortunately, still does not work.

Code: Select all

user@pc:~$ dpkg -l | grep openjdk
ii  openjdk-6-dbg                         6b20-1.9.7-0ubuntu1                               Java runtime based on OpenJDK (debugging symbols)
ii  openjdk-6-jdk                         6b20-1.9.7-0ubuntu1                               OpenJDK Development Kit (JDK)
ii  openjdk-6-jre                         6b20-1.9.7-0ubuntu1                               OpenJDK Java runtime, using Hotspot JIT
ii  openjdk-6-jre-headless                6b20-1.9.7-0ubuntu1                               OpenJDK Java runtime, using Hotspot JIT (headless)
ii  openjdk-6-jre-lib                     6b20-1.9.7-0ubuntu1                               OpenJDK Java runtime (architecture independent libraries)
user@pc:~$ dpkg -l | grep rxtx
ii  librxtx-java                          2.2pre2-1                                         Full Java CommAPI implementation
user@pc:~$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1)
OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)
user@pc:~$
Also, LD_LIBRARY_PATH is set, after reboot and mpide launch, I still get this error:

Code: Select all

user@pc:~$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1)
OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)
user@pc:~$
user@pc:~$ mpide/mpide
0 [main] DEBUG processing.app.Base  - DEBUG: Logging enabled.processing.app.Base
1382 [main] DEBUG processing.app.Base  - DEBUG:start: rebuilding import menu
Exception in thread "main" java.lang.NullPointerException
	at processing.app.Base.rebuildImportMenu(Base.java:1006)
	at processing.app.Editor.buildSketchMenu(Editor.java:640)
	at processing.app.Editor.buildMenuBar(Editor.java:485)
	at processing.app.Editor.<init>(Editor.java:208)
	at processing.app.Base.handleOpen(Base.java:732)
	at processing.app.Base.restoreSketches(Base.java:393)
	at processing.app.Base.<init>(Base.java:310)
	at processing.app.Base.main(Base.java:208)

P.S. Theme is nice but not suitable for a forum where user code and error message are posted. The theme must be wider...

ricklon
Posts: 178
Joined: Sun May 22, 2011 6:59 am

Re: Trouble shooting Linux start up

Post by ricklon » Wed May 25, 2011 3:52 pm

That's good feeback.

That kind of error indicates something is wrong in the path to Libraries.
1382 [main] DEBUG processing.app.Base - DEBUG:start: rebuilding import menu

Not guaranteed, but it's possible that some file got corrupted at some point in the process of download, or unpacking. There are a lot files that have to unpack properly.

hfb3
Posts: 3
Joined: Wed May 25, 2011 10:17 pm

Re: Trouble shooting Linux start up

Post by hfb3 » Wed May 25, 2011 11:21 pm

I've read a couple posts that mention problems with librxtxSerial. After
further research, I found that mpide-0022-chipkit-linux32-20110520
includes librxtxSerial64.so. I'm running a 32 bit version of Slackware.
My simple fix was to just transfer the librxtxSerial.so file from ~/arduino-0022/lib/ to
~/mpide-0022-chipkit-linux32-20110520/lib/.

funlw65
Posts: 16
Joined: Wed May 25, 2011 5:59 am
Location: Romania
Contact:

Re: Trouble shooting Linux start up

Post by funlw65 » Thu May 26, 2011 9:43 pm

hfb3 wrote:I've read a couple posts that mention problems with librxtxSerial. After
further research, I found that mpide-0022-chipkit-linux32-20110520
includes librxtxSerial64.so. I'm running a 32 bit version of Slackware.
My simple fix was to just transfer the librxtxSerial.so file from ~/arduino-0022/lib/ to
~/mpide-0022-chipkit-linux32-20110520/lib/.
I did it but no effect on my side (I even renamed the original Arduino library to have the exact name as mpide library). But I think it was not my problem.

I also downloaded the mpide archive again and same result: it trows the error on console and stuck.

Best regards.

ricklon
Posts: 178
Joined: Sun May 22, 2011 6:59 am

Re: Trouble shooting Linux start up

Post by ricklon » Thu May 26, 2011 10:52 pm

I'll see if I can install a 32 bit slackware and compare results. That might be the best course of action. I've test on Ubuntu 10.10, 11,04.

What's the PWD for the path your in when you run it? Also, the error message in the ticket you posted is that the complete error message? I could more info there was any to figure out what's going on. From the message the seems to be a problem importing from the libraries folder. That would be ./hardware/pic32/libraries if that directory doesn't exist there would a problem. Another thing to check is the permission on the compiler and that they are executable.

funlw65
Posts: 16
Joined: Wed May 25, 2011 5:59 am
Location: Romania
Contact:

Re: Trouble shooting Linux start up

Post by funlw65 » Thu May 26, 2011 11:37 pm

All binaries are executable. Here are attached screenshots with the tree of mpide folders. Not the entire tree is expanded.
Yes, the error message I posted is the only one.
Attachments
mpide03.png
mpide03.png (120.43 KiB) Viewed 6625 times
mpide02.png
mpide02.png (128.88 KiB) Viewed 6625 times
mpide01.png
mpide01.png (172.92 KiB) Viewed 6625 times

funlw65
Posts: 16
Joined: Wed May 25, 2011 5:59 am
Location: Romania
Contact:

Re: Trouble shooting Linux start up

Post by funlw65 » Thu May 26, 2011 11:39 pm

Here, another one with an empty "include" folder, don't know if is normal...

Also, I didn't got it, you said you already tested it under Ubuntu 10.10 ?!?
Attachments
mpide04.png
mpide04.png (102.47 KiB) Viewed 6625 times

funlw65
Posts: 16
Joined: Wed May 25, 2011 5:59 am
Location: Romania
Contact:

Re: Trouble shooting Linux start up

Post by funlw65 » Fri May 27, 2011 2:22 am

I think I found it...
Your mpide uses the same hidden ".arduino" folder for saving the settings. As I used Arduino IDE before, he created ".arduino" folder and wrote his preferences.

At mpide launch, it will never start. I erased the ".arduino" folder and launched mpide and this time I have your modified Arduino IDE window on my display :)
Still a little warning:

Code: Select all

Stable Library
=========================================
Native lib Version = RXTX-2.2pre2
Java lib Version   = RXTX-2.1-7
WARNING:  RXTX Version mismatch
	Jar version = RXTX-2.1-7
	native lib Version = RXTX-2.2pre2
but I will not go further as I don't have a chipkit board (at least, I'm glad I've contributed a little).

But you must fix this. I have my own tuned version of Arduino for my Sanguino board (EvB 4.3v4) and maybe others will like to keep their tuned Arduino (at least, until they will gain trust on your IDE).

Best regards,
Vasi

P.S. You can close the issue on github ...

ricklon
Posts: 178
Joined: Sun May 22, 2011 6:59 am

Re: Trouble shooting Linux start up

Post by ricklon » Fri May 27, 2011 3:26 am

That is a really good find. Thank you for working through this with me.

I'll get that fixed.

Post Reply