[vtkusers] VTK Java problem

Blezek, Daniel J (Research) blezek at crd.ge.com
Tue Aug 27 10:39:59 EDT 2002


Hi all,

  I've started experimenting with Java and VTK.  Unfortunately, I'm getting segfaults when running,
and I think they pertain to threads.  When I run the attached ImagePlaneWidget code: the window comes
up correctly, and I can manipulate the widget to my heart's content.  However, when I resize the
window and manipulate the widget, I get this output from GDB:

# An unexpected exception has been detected in native code outside the VM.# Program
counter=0x4a7467f4
#
# Problematic Thread: prio=1 tid=0x8143808 nid=0x4490 runnable 
#

Program received signal SIGABRT, Aborted.
0x4049fb75 in sigsuspend () from /lib/libc.so.6
(gdb) bt
#0  0x4049fb75 in sigsuspend () from /lib/libc.so.6
#1  0x4003db79 in pthread_setconcurrency () at eval.c:41
#2  0x40039ddc in pthread_cond_wait () at eval.c:41
#3  0x401e8e3e in Monitor::wait () at eval.c:41
#4  0x402214f8 in Threads::destroy_vm () at eval.c:41
#5  0x40198f0d in jni_DestroyJavaVM () at eval.c:41
#6  0x08049385 in main () at eval.c:41
#7  0x4048d5d7 in __libc_start_main () from /lib/libc.so.6

The ImagePlaneWidget.java code is an adaptation of the ImagePlane.tcl example.  Things are moving in
the right direction, this did not even run a few weeks ago...

Open for suggestions,
-dan

P.S.  To compile this code, you'll neeed the latest and greatest Wrapping/Java/vtk/*.java

--
Daniel Blezek, Ph.D.
blezek at crd.ge.com
Visualization and Computer Vision Lab, Imaging Technologies
GE Global Research Center
 <<ImagePlaneWidget.java>> 

