Run-time error with compiled codes on OS X 10.9.4

Hello
I have got Version 5.32/04 from the binaries for my Mac OS X 10.9.4. The interactive mode and the the executables in root/bin work fine. However I have troubles at run-time with compiled codes. For instance I got this code from another post in this forum

and at run-time I get

[quote]convertTH1(59318,0x7fff77f41310) malloc: *** error for object 0x7fff77f93330: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6[/quote]

Similar (?) errors come out from other mainstream packages like ExRootAnalysis

[quote]./ExRootLHEFConverter unweighted_events.lhe unweighted_events.test.root
ExRootLHEFConverter(59940,0x7fff77f41310) malloc: *** error for object 0x7fff77f93330: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6[/quote]

For completeness I am including my g++ version, let me know if more info about compilers is needed

[quote]
~>g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin12.5.0/4.8.1/lto-wrapper
Target: x86_64-apple-darwin12.5.0
Configured with: …/gcc-4.8.1/configure --enable-languages=c++,fortran
Thread model: posix
gcc version 4.8.1 (GCC)[/quote]

Thanks in advance for your answer,
Roberto

Just a stupid idea … in the “convertTH1.cpp” file, replace the line:
TApplication app(“App”, &argc, argv);
with:
TApplication app(“App”, 0, 0);
then recompile it and try to run it again.

Hello, thanks for your reply Willy.
I have changed that code with

TApplication app("App", 0, 0);
and it’s still giving the same type of error

[quote]convertTH1(98435,0x7fff77f41310) malloc: *** error for object 0x7fff77f93330: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6[/quote]

Any other idea?

I am kind of puzzled but this happens also with other compilers, for instance gcc 4.9 did not change the error.

Does it make sense to try with different compliers?

Cheers,
Roberto