|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
An Enjoyable(Not) Java Compiler Error (Stack Guard) and ELFCLASS32 *Not Solved*
Whenever I try to run a project, my debug window shows a Java Stack Guard Error. This one to be exact:
Code:
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /tmp/libwpilibJavaJNI4147524003046367514.so which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'. Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libwpilibJavaJNI4147524003046367514.so: /tmp/libwpilibJavaJNI4147524003046367514.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) Code:
execstack -c /tmp/libwpilibJavaJNI4147524003046367514.so Paying attention to the file I see it is wpilib related. I have been using the toast api, but it doesn't look like it was that. I also had a failed installation of frcsim (I have Ubuntu 15.04 not 14.04 so it would not work ): ) Has anyone had this problem and fixed it or know how to fix it? Is this frcsim related or toast or wbilib error or something I am unaware of? Any help is appreciated. Thanks in advance! /* *----------EDIT---------- * */ It appears that the Stack Guard error may be caused by Code:
the wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) Last edited by maglax : 26-06-2015 at 03:05. Reason: More information |
|
#2
|
|||
|
|||
|
Re: An Enjoyable(Not) Java Compiler Error (Stack Guard)
Are you accidently trying to run the code on the simulator (by choosing the "WPILib Java Simulation" rather than "WPILib Java Deploy" in the Run As dialog or some other reason)?
That is the only reason I could think of that a native library would be needed on your computer. If you are using a 64bit Java VM, then loading the 32bit simulation library could possibly cause this issue. |
|
#3
|
||||
|
||||
|
Re: An Enjoyable(Not) Java Compiler Error (Stack Guard)
Quote:
Quote:
e/ well maybe the compiled file invokes the JNI on the roboRIO but it shouldn't be executed compile-tile |
|
#4
|
|||
|
|||
|
Re: An Enjoyable(Not) Java Compiler Error (Stack Guard)
This is just the jar that contains the robot code for the roboRIO trying to run on your machine, which is wrong.
You need to deploy the jar to your robot. I think you can do this in Eclipse with the WPILib plugins by right clicking on the project then Run As > WPILib Java Deploy. Alternatively, you can run 'ant deploy' on the command line in your source directory. |
|
#5
|
||||
|
||||
|
Re: An Enjoyable(Not) Java Compiler Error (Stack Guard)
Quote:
Last edited by maglax : 26-06-2015 at 18:02. |
|
#6
|
|||
|
|||
|
Re: An Enjoyable(Not) Java Compiler Error (Stack Guard)
It looks like this bug might be specific to Toast and how you have your system set up, so you might get more help by talking to the Toast API developer directly, as not many people on CD have used Toast.
|
|
#7
|
||||
|
||||
|
Re: An Enjoyable(Not) Java Compiler Error (Stack Guard)
Hey there, I'm the Dev behind Toast. The problem you're having is indeed related to Toast. If you're running Eclipse or IntelliJ IDEA (and have the latest version of the Toast Release), running 'gradlew eclipse' or 'gradlew idea' should be enough to generate the Run Configurations for you.
Alternatively, adding the argument '-sim --search' or '-sim [your.robot.Class]' should be enough to make Toast both start in Simulation Mode and find your ToastModule class. If you're running from the command line, these arguments are just appended to the command, i.e. 'java -jar Toast.jar -sim --search'. In Eclipse and IntelliJ IDEA, this is found under the 'Launch Configurations' window. Hopefully this fixes everything, have fun! |
|
#8
|
||||
|
||||
|
Re: An Enjoyable(Not) Java Compiler Error (Stack Guard)
Quote:
So just checking, I should have my workspace located in the release folder of the Toast API directory and that is where ./gradlew eclipse should be run? It may also be that I am understanding toast wrong? Do I program it the same way as a regular robot? Last edited by maglax : 27-06-2015 at 00:52. |
|
#9
|
||||
|
||||
|
Re: An Enjoyable(Not) Java Compiler Error (Stack Guard)
The Toast Repository shouldn't be downloaded for your module. Download the Universal Release and extract the Toast.zip file to where you wish to have your module. From there you can run ./gradlew eclipse and your Module will be setup for you.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|