[vbox-dev] JVM crashes

Nikolay Igotti nikolay.igotti at oracle.com
Fri Apr 22 12:32:30 GMT 2011


  Seems XPCOM bridge wasn't happy with reinit, so I just rewrote code to 
avoid native part reinit.
This fix will be available in upcoming 4.1 release, while so far you can 
just avoid multiple initializations.
To close a session - just close session, there's no point in fiddling 
with VirtualBoxManager for that.

  Nikolay

Christophe Devriese wrote:
> Well that was exactly what I was doing. In order to make absolutely 
> sure Sessions are truly closed, I closed the VirtualBoxManager right 
> along with it. This was how I did it in python, it seems strange that 
> it doesn't work in java.
>
> The test program that crashes the jvm is simplicity itself :
>
> --------------[Test.java]--------------
> import org.virtualbox_4_0.VirtualBoxManager;
> import org.virtualbox_4_0.IVirtualBox;
>
> public class Test {
>         public static void main(String[] args) {
>                 VirtualBoxManager mgr = 
> VirtualBoxManager.createInstance("");
>                 IVirtualBox vbox = mgr.getVBox();
>
>                 mgr.cleanup();
>
>                 mgr = VirtualBoxManager.createInstance("");
>
>                 mgr.cleanup();
>         }
> }
> --------------[Test.java]--------------
>
> Christophe
>
> On Fri, Apr 22, 2011 at 8:10 AM, Nikolay Igotti 
> <nikolay.igotti at oracle.com <mailto:nikolay.igotti at oracle.com>> wrote:
>
>          Christophe,
>
>      Unfortunately this very insufficient info for debugging, but
>     technically you only need a single VirtualBoxManager - creating
>     second is a bug.
>     Having said this, you may post minimal testcase where you can
>     reproduce this issue, so we can look on the crash.
>
>       Nikolay.
>
>
>     22.04.2011 0:56, Christophe Devriese пишет:
>>     I'm seeing jre crashes when trying to use the libvboxjxpcom api
>>     on 64 bits. Strangely, I seem to have this problem on both the
>>     openjdk and sun VM's. Here's the backtrace :
>>
>>     V  [libjvm.so+0x43ce80]
>>     V  [libjvm.so+0x44789a]
>>     C  [libvboxjxpcom.so+0xaf89]
>>     C  [libvboxjxpcom.so+0x15a1f]
>>      Java_org_mozilla_xpcom_internal_XPCOMImpl_initXPCOMNative+0xc
>>     j
>>      org.mozilla.xpcom.internal.XPCOMImpl.initXPCOM(Ljava/io/File;Lorg/mozilla/xpcom/IAppFileLocProvider;)Lorg/mozilla/interfaces/nsIServiceManager;+3
>>     j
>>      org.mozilla.xpcom.Mozilla.initXPCOM(Ljava/io/File;Lorg/mozilla/xpcom/IAppFileLocProvider;)Lorg/mozilla/interfaces/nsIServiceManager;+6
>>     j
>>      org.virtualbox_4_0.VirtualBoxManager.createInstance(Ljava/lang/String;)Lorg/virtualbox_4_0/VirtualBoxManager;+50
>>
>>     Strangely, this doesn't happen on the first createInstance, only
>>     on the second. How can I debug something like this ?
>>
>>     Christophe
>>
>>
>>     _______________________________________________
>>     vbox-dev mailing list
>>     vbox-dev at virtualbox.org <mailto:vbox-dev at virtualbox.org>
>>     http://vbox.innotek.de/mailman/listinfo/vbox-dev
>>           
>
>





More information about the vbox-dev mailing list