[vtkusers] JVM Crashes while Call vtkGlobalJavaHash.DeleteAll() in Ubuntu...

Sathish kumar kingvsk at aol.com
Tue Apr 26 09:20:11 EDT 2011


 Hi Sebastien,
     
Thanks for your quick response. I tried vtkGlobalJavaHash.GC(). But the cache memory is not released. So only i moved to deleteAll().

My code is 

        vtkGlobalJavaHash.GarbageCollector.SetAutoGarbageCollection(true);
        vtkGlobalJavaHash.GarbageCollector.SetDebug(true);
        vtkGlobalJavaHash.GC();

I got the following line repeatedly as output.

         vtkJavaGarbageCollector deleted 0 references.
         vtkJavaGarbageCollector deleted 0 references.

Please help me on this.

 

 With Regards,
            
        Sathish Kumar V
 

 

-----Original Message-----
From: Sebastien Jourdain <sebastien.jourdain at kitware.com>
To: Sathish kumar <kingvsk at aol.com>
Cc: vtkusers <vtkusers at vtk.org>
Sent: Mon, Apr 25, 2011 6:05 pm
Subject: Re: [vtkusers] JVM Crashes while Call vtkGlobalJavaHash.DeleteAll() in Ubuntu...


Hi Sathish,9


Did you try to call vtkGlobalJavaHash.GC() instead ? If you want to call DeleteAll(), you really have to make sure that no VTK object is used inside Java anymore. What I mean is, if for some reasons some methods get called on the vtkPanel after calling deleteAll(), you are definitely in trouble. 


Seb


On Mon, Apr 25, 2011 at 2:44 AM, Sathish kumar <kingvsk at aol.com> wrote:

 Hi all,

    I am using VTK with Java wrapper for constructing Dicom 3D. It works fine. But while closing the 3D window the cache memory is not released. After I found that, vtkGlobalJavaHash.DeleteAll() method should be called to destroy all vtk native objects. So i called that method within formclosed event. This works fine with windows and Mac. But with Linux it leads to jvm crash. I don't know where the problem is. Please help me on this.

System Configrations:
    LinuxMint - Release 10 (Julia)
    Memory   - 2.0 GB
    Processor- Intel Core 2 Duo
    JVM        - Java(TM) SE Runtime Environment (build 1.6.0_22-b04)

I added the code snippet...

loadDicomdata{
    // Code for Load the Dicom Images using vtkDicomImagereader...
}

Load3DMIP(){

    // Code for construct and Display the 3D in JFrame...
}

private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed
        vtkGlobalJavaHash.DeleteAll();                    // Here the Problem
}


 With Regards,
            
        Sathish Kumar V

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers




 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110426/8ec2b833/attachment.htm>


More information about the vtkusers mailing list