Return-Path: X-Original-To: apmail-poi-user-archive@www.apache.org Delivered-To: apmail-poi-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BEC8C109E3 for ; Wed, 12 Jun 2013 17:30:11 +0000 (UTC) Received: (qmail 52633 invoked by uid 500); 12 Jun 2013 17:30:11 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 52302 invoked by uid 500); 12 Jun 2013 17:30:05 -0000 Mailing-List: contact user-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Users List" Delivered-To: mailing list user@poi.apache.org Received: (qmail 52267 invoked by uid 99); 12 Jun 2013 17:30:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jun 2013 17:30:03 +0000 X-ASF-Spam-Status: No, hits=3.0 required=5.0 tests=FSL_HELO_BARE_IP_2,RCVD_IN_DNSWL_NONE,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jak-poi-user@m.gmane.org designates 80.91.229.3 as permitted sender) Received: from [80.91.229.3] (HELO plane.gmane.org) (80.91.229.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jun 2013 17:29:57 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UmorV-0005TF-JF for user@poi.apache.org; Wed, 12 Jun 2013 19:29:34 +0200 Received: from 137.237.151.147 ([137.237.151.147]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jun 2013 19:29:33 +0200 Received: from ryampols by 137.237.151.147 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jun 2013 19:29:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: user@poi.apache.org From: littlenoodles Subject: Dealing with javacore dumps calling POI via JNI Date: Wed, 12 Jun 2013 17:29:14 +0000 (UTC) Lines: 34 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 137.237.151.147 (Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20100101 Firefox/21.0) X-Virus-Checked: Checked by ClamAV on apache.org 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: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org