Crash when writing a custom object in a TFile

Dear experts

SORRY I am not able to provide a running script since I depend on a complex framework, and rather big
amount of data, but hopefully you can give me an help anyway.
I am trying to write a an object derived from a TFolder to a TFile.
I run my program in a loop, and in each step I create a new file with a new object.
Sometimes I have a crash when I try to write the object.

MyObjectDerivedFromTFolder myobj;
… fill my object …
TFile * outfile = new TFile(“myfile”,"RECREATE);
myobj->Write(); ///crash here!

The crash depends on the running condition, input parameters.

The root stack says :

#10 0xe5fa38a0 in ?? ()
#11 0xf798dd5e in TROOT::FindSpecialObject(char const*, void*&) () from /storage/local/exp_soft/atlas/prod/releases/rel_17-05/LCGCMT/LCGCMT_60c/InstallArea/i686-slc5-gcc43-opt/lib/
#12 0xf79f41eb in TCint::FindSpecialObject(char const*, Cint::G__ClassInfo*, void**, void**) () from /storage/local/exp_soft/atlas/prod/releases/rel_17-05/LCGCMT/LCGCMT_60c/InstallArea/i686-slc5-gcc43-opt/lib/
#13 0xf79f4332 in TCint_FindSpecialObject () from /storage/local/exp_soft/atlas/prod/releases/rel_17-05/LCGCMT/LCGCMT_60c/InstallArea/i686-slc5-gcc43-opt/lib/

I also run valgrind and just before the crash I get the followig message :

==20430== Warning: set address range perms: large range 134217736 (undefined)
==20430== Warning: set address range perms: large range 134217768 (noaccess)
==20430== Warning: set address range perms: large range 134852475 (undefined)
==20430== Conditional jump or move depends on uninitialised value(s)
==20430== at 0x74068A9: deflate_fast (in /storage/local/exp_soft/atlas/prod/releases/rel_17-05/sw/lcg/external/zlib/1.2.3p1/i686-slc5-gcc43-opt/lib/
==20430== by 0x74049A1: deflate (in /storage/local/exp_soft/atlas/prod/releases/rel_17-05/sw/lcg/external/zlib/1.2.3p1/i686-slc5-gcc43-opt/lib/ by 0x6212BA7: R__zip (in /storage/local/exp_soft/atlas/prod/releases/rel_17-05/sw/lcg/app/releases/ROOT/5.28.00e/i686-slc5-gcc43-opt/root/lib/
==20430== by 0x111CC53E: TKey::TKey(TObject const*, char const*, int, TDirectory*) (in /storage/local/exp_soft/atlas/prod/releases/rel_17-05/sw/lcg/app/releases/ROOT/5.28.00e/i686-slc5-gc
==20430== by 0x111B7050: TFile::WriteStreamerInfo() (in /storage/local/exp_soft/atlas/prod/releases/rel_17-05/sw/lcg/app/releases/ROOT/5.28.00e/i686-slc5-gcc43-opt/root/lib/ by 0x111BAE81: TFile::Close(char const*) (in /storage/local/exp_soft/atlas/prod/releases/rel_17-05/sw/lcg/app/releases/ROOT/5.28.00e/i686-slc5-gcc43-opt/root/lib/
==20430== by 0x62D0C9F: _ZL18G__G__Base1_8_0_20P8G__valuePKcP8G__parami (in /storage/local/exp_soft/atlas/prod/releases/rel_17-05/sw/lcg/app/releases/ROOT/5.28.00e/i686-slc5-gcc43-opt/root/lib/
==20430== by 0x678C0E5: Cint::G__ExceptionWrapper(int ()(G__value, char const*, G__param*, int), G__value*, char*, G__param*, int) (in /storage/local/exp_soft/atlas/prod/releases/rel_17
==20430== by 0x684641B: G__execute_call (in /storage/local/exp_soft/atlas/prod/releases/rel_17-05/sw/lcg/app/releases/ROOT/5.28.00e/i686-slc5-gcc43-opt/root/lib/
==20430== by 0x68471EE: G__call_cppfunc (in /storage/local/exp_soft/atlas/prod/releases/rel_17-05/sw/lcg/app/releases/ROOT/5.28.00e/i686-slc5-gcc43-opt/root/lib/
==20430== by 0x68214DB: G__interpret_func (in /storage/local/exp_soft/atlas/prod/releases/rel_17-05/sw/lcg/app/releases/ROOT/5.28.00e/i686-slc5-gcc43-opt/root/lib/
==20430== by 0x680DAC9: G__getfunction (in /storage/local/exp_soft/atlas/prod/releases/rel_17-05/sw/lcg/app/releases/ROOT/5.28.00e/i686-slc5-gcc43-opt/root/lib/

Thanks a lot for any help


What is the structure (header) of the object’s class? How did you generate the dictionary for this class? Did you try to compile the script (the -> used on an object created on the stack hint at the code being interpreted)?
Was there more to the stack trace?

[quote]I also run valgrind and just before the crash I get the followig message :[/quote]The output of valgrind does not (here) indicate any potential for a crash. Did the process really crash when running with valgrind and valgrind did not issue any more warnings/errors?