DynamixelSDK
DynamixelSDK copied to clipboard
Java Crash Dynamixel\nbproject\build-impl.xml:970: Java returned: -1073740940
- Which DYNAMIXEL SDK version do you use?
- ex)
3.7.31
- Which programming language/tool do you use?
- ex) Java
- Which operating system do you use?
- ex)
Windows 10
- Which USB serial converter do you use?
- ex)
U2D2
- Which DYNAMIXEL do you use?
- ex)
AX-12W
,AX-18W
-
Have you searched the issue from the closed issue threads? yes
-
Please describe the issue in detail. While running the program will instantaneously crash for no apparent reason at random parts of the code. Sometimes it will run 3-4 or more minutes before a crash. My question is about the error message and how can I generate more specific data about the error? Line 970 of the build-impl.xml is:
Hi @mturktest123 If you can provide more detailed condition to reproduce this issue(such as attaching a full code), it would be greatly helpful to identify the problem. For debugging the Java program using Eclipse IDE, please see below posting from the Eclipse foundation. https://www.eclipse.org/community/eclipse_newsletter/2017/june/article1.php Thank you.
I probably need to provide more diagnostics - if you have any additional specifics that you'd like to see let me know.
https://github.com/mturktest123/Dynamixel_JavaProblem.git
This runs two arms with 4 motors each (total of 8 motors). The second arm mimics the first arm - the first arm is manipulated manually to set a position and the second arm replicates the position of the first arm. I ran this several times without the 8 arm motors connected and it didn't crash (not sure if it would eventually crash without the arms connected or not if I tried more times). Once I connected the arms it failed on the first run with the following output. Sometimes in the past I have been able to run the arms normally for a longer period of time (many minutes) and exit the program normally without errors. One thing I've considered is weather the port and related connections are closing correctly upon exits (especially crashes) and how that might affect the next time I run the code - I don't know what launch steps to include to ensure the connections are working properly before causing a crash. Thanks for any insights you can provide.
ant -f C:\Users\allan\Documents\allan_github\Dynamixel_JavaProblem -Dnb.internal.action.name=run run init: Deleting: C:\Users\allan\Documents\allan_github\Dynamixel_JavaProblem\build\built-jar.properties deps-jar: Updating property file: C:\Users\allan\Documents\allan_github\Dynamixel_JavaProblem\build\built-jar.properties compile: run: made it here BaudRate: 1000000; motorNumber: 0 Torque 0 set to 1000 BaudRate: 1000000; motorNumber: 1 Torque 1 set to 1000 BaudRate: 1000000; motorNumber: 2 Torque 2 set to 1000 motor3 pos: 576 BaudRate: 1000000; motorNumber: 3 Torque 3 set to 1000 motor4 pos: 545 BaudRate: 1000000; motorNumber: 4 Torque 4 set to 0 motor5 pos: 585 BaudRate: 1000000; motorNumber: 5 Torque 5 set to 0 motor6 pos: 457 BaudRate: 1000000; motorNumber: 6 Torque 6 set to 0 motor7 pos: 647 BaudRate: 1000000; motorNumber: 7 Torque 7 set to 0 motor8 pos: 434 C:\Users\allan\Documents\allan_github\Dynamixel_JavaProblem\nbproject\build-impl.xml:1333: The following error occurred while executing this line: C:\Users\allan\Documents\allan_github\Dynamixel_JavaProblem\nbproject\build-impl.xml:938: Java returned: -1073740940 BUILD FAILED (total time: 5 seconds)
Perhaps this will inspire someone who is knowledgeable in this arena to weigh in - it appears that I'm crashing the JVM due to JNA problems: https://www.baeldung.com/java-jna-dynamic-libraries "As mentioned before, JNA does not protect us from misusing a given API, especially when dealing with memory buffers passed back and forth native code. In normal situations, such errors result in an access violation and terminate the JVM."