Home/Support/Support Forum/JAVA ERROR - EXCEPTION_ACCESS_VIOLATION (0xc0000005)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

JAVA ERROR - EXCEPTION_ACCESS_VIOLATION (0xc0000005)

0 votes
Dear Sirs,

I´m trying to configure a JAVA application according to the document XBeeZigBeeMeshKit-3407988-161117-1253-23711.pdf.
I have the kit XKB2-Z7T-WTZM XBee S2D ZigBee.

When I´m running the application I received the following message:

+
+
| Receive Analog Data Sample |
+
+

WARNING: RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000001800044cb, pid=3780, tid=11900
#
# JRE version: Java(TM) SE Runtime Environment (9.0+11) (build 9.0.1+11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (9.0.1+11, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C [rxtxSerial.dll+0x44cb]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\AGROWING\WORKSPACE\ReceiveAnalogData\hs_err_pid3780.log
[thread 12460 also had an error]
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

The program is:

/**
* Copyright (c) 2015 Digi International Inc.,
* All rights not expressly granted are reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
* =======================================================================
*/
package com.digi.xzmk.receiveanalogdata;

import com.digi.xbee.api.RemoteXBeeDevice;
import com.digi.xbee.api.XBeeDevice;
import com.digi.xbee.api.exceptions.XBeeException;
import com.digi.xbee.api.io.IOLine;
import com.digi.xbee.api.io.IOSample;
import com.digi.xbee.api.listeners.IIOSampleReceiveListener;

/**
* XBee ZigBee Mesh Kit Receive Analog Data Sample application.
*
* <p>This sample Java application shows how to receive analog data from
* another XBee device on the same network using the XBee Java Library.</p>
*/
public class MainApp {

/* Constants */

// TODO Replace with the port where your coordinator module is connected to.
private static final String PORT = "COM3";
// TODO Replace with the baud rate of your coordinator module.
private static final int BAUD_RATE = 9600;
// Analog lines to monitor.
private static final IOLine[] LINES = new IOLine[] {IOLine.DIO2_AD2, IOLine.DIO3_AD3};
// Analog sample listener.
private static AnalogSampleListener listener = new AnalogSampleListener();

/**
* Application main method.
*
* @param args Command line arguments.
*/
public static void main(String[] args) {
System.out.println("+
+");
System.out.println("| Receive Analog Data Sample |");
System.out.println("+
+\n");

XBeeDevice myDevice = new XBeeDevice(PORT, BAUD_RATE);

try {
myDevice.open();

System.out.println("\nListening for IO samples... Rotate the potentiometer of any remote device.\n");

myDevice.addIOSampleListener(listener);

} catch (XBeeException e) {
e.printStackTrace();
myDevice.close();
System.exit(1);
}
}

/**
* Class to manage the received IO data.
*/
private static class AnalogSampleListener implements IIOSampleReceiveListener {
@Override
public void ioSampleReceived(RemoteXBeeDevice remoteDevice, IOSample ioSample) {
for (IOLine line : LINES) {
if (ioSample.hasAnalogValue(line)) {
int value = ioSample.getAnalogValue(line);
System.out.println("Analog data from '" + remoteDevice.get64BitAddress() +
"': " + value);
}
}
}
}
}

The complete log is:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000001800044cb, pid=13108, tid=9184
#
# JRE version: Java(TM) SE Runtime Environment (9.0+11) (build 9.0.1+11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (9.0.1+11, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C [rxtxSerial.dll+0x44cb]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

S Y S T E M

OS: Windows 10 , 64 bit Build 16299 (10.0.16299.15)

CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 61 stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, fma

Memory: 4k page, physical 8288764k(3233528k free), swap 15366652k(8822980k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (9.0.1+11) for windows-amd64 JRE (9.0.1+11), built on Sep 28 2017 04:54:03 by "mach5one" with MS VC++ 12.0 (VS2013)

END.

I could not found the problem. Can you help me??

Thanks!
asked Nov 22, 2017 in Python by hferretti New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
hello

i have the same problem. where you able to solve it?

regards
answered Mar 1, 2018 by relash New to the Community (2 points)
...