Java basic example crashes

The free CAN Software API (Application Programming Interface) for Windows®
Post Reply
fengels123
Posts: 8
Joined: Sun 2. Mar 2014, 10:14

Java basic example crashes

Post by fengels123 » Sun 2. Mar 2014, 10:50

Hi,
When I try to connect to the USB device, the application crashes by pressing the connect buttton
As channel I selected: PCAN_USBBUS1
Baus Rate: PCAN_BAUD_500K

I am using the 64bit version, JAVA demo 1.8.2 with java version 1.7.0_40

Can anyone help me?

#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007103c60c, pid=9480, tid=6264
#
# JRE version: Java(TM) SE Runtime Environment (7.0_40-b43) (build 1.7.0_40-b43)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.0-b56 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [EMET64.dll+0xc60c]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\fengels\AppData\Local\My Local Documents\Workspace\PeakCan\hs_err_pid9480.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Java basic example crashes

Post by PEAK-Support » Sun 2. Mar 2014, 22:31

please read here and here - looks like you mix up the 32 and 64 Bit DLLs (JNI and PCANBasic)
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

fengels123
Posts: 8
Joined: Sun 2. Mar 2014, 10:14

Re: Java basic example crashes

Post by fengels123 » Mon 3. Mar 2014, 15:09

I copied the dll's (PCANBasic_JNI.dll and PCANBasic.dll)in to the right dir c:\windows\system32 for the 32 bit files and C:\Windows\SysWOW64 for the 64 bit file, still did not work
I am using eclipse and set the path in the buidpath, but still the same error.
(libraries are also in C:\Users\engelsflm\AppData\Local\My Local Documents\Workspace\PeakCan\libs\win64)
javabuildpath.png
javabuildpath.png (80.07 KiB) Viewed 8167 times

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Java basic example crashes

Post by PEAK-Support » Mon 3. Mar 2014, 15:35

We have just tested it here with W7 and W8.1 on 32 and 64 Bit (both with 32Bit RT and on 64Bit also with 64Bit RT)
We use NetBeans Developer Environment - works fine - so it looks like a Eclipsed related problem - please ask Eclipse community. Our LIB, the JNI, PCANBasic DLL and also the Sample Code works fine.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

compauer
Posts: 11
Joined: Tue 4. Mar 2014, 11:05

Re: Java basic example crashes

Post by compauer » Thu 13. Mar 2014, 13:29

Had the same problem.
For me it helped to download the latest JDK.

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Java basic example crashes

Post by PEAK-Support » Thu 13. Mar 2014, 13:40

Works fine with Java 1.7_21 RT 32 & 64 Bit
Attachments
64BitRuntime on W7 64Bit OS
64BitRuntime on W7 64Bit OS
JAVA-64Bit-1.7.0_21.jpg (159.5 KiB) Viewed 8139 times
32BitRuntime on W7 64Bit OS
32BitRuntime on W7 64Bit OS
JAVA-32Bit-1.7.0_21.jpg (159.37 KiB) Viewed 8139 times
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Post Reply