Re: application

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Wed, 25 Nov 2009 12:29:59 -0600


Hi John,

> I do so, and I get a valid pointer, but when doing this, my program crashes.

I do not quite understand the code that works and the code that do not work.

The unique TApplication object can (should) always be access via gApplication.

Cheers,
Philippe

John Idarraga wrote:
> Hello people,
>
> Little question. I am writing an application that is using the ROOT
> library. I still want to run my library making instances of my objects
> from CINT and steering the run from there. At some point I need to get
> a handle on a TApplication object. Since I am not providing the 'main'
> call of my application because I am running with CINT, that object
> should already exist, right ? I see that ROOT has already instantiated
> and object of the class TApplication and I can get a pointer to it
> through the global gApplication pointer or through
> gROOT->GetApplication(). I do so, and I get a valid pointer, but when
> doing this, my program crashes.
>
> I couldn't do much with gdb to find out what was going on. But if
> instead I try to build a new instance of TApplication myself, the
> constructor of TApplication tells me "only one instance of TApplication
> allowed", but still delivers me a new object and this one let me work
> without crash. I am surely miss-understanding something here. Any
> ideas ?
>
> thanks,
>
> John Idarraga
>
>
>
Received on Wed Nov 25 2009 - 19:30:32 CET

This archive was generated by hypermail 2.2.0 : Wed Nov 25 2009 - 23:50:02 CET