Hi,
I get a trouble while I'm going to call a method of a native C++ library. The JVM crashed with following error:
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000000000000, pid=2894, tid=140656179414784
#
# JRE version: Java(TM) SE Runtime Environment (8.0_60-b27) (build 1.8.0_60-b27)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C 0x0000000000000000
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /opt/bin/hs_err_pid2894.log
#
# 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 public declaration of this method:
virtual int SubscribeMarketData(char *ppTopics[], int nCount) = 0;
The proxy methods generated by JNAerator:
@Name("SubscribeData")
@Virtual(8)
public int SubscribeData(Pointer<Pointer<Byte > > ppTopics, int nCount) {
return SubscribeData(Pointer.getPeer(ppTopics), nCount);
}
@Name("SubscribeData")
@Virtual(8)
protected native int SubscribeData(@Ptr long ppTopics, int nCount);
My code is something like:
Pointer p = Pointer.pointerToCStrings("myTopic1");
int result = m_api.SubscribeData(p, 1); //<-- JVM crashed after this line executed.
The other methods in this library works well except this one, and according to the error report:
Seems that it's a memory allocate error. Not quite sure but I guess there might be something wrong with Pointer.pointerToCStrings.
I'm using BridJ 0.7.0 and JNAerator 0.12.
Do you have any idea about this or is it something that I'm doing wrong?
Hi, I get a trouble while I'm going to call a method of a native C++ library. The JVM crashed with following error:
The public declaration of this method:
The proxy methods generated by JNAerator:
My code is something like:
The other methods in this library works well except this one, and according to the error report:
Seems that it's a memory allocate error. Not quite sure but I guess there might be something wrong with Pointer.pointerToCStrings. I'm using BridJ 0.7.0 and JNAerator 0.12. Do you have any idea about this or is it something that I'm doing wrong?
Thank you in advance.