begin 600 ImagePlaneWidget.java
M:6UP;W)T('9T:RXJ.PII;7!O<G0@:F%V87 at N<W=I;F<N*CL*:6UP;W)T(&IA
M=F$N87=T+D1I;65N<VEO;CL*+R\@<&%C:V%G92!R97%U:7)E('9T:VEN=&5R
M86-T:6]N"B\O('!A8VMA9V4@<F5Q=6ER92!V=&MT97-T:6YG"@H*"G!U8FQI
M8R!C;&%S<R!);6%G95!L86YE5VED9V5T('L*("!P=6)L:6,@<W1A=&EC('9O
M:60@;6%I;B`H(%-T<FEN9UM=(&%R9W8@*2!["B`@("`O+U1H:7, at 97AA;7!L
M92!D96UO;G-T<F%T97,@:&]W('1O('5S92!T:&4@=G1K26UA9V50;&%N95=I
M9&=E="!T;R!P<F]B90H@("`@+R]A(#-$(&EM86=E(&1A=&%S970@=VET:"!T
M:')E92!O<G1H;V=O;F%L('!L86YE<RX*"B`@("!V=&M#86YV87,@<F5N5VEN
M(#T@;F5W('9T:T-A;G9A<R at I.PH@("`@=G1K375L=&E4:')E861E<B!T(#T@
M;F5W('9T:TUU;'1I5&AR96%D97(H*3L*("`@('0N4V5T1VQO8F%L1&5F875L
M=$YU;6)E<D]F5&AR96%D<R`H(#$@*3L*("`@($I&<F%M92!F<F%M92`](&YE
M=R!*1G)A;64@*"`B26UA9V50;&%N95=I9&=E="(@*3L*("`@(&9R86UE+G-E
M=%-I>F4@*"!N97<@1&EM96YS:6]N("@@-3$R+"`U,3(@*2`I.PH@("`@9G)A
M;64N9V5T0V]N=&5N=%!A;F4H*2YA9&0@*"`B0V5N=&5R(BP@<F5N5VEN("D[
M"B`@("!F<F%M92YP86-K*"D["B`@("!F<F%M92YS9716:7-I8FQE*'1R=64I
M.PH*("`@("\O4W1A<G0 at 8GD@;&]A9&EN9R!S;VUE(&1A=&$N"B`@("!V=&M6
M;VQU;64Q-E)E861E<B!V,38@/2!N97<@=G1K5F]L=6UE,39296%D97(H*3L*
M("`@('8Q-BY3971$871A1&EM96YS:6]N<R`H(#8T+"`V-"`@*3L*("`@('8Q
M-BY3971$871A0GET94]R9&5R5&],:71T;&5%;F1I86X@*"D["B`@("!V,38N
M4V5T1FEL95!R969I>"`H("(O:&]M92]B;&5Z96LO<W)C+U942T1A=&$O1&%T
M82]H96%D<W$O<75A<G1E<B(@*3L*("`@('8Q-BY3971);6%G95)A;F=E("@@
M,2P at .3,@*3L*("`@('8Q-BY3971$871A4W!A8VEN9R`H(#,N,BP@,RXR+"`Q
M+C4@*3L*("`@('8Q-BY5<&1A=&4H*3L*"B`@("`O+T%N(&]U=&QI;F4@:7,@
M<VAO=VX at 9F]R(&-O;G1E>'0N"B`@("!V=&M/=71L:6YE1FEL=&5R(&]U=&QI
M;F4@/2!N97<@=G1K3W5T;&EN949I;'1E<B at I.PH@("`@;W5T;&EN92Y3971)
M;G!U="`H('8Q-BY'971/=71P=70H*2`@*3L*"@H@("`@=G1K4&]L>41A=&%-
M87!P97(@;W5T;&EN94UA<'!E<B`](&YE=R!V=&M0;VQY1&%T84UA<'!E<B at I
M.PH@("`@;W5T;&EN94UA<'!E<BY3971);G!U="`H(&]U=&QI;F4N1V5T3W5T
M<'5T*"D@("D["@H@("`@=G1K06-T;W(@;W5T;&EN94%C=&]R(#T@;F5W('9T
M:T%C=&]R*"D["B`@("!O=71L:6YE06-T;W(N4V5T36%P<&5R("@@;W5T;&EN
M94UA<'!E<B`@*3L*"B`@("!V=&M296YD97)E<B!R96XQ(#T@<F5N5VEN+D=E
M=%)E;F1E<F5R*"D["B`@("!R96XQ+D%D9$%C=&]R("@@;W5T;&EN94%C=&]R
M("D["B`@("`O+R!R96Y7:6XN4F5N9&5R*"D["@H@("`@+R]#<F5A=&4@=&AE
M(%)E;F1E<E=I;F1O=RP at 4F5N9&5R97(@86YD($EN=&5R86-T;W(*("`@("\O
M=&AE($EN=&5R86-T;W(@:7,@;F5E9&5D(&9O<B!T:&4@=VED9V5T<PH@("`@
M=G1K1V5N97)I8U)E;F1E<E=I;F1O=TEN=&5R86-T;W(@:7)E;B`](')E;E=I
M;BY'971296YD97)7:6YD;W=);G1E<F%C=&]R*"D["B`@("`O+R!I<F5N+E-E
M=%)E;F1E<E=I;F1O=R`H(')E;E=I;BY'971296YD97)7:6YD;W<H*2`I.PH*
M("`@("\O5&AE('-H87)E9"!P:6-K97(@96YA8FQE<R!U<R!T;R!U<V4@,R!P
M;&%N97, at 870@;VYE('1I;64*("`@("\O86YD(&=E=',@=&AE('!I8VMI;F<@
M;W)D97(@<FEG:'0*("`@('9T:T-E;&Q0:6-K97(@<&EC:V5R(#T@;F5W('9T
M:T-E;&Q0:6-K97(H*3L*("`@('!I8VME<BY39714;VQE<F%N8V4@*"`P+C`P
M-2`I.PH*("`@("\O5&AE(#,@:6UA9V4@<&QA;F4@=VED9V5T<R!A<F4@=7-E
M9"!T;R!P<F]B92!T:&4 at 9&%T87-E="X*("`@("!V=&M);6%G95!L86YE5VED
M9V5T('!L86YE5VED9V5T6"`](&YE=R!V=&M);6%G95!L86YE5VED9V5T*"D[
M"B`@("`@<&QA;F57:61G9718+D1I<W!L87E497AT3VX@*"D["B`@("`@<&QA
M;F57:61G9718+E-E=$EN<'5T("@@=C$V+D=E=$]U='!U="@I*3L*("`@("!P
M;&%N95=I9&=E=%@N4V5T26YT97)A8W1O<B`H(&ER96X@*3L*("`@("!P;&%N
M95=I9&=E=%@N4V5T4&QA;F5/<FEE;G1A=&EO;E1O6$%X97,@*"D["B`@("`@
M<&QA;F57:61G9718+E-E=%-L:6-E26YD97@@*"`S,BD["B`@("`@<&QA;F57
M:61G9718+E-E=%!I8VME<B`H('!I8VME<BD["B`@("`@<&QA;F57:61G9718
M+E-E=$ME>5!R97-S06-T:79A=&EO;E9A;'5E("@@)W at G*3L*("`@("!P;&%N
M95=I9&=E=%@N1V5T4&QA;F50<F]P97)T>2 at I+E-E=$-O;&]R("@@,2P@,"P@
M,"D["B`@("`@<&QA;F57:61G9718+D]N("@I.PH*("`@("!V=&M);6%G95!L
M86YE5VED9V5T('!L86YE5VED9V5T62`](&YE=R!V=&M);6%G95!L86YE5VED
M9V5T*"D["B`@("`@<&QA;F57:61G9719+D1I<W!L87E497AT3VX@*"D["B`@
M("`@<&QA;F57:61G9719+E-E=$EN<'5T("@@=C$V+D=E=$]U='!U="@I("D[
M"B`@("`@<&QA;F57:61G9719+E-E=$EN=&5R86-T;W(@*"!I<F5N*3L*("`@
M("!P;&%N95=I9&=E=%DN4V5T4&QA;F5/<FEE;G1A=&EO;E1O64%X97,@*"D[
M"B`@("`@<&QA;F57:61G9719+E-E=%-L:6-E26YD97@@*"`S,BD["B`@("`@
M<&QA;F57:61G9719+E-E=%!I8VME<B`H('!I8VME<BD["B`@("`@<&QA;F57
M:61G9719+E-E=$ME>5!R97-S06-T:79A=&EO;E9A;'5E("@@)WDG("D["B`@
M("`@<&QA;F57:61G9719+D=E=%!L86YE4')O<&5R='DH*2Y3971#;VQO<B`H
M(#$L(#$L(#`I.PH@("`@('!L86YE5VED9V5T62Y3971,;V]K=7!486)L92`H
M('!L86YE5VED9V5T6"Y'971,;V]K=7!486)L92 at I("D["B`@("`@<&QA;F57
M:61G9719+D]N("@I.PH*("`@("`O+V9O<B!T:&4@>BUS;&EC92P@='5R;B!O
M9F8@=&5X='5R92!I;G1E<G!O;&%T:6]N. at H@("`@("\O:6YT97)P;VQA=&EO
M;B!I<R!N;W<@;F5A<F5S="!N96EG:&)O=7(L('1O(&1E;6]N<W1R871E"B`@
M("`@+R]C<F]S<RUH86ER(&-U<G-O<B!S;F%P<&EN9R!T;R!P:7AE;"!C96YT
M97)S"B`@("`@('9T:TEM86=E4&QA;F57:61G970@<&QA;F57:61G971:(#T@
M;F5W('9T:TEM86=E4&QA;F57:61G970H*3L*("`@("`@<&QA;F57:61G971:
M+D1I<W!L87E497AT3VX@*"D["B`@("`@('!L86YE5VED9V5T6BY497AT=7)E
M26YT97)P;VQA=&5/9F8@*"D["B`@("`@('!L86YE5VED9V5T6BY3971);G!U
M="`H('8Q-BY'971/=71P=70H*2D["B`@("`@('!L86YE5VED9V5T6BY3971)
M;G1E<F%C=&]R("@@:7)E;BD["B`@("`@('!L86YE5VED9V5T6BY39710;&%N
M94]R:65N=&%T:6]N5&]:07AE<R`H*3L*("`@("`@<&QA;F57:61G971:+E-E
M=%-L:6-E26YD97@@*"`T-BD["B`@("`@('!L86YE5VED9V5T6BY39710:6-K
M97(@*"!P:6-K97(I.PH@("`@("!P;&%N95=I9&=E=%HN4V5T2V5Y4')E<W-!
M8W1I=F%T:6]N5F%L=64@*"`G>B<@*3L*("`@("`@<&QA;F57:61G971:+D=E
M=%!L86YE4')O<&5R='DH*2Y3971#;VQO<B`H(#`L(#`L(#$@*3L*("`@("`@
M<&QA;F57:61G971:+E-E=$QO;VMU<%1A8FQE("@@<&QA;F57:61G9718+D=E
M=$QO;VMU<%1A8FQE*"D@*3L*("`@("`@<&QA;F57:61G971:+D]N("@I.PH*
M("`@("`@+R]!9&0@=&AE(&]U=&QI;F4 at 86-T;W(@=&\@=&AE(')E;F1E<F5R
M+"!S970@=&AE(&)A8VMG<F]U;F0 at 86YD('-I>F4*("`@("`@<F5N,2Y'971#
M=6QL97)S*"DN4F5M;W9E06QL271E;7,H*3L*"B`@("`@(')E;C$N4V5T0F%C
M:V=R;W5N9"`H("`P+C$L(#`N,2P@,"XR*3L*"B`@("`@('9T:T-A;65R82!C
M86TQ(#T@<F5N,2Y'971!8W1I=F5#86UE<F$H*3L*("`@("`@8V%M,2Y%;&5V
M871I;VX@*"`Q,3`I.PH@("`@("!C86TQ+E-E=%9I97=5<"`H(#`L(#`L("TQ
M*3L*("`@("`@8V%M,2Y!>FEM=71H("@@-#4I.PH@("`@("!R96XQ+E)E<V5T
M0V%M97)A0VQI<'!I;F=286YG92`H*3L*("`@("`@<F5N5VEN+E)E;F1E<B at I
(.PH@('T*?0H=
`
end



More information about the vtkusers mailing list