Hi. I've got a C app that calls out to POI via a POIJNI wrapper I wrote. Since it's a write-only wrapper, most of the calls from C to POIJNI don't return any values. And it mostly works well.
Today, though, a user caused the Java VM to dump (I copied the stack from the resulting javacore file below - seems to be my PoiJni.writeFile method calling out to HSSFWorkbook.write and having a memory allocation fail down the line). Anyway, the problem seems to be that I set the max memory to 128MB in my jvm and I need more. But on top of that, my 'CallVoidMethod' call returns after java dumps, and my app thinks the file was written successfully. I guess I figured if the JVM ever dumped, my calling app would too, but that's not the case. So I'm wondering how to test for the fact that the JVM aborted. Is there some status flag in the JNIEnv struct (or query I can make) to monitor the health of the JVM to detect when it dumps? 1STGCHTYPE GC History 3STHSTTYPE 16:49:13:333019000 GMT j9mm.126 - at 216B49C0 poijni/PoiJni.writeFile(Ljava/lang/St ring;)V, jit 00000000, pc 21771FCA 3STHSTTYPE 16:49:13:333017000 GMT j9mm.126 - at 216B9748 org/apache/poi/hssf/usermodel/HSSFWor kbook.write(Ljava/io/OutputStream;)V, jit 00000000, pc 217C3C2D 3STHSTTYPE 16:49:13:333014000 GMT j9mm.126 - at 216B9758 org/apache/poi/hssf/usermodel/HSSFWor kbook.getBytes()[B, jit 20B01164, pc 20304950 3STHSTTYPE 16:49:13:333009000 GMT j9mm.101 - J9AllocateIndexableObject() returning NULL! 16978 328 bytes requested for object of class 21377768 from memory space '' id=00000000 3STHSTTYPE 16:49:13:332973000 GMT j9mm.53 - GlobalGC end: workstackoverflow=0 overflowcount=0 weakrefs=17 soft=0 phantom=0 finalizers=52 newspace=0/0 oldspace=13720344/134217728 loa=0/0 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
