mitsuba icon indicating copy to clipboard operation
mitsuba copied to clipboard

Runtime error : invalid pointer [UBUNTU16.04 GCC6]

Open ThibaultGROUEIX opened this issue 6 years ago • 3 comments

I tried to compile Mitsuba v5 (with qt4 cause qt5 is complaining about QtWidget) on Ubuntu 16.04 with gcc 6, using the fix mentionned in https://github.com/mitsuba-renderer/mitsuba/issues/7 Everything went fine except I get an invalid pointer error at runtime. the trace is :

 Error in `mtsgui': free(): invalid pointer: 0x0000000001b34608 
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f3c983837e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f3c9838c37a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f3c9839053c]
/home/thibault/lib/test/mitsuba/dist/libmitsuba-core.so(_ZN7mitsuba12FileResolverC1Ev+0x318)[0x7f3c9b877df4]
/home/thibault/lib/test/mitsuba/dist/libmitsuba-core.so(_ZN7mitsuba6Thread20staticInitializationEv+0xf4)[0x7f3c9b604102]
mtsgui[0x41f9fa]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f3c9832c830]
mtsgui[0x421089] 
=================================================

Any idea what it might be due to ?

ThibaultGROUEIX avatar Oct 11 '17 15:10 ThibaultGROUEIX

I am also getting the same error. However, I disabled the Qt4 module and compiled without it and I am using mitsuba from the command prompt. So, I believe that Qt4 might not be the reason. My log is copied below:

*** Error in `mitsuba': free(): invalid pointer: 0x0000000001018c48 *** ======= Backtrace: ========= /usr/lib64/libc.so.6(+0x81429)[0x2b507b009429] /storage/hpc/work/av21/akp4/ADITHYA/MitsubaRenderer/MitsubaToFRenderer/dist/libmitsuba-core.so(_ZN7mitsuba12FileResolverC1Ev+0x2b4)[0x2b507a9a92e0] /storage/hpc/work/av21/akp4/ADITHYA/MitsubaRenderer/MitsubaToFRenderer/dist/libmitsuba-core.so(_ZN7mitsuba6Thread20staticInitializationEv+0xe5)[0x2b507a742ef1] mitsuba[0x40b145] /usr/lib64/libc.so.6(__libc_start_main+0xf5)[0x2b507afaa3d5]

AdithyaPediredla avatar Jan 24 '19 20:01 AdithyaPediredla

Same here. Centos 7 cluster, even without any Qt. Did any of you manage to solve the problem?

MKimiSH avatar Oct 24 '19 18:10 MKimiSH

I think it is probably due to a mismatch between the C++ ABI used to compile the dependencies (e.g. OpenEXR or even boost) and mitsuba itself. I recompiled the dependencies with _GLIBCXX_USE_CXX11_ABI=0 and then compiled mitsuba also with this flag and it worked.

MKimiSH avatar Nov 02 '19 06:11 MKimiSH