Glibc error after upgrading ROOT from v5.28.ob to v5.43.01

Macro.C.pdf (34.3 KB)Hi ROOTers,

I recently upgraded the ROOT release used by our MC software from v5.28.ob to v5.43.01 and everything compiles fine. In oredr to run our MC I first build a geometry using the macro attached which runs without error until i close ROOT when I get another glibc error. I then generate the particles in the system using the cpp file attached. This used to work fine but now the code runs until:

TGeoManager* geoManager = TGeoManager::Import(geomFileName.c_str());

when I get the following error, even though the MC code itself has not changed and the file is found. Can anyone see what the problem is?

Many Thanks in Advance and sorry for the length of the error and code itself.

*** glibc detected *** generate_ucn: free(): invalid pointer: 0x0000000000aa0948 ***
======= Backtrace: =========
/lib64/libc.so.6[0x344a670f0f]
/lib64/libc.so.6(cfree+0x4b)[0x344a67136b]
/home/m/ma/mag39/nEDMsoftware/Universal/ROOT/root_5.34.01/lib/libCore.so(_ZN8TStorage13ObjectDeallocEPv+0x4c)[0x2aaaac9739fc]
/home/m/ma/mag39/nEDMsoftware/Universal/ROOT/root_5.34.01/lib/libCore.so(_ZN11TCollection14GarbageCollectEP7TObject+0x79)[0x2aaaac9b6449]
/home/m/ma/mag39/nEDMsoftware/Universal/ROOT/root_5.34.01/lib/libCore.so(_ZN9TObjArray6DeleteEPKc+0x37)[0x2aaaac9be757]
/home/m/ma/mag39/nEDMsoftware/Universal/ROOT/root_5.34.01/lib/libGeom.so(_ZN11TGeoManagerD0Ev+0x26d)[0x2aaaaafcc80d]
/home/m/ma/mag39/nEDMsoftware/Universal/ROOT/root_5.34.01/lib/libGeom.so(ZN11TGeoManager6ImportEPKcS1_S1+0x77)[0x2aaaaafd0217]
generate_ucn(_Z17GenerateParticlesR5TFileRK13InitialConfigPK9TGeoShapeRK10TGeoMatrix+0xcd9)[0x41c8d9]
generate_ucn(_Z12GenerateBeamR5TFileRK13InitialConfig+0x152)[0x41cf32]
generate_ucn(main+0x6bf)[0x41d77f]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x344a61d994]
generate_ucn(__gxx_personality_v0+0x2c1)[0x419f89]
======= Memory map: ========
00400000-0044b000 r-xp 00000000 00:1a 3334304 /mnt/nfs1/epp/home/mag39/nEDMsoftware/tags/v3r1/MC/build/generate_ucn
0064a000-0064c000 rw-p 0004a000 00:1a 3334304 /mnt/nfs1/epp/home/mag39/nEDMsoftware/tags/v3r1/MC/build/generate_ucn
0064c000-00f66000 rw-p 0064c000 00:00 0 [heap]
344a200000-344a21c000 r-xp 00000000 08:01 65501 /lib64/ld-2.5.so
344a41c000-344a41d000 r–p 0001c000 08:01 65501 /lib64/ld-2.5.so
344a41d000-344a41e000 rw-p 0001d000 08:01 65501 /lib64/ld-2.5.so
344a600000-344a74d000 r-xp 00000000 08:01 65510 /lib64/libc-2.5.so
344a74d000-344a94d000 —p 0014d000 08:01 65510 /lib64/libc-2.5.so
344a94d000-344a951000 r–p 0014d000 08:01 65510 /lib64/libc-2.5.so
344a951000-344a952000 rw-p 00151000 08:01 65510 /lib64/libc-2.5.so
344a952000-344a957000 rw-p 344a952000 00:00 0
344aa00000-344aa02000 r-xp 00000000 08:01 65523 /lib64/libdl-2.5.so
344aa02000-344ac02000 —p 00002000 08:01 65523 /lib64/libdl-2.5.so
344ac02000-344ac03000 r–p 00002000 08:01 65523 /lib64/libdl-2.5.so
344ac03000-344ac04000 rw-p 00003000 08:01 65523 /lib64/libdl-2.5.so
344ae00000-344ae16000 r-xp 00000000 08:01 65561 /lib64/libpthread-2.5.so
344ae16000-344b015000 —p 00016000 08:01 65561 /lib64/libpthread-2.5.so
344b015000-344b016000 r–p 00015000 08:01 65561 /lib64/libpthread-2.5.so
344b016000-344b017000 rw-p 00016000 08:01 65561 /lib64/libpthread-2.5.so
344b017000-344b01b000 rw-p 344b017000 00:00 0
344b200000-344b282000 r-xp 00000000 08:01 65546 /lib64/libm-2.5.so
344b282000-344b481000 —p 00082000 08:01 65546 /lib64/libm-2.5.so
344b481000-344b482000 r–p 00081000 08:01 65546 /lib64/libm-2.5.so
344b482000-344b483000 rw-p 00082000 08:01 65546 /lib64/libm-2.5.so
344b600000-344b615000 r-xp 00000000 08:01 65564 /lib64/libselinux.so.1
344b615000-344b815000 —p 00015000 08:01 65564 /lib64/libselinux.so.1
344b815000-344b817000 rw-p 00015000 08:01 65564 /lib64/libselinux.so.1
344b817000-344b818000 rw-p 344b817000 00:00 0
344ba00000-344ba05000 r-xp 00000000 08:01 136231 /usr/lib64/libXdmcp.so.6.0.0
344ba05000-344bc04000 —p 00005000 08:01 136231 /usr/lib64/libXdmcp.so.6.0.0
344bc04000-344bc05000 rw-p 00004000 08:01 136231 /usr/lib64/libXdmcp.so.6.0.0
344be00000-344be14000 r-xp 00000000 08:01 65575 /lib64/libz.so.1.2.3
344be14000-344c013000 —p 00014000 08:01 65575 /lib64/libz.so.1.2.3
344c013000-344c014000 rw-p 00013000 08:01 65575 /lib64/libz.so.1.2.3
344c600000-344c60d000 r-xp 00000000 08:01 65533 /lib64/libgcc_s-4.1.2-20080825.so.1
344c60d000-344c80d000 —p 0000d000 08:01 65533 /lib64/libgcc_s-4.1.2-20080825.so.1
344c80d000-344c80e000 rw-p 0000d000 08:01 65533 /lib64/libgcc_s-4.1.2-20080825.so.1
344ce00000-344cf05000 r-xp 00000000 08:01 136222 /usr/lib64/libX11.so.6.2.0
344cf05000-344d105000 —p 00105000 08:01 136222 /usr/lib64/libX11.so.6.2.0
344d105000-344d10c000 rw-p 00105000 08:01 136222 /usr/lib64/libX11.so.6.2.0
344de00000-344de7f000 r-xp 00000000 08:01 136367 /usr/lib64/libfreetype.so.6.3.10
344de7f000-344e07f000 —p 0007f000 08:01 136367 /usr/lib64/libfreetype.so.6.3.10
344e07f000-344e084000 rw-p 0007f000 08:01 136367 /usr/lib64/libfreetype.so.6.3.10
344e200000-344e202000 r-xp 00000000 08:01 136225 /usr/lib64/libXau.so.6.0.0
344e202000-344e401000 —p 00002000 08:01 136225 /usr/lib64/libXau.so.6.0.0
344e401000-344e402000 rw-p 00001000 08:01 136225 /usr/lib64/libXau.so.6.0.0
344e600000-344e602000 r-xp 00000000 08:01 65513 /lib64/libcom_err.so.2.1
344e602000-344e801000 —p 00002000 08:01 65513 /lib64/libcom_err.so.2.1
344e801000-344e802000 rw-p 00001000 08:01 65513 /lib64/libcom_err.so.2.1
344f200000-344f211000 r-xp 00000000 08:01 65562 /lib64/libresolv-2.5.so
344f211000-344f411000 —p 00011000 08:01 65562 /lib64/libresolv-2.5.so
344f411000-344f412000 r–p 00011000 08:01 65562 /lib64/libresolv-2.5.so
344f412000-344f413000 rw-p 00012000 08:01 65562 /lib64/libresolv-2.5.Aborted
cppFile.pdf (44.4 KB)

Hi,

Can you run you example with valgrind? (for example by doing:valgrind root.exe -b -l ....

Cheers,
Philippe.