Re: [ROOT] Re: ROOT + GEANT4

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Mon Nov 08 2004 - 23:31:12 MET


Hi Jacek,

   the problem is very likely due to a mismatch in compile options. All 
sources should be compiled with the -pthread option. Also make sure 
XInitThreads() is called before the first call to XOpenDisplay(). This is 
done when TApplication is called, but is too late in the example program.

Cheers, Fons.



Jacek M. Holeczek wrote:
> Hi,
> many thanks for your help.
> First, let me say one thing ...
> I do not want to take part in any wars between different groups at CERN!
> I simply need to have both, ROOT and Geant4, working ... TOGETHER!
> 
> I have found the "test" application (from the forwarded mail) useful, as
> it does NOT use any geant4 stuff, just pure ROOT + X11/Xm/Xt.
> Moreover, as it comes from a geant4 team member, I suspect that it also
> shows how they use X11/Xm/Xt and this may be very helpful in debugging
> this problem.
> 
> The simplest/smallest test that I could provide is the IcaG4 application,
> but in order to try it, you would need to have the Geant4 installed.
> 
> However, as in all cases I can see that the application dies somewhere
> while doing something with "XFindContext" ... possibly all problems
> have the same origin.
> 
> Again, let me stress it ... no matter who is "guilty" here ... I believe I
> can get more quick and comprehensive help from the ROOT team.
> 
> I have just made a quick test with this test application from the
> forwarded mail ...
> I get something like this (SLC3/i386 + gcc 3.2.3 + root v4.00.08) :
> ----------------------------
> 
>>gcc -o xxx -I/$ROOTSYS/include -I/usr/X11R6/include xxx.cxx `root-config --glibs` -L/usr/X11R6/lib -lXm -LXt -lX11
>>./xxx
> 
> 
> *** Break *** segmentation violation
>  Generating stack trace...
>  0x07a24961 in <unknown> from /usr/X11R6/lib/libX11.so.6
>  0x079e5893 in XFindContext + 0xc3 from /usr/X11R6/lib/libX11.so.6
>  0x03e475dd in <unknown> from /usr/X11R6/lib/libXm.so.3
>  0x03e47742 in XmGetXmDisplay + 0x42 from /usr/X11R6/lib/libXm.so.3
>  0x03e46de7 in _XmGetDragProtocolStyle + 0x27 from /usr/X11R6/lib/libXm.so.3
>  0x03d77b9b in _XmIEndUpdate + 0xbb from /usr/X11R6/lib/libXm.so.3
>  0x00dfa144 in <unknown> from /usr/X11R6/lib/libXt.so.6
>  0x00dfa4b2 in XtAppNextEvent + 0x1c2 from /usr/X11R6/lib/libXt.so.6
>  0x00deea7c in XtAppMainLoop + 0x3c from /usr/X11R6/lib/libXt.so.6
>  0x08049d5e in main + 0x5d0 from ./xxx
>  0x0147479d in __libc_start_main + 0xed from /lib/tls/libc.so.6
>  0x080495b5 in dl_iterate_phdr + 0x41 from ./xxx
> Aborted
> ----------------------------
> and this (RH73/i386 + gcc 2.95.3 + root v3.05.02) :
> ----------------------------
> 
>>gcc -o xxx -I/$ROOTSYS/include -I/usr/X11R6/include xxx.cxx `root-config --glibs` -L/usr/X11R6/lib -lXm -LXt -lX11
>>./xxx
> 
> 
>  *** Break *** segmentation violation
>  Generating stack trace...
>  0x401d5057 in TUnixSystem::StackTrace(void) + 0x29b from /opt/ROOT/rh73_gcc2953/root/v3.05.02/lib/libCore.so
>  0x401d39ff in TUnixSystem::DispatchSignals(ESignals) + 0xc3 from /opt/ROOT/rh73_gcc2953/root/v3.05.02/lib/libCore.so
>  0x401d2b30 in <unknown> from /opt/ROOT/rh73_gcc2953/root/v3.05.02/lib/libCore.so
>  0x401d6967 in <unknown> from /opt/ROOT/rh73_gcc2953/root/v3.05.02/lib/libCore.so
>  0x412bff05 in <unknown> from /lib/i686/libpthread.so.0
>  0x42029188 in <unknown> from ./xxx
>  0x415571cd in <unknown> from /usr/X11R6/lib/libX11.so.6
>  0x4151d6e6 in XFindContext + 0x66 from /usr/X11R6/lib/libX11.so.6
>  0x4141619f in <unknown> from /usr/X11R6/lib/libXm.so.3
>  0x414162da in XmGetXmDisplay + 0x3a from /usr/X11R6/lib/libXm.so.3
>  0x41415a03 in _XmGetDragProtocolStyle + 0x23 from /usr/X11R6/lib/libXm.so.3
>  0x4135af1f in _XmIEndUpdate + 0xbf from /usr/X11R6/lib/libXm.so.3
>  0x41606109 in <unknown> from /usr/X11R6/lib/libXt.so.6
>  0x4160638f in XtAppNextEvent + 0x8f from /usr/X11R6/lib/libXt.so.6
>  0x415fbdca in XtAppMainLoop + 0x4a from /usr/X11R6/lib/libXt.so.6
>  0x0804b97e in main + 0x542 from ./xxx
>  0x42017589 in __libc_start_main + 0x95 from ./xxx
>  0x0804b211 in pthread_mutex_unlock + 0xb1 from ./xxx
> Aborted
> ----------------------------
> 
> As soon as I "comment out" the line :
> 	TApplication* app = new TApplication("Mangrove_Xm_test",0,0);
> the test program runs and there are no "visible" problems.
> 
> Note also that, to my surprise, the problem appears also on the "old" RH73
> system with the "old" root (I did not have this problem with "old" Geant4
> + "old" ROOT).
> 
> Any hints?
> Best regards,
> Jacek.



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET