[vtkusers] rendering isosurface and crashing

dsjen at cs.unc.edu dsjen at cs.unc.edu
Fri Jun 27 07:51:47 EDT 2003


Hi Jeff,

I'm not using threads, at least not explicitly.  A friend suggested 
the same thing.  I haven't gotten it to successfuly work though (I'm 
not that familar with Java threads), but his explaination sounds very 
similar to yours -- that the isosurface is being calculated in 
parallel, while the volume rendering occurs during rendering time, 
thus when the program tries to render before the isosurface is 
finished, it dies.  Ah, mutual exclusion...

To solve this, my friend's suggestion was to remove the isosurface 
from the actor list until the isosurface is complete, then add it 
back, so that it can be rendered.  Again, I haven't gotten this to 
work, but it kind of makes sense.

- Dennis

----- Original Message -----
From: Jeff Lee <jeff at cdnorthamerica.com>
Date: Friday, June 27, 2003 6:12 am
Subject: Re: [vtkusers] rendering isosurface and crashing

> 
> 
> dsjen at cs.unc.edu wrote:
> 
> >Hi Jeff,
> >
> >My use of vtkCanvas is has-a.  
> >
> you might try directly subclassing vtkCanvas instead.  see the 
> ImagePlaneWidget.java test in cvs which does this.  most access 
> violations come from trying to perform a render while modifying 
> the 
> contents of the render window (i.e. add/remove actors, changing 
> source 
> attributes, etc...).  because of the multithreaded nature of java, 
> it is 
> easy to make this happen.  you could try mutexing on your data 
> load to 
> make sure you don't render whilst modifying the data.  are you 
> creating 
> lots of threads in your application?  adding/removing actors from 
> a 
> different thread, etc...?
> -Jeff
> 
> >The program does consistently crashes 
> >when I load a large number of images (but works fine with a 
> smaller 
> >set), when trying to view an isosurface.  However, using volume 
> >rendering techniques, such as maximum intensity projection, the 
> >rendering is slow, but at least doesn't crash die with an 
> >EXCEPTION_ACCESS_VIOLATION.
> >
> >As for code that causes it to crash, I'm not sure which code 
> segment 
> >is causing it to crash.  Are you thinking that it's somewhere 
> with 
> >vtkCanvas?
> >
> >I will updating my version of Java and see if that fixes the 
> problem 
> >though.
> >
> >Thanks,
> >Dennis
> >
> >----- Original Message -----
> >From: Jeff Lee <jeff at cdnorthamerica.com>
> >Date: Tuesday, June 24, 2003 6:44 am
> >Subject: Re: [vtkusers] rendering isosurface and crashing
> >
> >  
> >
> >>dsjen at cs.unc.edu wrote:
> >>
> >>    
> >>
> >>>Hi VTK Users,
> >>>
> >>>I'm developing an application using vtk4.0, through Java, on 
> >>>WindowsXP.  I've run into a problem when trying to render an 
> >>>isosurface.  I have a stack of 800x800-pixel images that form a 
> >>>volume.  When viewing a subset of the stack, I'm able to render 
> >>>      
> >>>
> >>the 
> >>    
> >>
> >>>isosurface and manipulate it, although it does take a quite a 
> bit 
> >>>      
> >>>
> >>of 
> >>    
> >>
> >>>time to render.
> >>>
> >>>However, when I attempt to render the entire stack, my 
> >>>      
> >>>
> >>application 
> >>    
> >>
> >>>thinks for a very long time before my application crashes and 
> >>>      
> >>>
> >>Java 
> >>    
> >>
> >>>generates an hs_err_pid####.txt file.  I've included the 
> contents 
> >>>      
> >>>
> >>of 
> >>    
> >>
> >>>the text file below.  My guess is that I'm running out of 
> memory, 
> >>>      
> >>>
> >>but 
> >>    
> >>
> >>>I just wanted to check to see if anyone else has encountered a 
> >>>      
> >>>
> >>similar 
> >>    
> >>
> >>>problem or has any suggestion.
> >>>
> >>>      
> >>>
> >>is your use of vtkCanvas has-a or is-a?  does it consistently 
> >>crash in 
> >>the same place?  there were some problems with jdk1.4 and winxp 
> >>which 
> >>were fixed with jdk1.4.1_01.  do you have some code which causes 
> >>the crash?
> >>-Jeff
> >>
> >>    
> >>
> >>>Thanks,
> >>>Dennis
> >>>
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>
> >>    
> >>
> >
> >_______________________________________________
> >This is the private VTK discussion list. 
> >Please keep messages on-topic. Check the FAQ at: <" 
> target="l">http://public.kitware.com/cgi-bin/vtkfaq>
> >Follow this link to subscribe/unsubscribe:
> >http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >  
> >
> 
> 




More information about the vtkusers mailing list