Current position:  Home > Default > Causing the JNI code to crash "properly"

Causing the JNI code to crash "properly"

Time:November 30
Advertisement
Hi,
I have some code written in C and liked to Java using JNI.
When I run it (even from the Visual C++ environment) and the code gets an exception in C, the JVM catches it and closes up nicely with an error.
What can I do to remove this behavior and let it crash - this will cause Visual C++ debugger to catch it and show me where the crash is.
Thanks,
Tsahi
Advertisement
Hi,
I've got 2 problems with this:
1. I'm writiing code in pure ANSI C - so try/catch doesn't work for me in the long run - just as a way of debugging a specific problem.
2. I need something that will crash - not something that will get over it, but something that will be able to show me the exact problem, along with a backtrace, values of variables, and the ability to use a debugger to check the memory while I'm at it.
I will try it though, so thanks a lot

JVM Seg Fault With Multithreaded JNI Code

-0001-11-30

Hello all: I'm having a problem with a multi threaded application. The application is used to bridge an exsisting C++ application with an exsisting Java application so I went with a JNI implementation. After I completed my implementation, I found tha

JVM core dump - JNI code

-0001-11-30

I am using JNI in my Java application , 12 hours after running my test case get a JVM crash - 1) These are the parameters with which i invoke my Java program java -d64 -Xcheck:jni -Xmx2560M -Xms2560M -Xss256k RunQueries 2) The Heap output at the time

Abstract class causes JNI GetByteArrayElements to crash

-0001-11-30

I'm having a problem with a subclass of an abstract class that is accessing a JNI function. I'm using Java 1.4.2. I started out with a single class that reads data from a serial port (via a JNI call) and then parses the data. When I test this class,

JNI and Threads Crashes

-0001-11-30

Hi, I am creating a Java app using JNI to call C++ libraries a vendor has provided for us. I used a pointer upon instantiation of the C++ object, store it in the Java side, and when I need to call a method in C, would de-reference that pointer to mak

Need to use default package for JNI code?

-0001-11-30

Hi, I don't have much experience with JNI code, so excuse me if I make a silly mistake. I have a set of DLLs to interface with Microsoft native speech code ("Microsoft Sam") -- a GPL library called Quadmore. Quadmore has some sample Java code to

My JNI codes get NoSuchMethodException when release to user

-0001-11-30

My JNI codes run well in my development environment(JBuilder7), but when they release to user, they get java.lang.NoSuchMethodException. The error generates when the C++ code try to call the java side method. The release package was built by my colle

How to manage the memory within this JNI code

-0001-11-30

This is a piece of JNI code that i had written.......... i am calling these methods in a infinite loop to listen for changes...... if a change has occured it shpuld get changed. other wise not.... But the memory is allocated 4 bytes every second....

SoS, windows freezing when debugging jni code

-0001-11-30

Somebody Help!!!! I am desperately trying to debug JNI code with MSDEV debugger. This is a flow: 1. I run the java application from Msdev. Visual 6.0 2. Insert a breakpoint in the first native method. 3. The program successfully stops in the breakpoi

When i try to redeem it give me: your prepaid card code is not properly activated, any one can help please?

-0001-11-30

card code is not properly activatedIf the store that you bought it from is nearby then you could try going back to it and asking them to activate it properly. If it's not, or if they can't/won't activate it, then try contacting iTunes Support (you wi

Porting JNI code to x64

-0001-11-30

I am trying to port some existing JNI code so that it can run on 64 bit platforms as well as the existing 32 bit platforms. The one issue I cannot seem to solve is what to do with variables which are linked to the platform size. For example, a variab

JNI code generator

-0001-11-30

Hi all We are planning to use a library(written in fortran) for a particular data format (all binary).we also have the "C Wrappers" around the fortran code.We cannot re-write the whole thing in java since it was written around 20 yrs back and we

Help! JNI code freezes inside printf() call

-0001-11-30

Hi, I have a JDK 1.1.8 based java app that loads a JNI based dll. When I run the app from DOS prompt it is working fine. When I run the app from my IDE (i.e no access to console stdout/stdin), the app is freezing. So I launched VC++ 6x and attached t

NewObject crash in a PLI/C/JNI code

2015-10-11

Hi, i call NewObject() function in a PLI/C/JNI app to create a java/lang/Vector instance.My Verilog simulator (ModelSim PE 5.4b) crash without display an error code. Please take a look , and see what is wrong with my code. jclass jclass_Vector; jmeth

JNI + Timer, weird crash

-0001-11-30

Hello people. First of all, I'd like to apologize beforehand for the long post. Also, I hope I'm posting on the right forum section. Here's the story: I'm working on an academic project, which involves a Java application calling C++ code, via JNI. I'

JNI w/ Threads = Crashes

-0001-11-30

Hi, I am creating a Java app using JNI to call C++ libraries a vendor has provided for us. I used a pointer upon instantiation of the C++ object, store it in the Java side, and when I need to call a method in C, would de-reference that pointer to mak

Help me debug this JNI Code

-0001-11-30

Hi all i've got this third party DLL with a source code downloaded and this JNI method has a memory leak problem. The hard part is i can't seem to find it resources seem to be properly released. This code is kind of long any suggestions are welcomed.

Shutown and automatically Restart the os win xp/2000 after 2 hr -JNI code

-0001-11-30

hi every one and all shutdown the system properly and then restart the system after some hr(2 hr) through Java code or JNI . give me that code or tips thanks sivaya thanks am already checked this is code for that .i need restart after some time (like

"Core audio driver error code -1" crash

-0001-11-30

My logic program crashed and states this. (core audio driver error code -1) I checked to see if I was using the proper audio setup (Layla 3g) under audio drivers, and I was. I checked all of the computers audio settings and they were set properly, to

HT201209 Every time I type in the code for my iTunes gift card, it says the code is not properly activated.

2015-10-11

I'm trying to redeem my iTunes gift card, and every time I type in the code, it says the code hasn't been properly activated.Are you able to take it back to the store that you bought it from and ask them to activate it properly ? If not then you will