This problem appears to be due to an issue with the the preview
updates presently available for Java. It appears that if the number of
arguments passed on the command line is greater than 25, the system
will report a segmentation violation. When the number of arguments is
25 or less, java is invoked correctly. In the sample below the jvm
returns a no class found error which is expected. The same test using
sudo does not hit the segmentation violation and invokes java
correctly regardless of the number of arguments. Netbeans startup
appears to be passing in more than 25 arguments hence causing the
segmentation violation.
Jon and I had done some troubleshooting on the problem by looking at
how the netbeans shell script was invoking java. The following excerpt
is from Jon's troubleshooting.
Based on your suggestion, I copied the NetBeans Java command into a
shell script, and started playing around. To my amazement, I
figured out the problem has nothing to do with the content of the
arguments to Java, just the number of them! Here is a grab from my
command line:
Any time I have more than 25 arguments to any command in the
<JAVA_HOME>/bin directory, it crashes! And to back up what I said
earlier, it doesn't crash if I execute the same with sudo. This same
behavior happens in sh, bash and zsh, but not in tcsh. Curious, no?
I'm not running the java preview updates and can't reproduce using
released versions of java.
Any suggestions on a solution for Jon?
Thanks,
Bob Potterveld
On Aug 29, 2008, at 1:05 PM, Jonathan Kaplan wrote:
I'm having exactly the same segmentation fault issue with NetBeans
after upgrading to Leopard. Here are the things I have tried (all
result in the same error):
- switch from Java 1.5 to Java 6
- create a new user account and launch NetBeans from there
- repair disk permissions
- remove Java and reinstall packages from the Leopard DVD
- install Java for Mac OS X 10.5, Update 2
- uninstall and reinstall NetBeans and associated files
- monitor for errors with dtruss and errinfo
From what I have seen, the error seems to happen during the "exec"
of Java, before any other system calls are made. As noted on the
nabble thread, if I repeat the same command with sudo, it works
perfectly. I've seen this happen with Java apps other than
NetBeans. I can also reliably cause identical segmentations faults
in Javadoc, which are also fixed by running with sudo, although I
don't know if that's related.
I'm at a loss for how to debug this. I assume there is no version
of Java with debugging symbols available, right? My next move is to
reinstall Leopard I guess.
Thanks in advance for any ideas,
Jonathan Kaplan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden