Re: enter eventloop several times?

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Wed Mar 31 1999 - 17:36:50 MEST


Hi Ulrich,

  this should work fine. Also a TApplication could be a data member, but
remember that it should stay alive until at least the event loop is finished.
Also you will need to pass argc/argv to your class so TApplication can use
it when needed (optional).

In your case something probably gets deleted when it should not so the
second time Run() gets called it fails. Can you send me a debugger trace
of where it crashes. Do:

gdb $ROOTSYS/bin/root.exe core
where

Cheers, Fons.



Ulrich Jost wrote:
> 
> Hi,
> 
> when I try to enter the root eventloop (theApp->Run(kTRUE);) a second
> time, I get a seg fault.
> I leave the first loop via 'Quit ROOT' in a canvas, does this menu item
> only returns from the loop or does more?
> If it does more, how can I return safely from the loop?
> Can the TApplication be created in the constructor of a class and the
> pointer to it a member field?
> 
> Thanks, Ulrich

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:31 MET