[ROOT] Win + dictionary init

From: Axel Naumann (axel@fnal.gov)
Date: Fri Jul 06 2001 - 22:23:15 MEST


Hi,

I still have this persistent problem with win and the dictionary. Apparently
the order of the instantiation of the globals is messed up sometimes. Here
is what's happening on my machine (which breaks the dictionary) when
starting a program that links against root libraries:

* a TROOT object is created
  - this calls new TCint, which calls at some point G__reset_setup_funcs(),
here's the stack:
---
G__reset_setup_funcs() line 163
G__scratch_all() line 257
G__main() line 646
G__init_cint() line 350 + 19 bytes
TCint::ResetAll() line 328 + 10 bytes
TCint::TCint(const char * 0x101fd864, const char * 0x101fd84c) line 101
---

  - now, G__call_setup_funcs() is called. Those are empty, as none of the
global G__cpp_setup guys is instantiated yet. Call stack:
---
G__call_setup_funcs() line 129
G__main() line 703
G__init_cint() line 350 + 19 bytes
TCint::ResetAll() line 328 + 10 bytes
TCint::TCint(const char * 0x101fd864, const char * 0x101fd84c) line 101
TROOT::TROOT(const char * 0x101fd830, const char * 0x101fd818, void (void)*
* 0x00000000) line 245 + 40 bytes
---

* finally, the G__cpp_setup guys are called. But now it's too late! TCint
doesn't care anymore, it thinks it's done with its dictionary
initialization, so G__call_setup_funcs is not called anymore. Example for my
first call of G__add_setup_func:
---
G__add_setup_func() line 65
LIBCORE! G__cpp_setup_initG__Base1::G__cpp_setup_initG__Base1(void) + 22
bytes
LIBCORE! G__cpp_setupG__Base1 + 105 bytes
---

* and now my main() gets called. And the dictionary is empty.

So THIS is the reason why sometimes even UInt_t was unknown to Root. How can
we fix this? How can we make sure all G__cpp_setups "register" first, before
cint calls the setup funcs? Or shall we call G__call_setup_functs directly
at some point? Or can I circumvent this by some magical permutaion on my
link line?

(Win 2000, Root since 3.00/something)

Cheers, Axel.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:51 MET