VTK and Java

Moises Alencastre Miranda mam at mira.labvis.unam.mx
Wed Jul 28 18:57:48 EDT 1999


Hi vtker's!

I have too problems with vtkPanel.
I was compiled vtk 2.3 nightly in a SGI Onyx with Irix 6.2 and java
version "3.1.1 (Sun 1.1.6)"

I had compiled and ran some examples of java
Only they that don't have vtkPanel run fine. (with vtkRenderWindow only)

But they that have vtkPanel (sphere.java, ..., including VTKPanel.java and
Viewer.java with Swing ) always give me the same abort when run:

SIGSEGV   11*  segmentation violation
    si_signo [11]: SIGSEGV   11*  segmentation violation
    si_errno [0]: Error 0
    si_code [1]: SEGV_MAPERR [addr: 0x1650]
    User context info (pthread: 0x10003):
        pc = 0xd9bf6a8 (SignalError = 0x5e5c7894)
        sp = 0x653e930, ra = 0xd9bdff0
    sys_thread info:
        sys_thread = 101dc098, stackbase=653FFC8, stack limit = 64BFFC8,
stackpointer=653E604
Full thread dump:
    "Screen Updater" (TID:0x4882f88, sys_thread_t:0x10491540, state:CW,
pthread: 0x10007, sp:0x677f3d8 pc:0x5e611b8c, stack_base:0x677ffc8,
stack_size:0x80000) prio=4
        java.lang.Object.wait(Object.java:316)
        sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:79)
        sun.awt.ScreenUpdater.run(ScreenUpdater.java:99)
    "AWT-Motif" (TID:0x4875360, sys_thread_t:0x101e94d8, state:CW,
pthread: 0x10005, sp:0x663f370 pc:0x5e611dc0, stack_base:0x663ffc8,
stack_size:0x80000) prio=5
        java.lang.Thread.run(Thread.java:476)
    "AWT-Input" (TID:0x48753f8, sys_thread_t:0x101e9338, state:R, pthread:
0x10004, sp:0x65bf5a0 pc:0x5e611b8c, stack_base:0x65bffc8,
stack_size:0x80000) prio=5
    "AWT-EventQueue-0" (TID:0x4875398, sys_thread_t:0x101dc098, state:R,
pthread: 0x10003, sp:0x653e9d8 pc:0x5e60ec94, stack_base:0x653ffc8,
stack_size:0x80000) prio=5 *current thread*
        vtk.vtkRenderWindow.Render(vtkRenderWindow.java:28) 
        vtk.vtkPanel.Render(vtkPanel.java:119) 
        vtk.vtkPanel.paint(vtkPanel.java:127)  
        sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:192)
        java.awt.Component.dispatchEventImpl(Component.java:1836)
        java.awt.Component.dispatchEvent(Component.java:1709)
        java.awt.EventDispatchThread.run(EventDispatchThread.java:80)
    "SIGQUIT handler" (TID:0x4870298, sys_thread_t:0x10123068, state:R,
pthread: 0x10002, sp:0x0 pc:0x0, stack_base:0x64bffc8, stack_size:0x80000)
prio=10
    "Finalizer thread" (TID:0x4870088, sys_thread_t:0x10122fd0, state:CW,
pthread: 0x10001, sp:0x643fdc0 pc:0x5e611b8c, stack_base:0x643ffc8,
stack_size:0x80000) prio=1
    "main" (TID:0x48700b0, sys_thread_t:0x100eba68, state:CW, pthread: 
0x10000, sp:0x7fff2bd8 pc:0x5e611b8c, stack_base:0x7fff2ee0,
stack_size:0x7e000) prio=5
Monitor Cache Dump:
    sun.awt.ScreenUpdater at 4882F88/4905D70: <unowned>
        Waiting to be notified:
        pthread 0x10007     "Screen Updater" (0x10491540)
Registered Monitor Dump:
    AWT lock: <unowned>
        Waiting to be notified:
        pthread 0x10005     "AWT-Motif" (0x101e94d8)
    Thread queue lock: <unowned>
        Waiting to be notified:
        pthread 0x10000     "main" (0x100eba68)
    Class lock: <unowned>
    Name and type hash table lock: <unowned>
    String intern lock: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class loading lock: <unowned>
    Java stack lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Has finalization queue lock: <unowned>
    Finalize me queue lock: <unowned>
        Waiting to be notified:
        pthread 0x10001     "Finalizer thread" (0x10122fd0)
    hostent lock: <unowned>
    Monitor registry: owner "AWT-EventQueue-0" (0x101dc098 pthread
0x10003, 1 entry)
Abort (core dumped)

What is the problem in special with vtkPanel?
There exist another vtkPanel with the right bug-fix in irix?
Somebody have a vtkPanel that run fine?

Anybody can advance me?

Thanks
 
Moises Alencastre Miranda

Research Assistant
Visualization Laboratory
DGSCA, UNAM
Mexico


> Randy Heiland wrote:  
> On Jun 30, 7:16am, Audrius Stundzia wrote:  
> > Subject: Re: VTK and Java 
> > Dear vtker's 
> > 
> > As a javaphile, I've been somewhat frustrated by the Tcl-centric 
> nature of vtk, and the problems with vtkPanel w.r.t. Swing,
> so I'll second Igor's Java question. 
> One (heretical) approach 
> I've used is to write a GUI in pure Java/Swing and 
> have a simple set of JNI (Java Native Interface) calls to execute the
vtk 
> graphics C++ pipeline in a seperate thread. 
> It's a bit like making sausages. It's not pretty, 
> but the result can be surprisingly good :) 
> > As a simple example of using Java Swing + VTK, I made available a
pared down 
> version of an app I built awhile back:  
> http://www.ncsa.uiuc.edu/~heiland/vtk/{Viewer.java, VTKPanel.java} 
> > However, this doesn't address Igor's concerns of converting vtkPanel
into a 
> JFrame.  
> > --Randy 
> > 
>-----------------------------------------------------------------------------
> This is the private VTK discussion list.  Please keep messages on-topic. 
> Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq> 
> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to 
> <majordomo at gsao.med.ge.com>.  For help, send message body containing 
> "info vtkusers" to the same address.  Live long and prosper. 
>-----------------------------------------------------------------------------
>



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list