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

Sebastien Jourdain sebastien.jourdain at kitware.com
Mon Apr 25 08:35:10 EDT 2011


Hi Sathish,

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/20110425/44e44baf/attachment.htm>


More information about the vtkusers mailing list