Hello,
Including a ROOT header into a mex cpp-file causes a segmentation fault in MATLAB. I’ve been able to narrow this down to TVersionCheck.h and more specifically this line: static TVersionCheck gVersionCheck(ROOT_VERSION_CODE);
This crash doesn’t occur (usually) immediately, but rather after enough GUI activity (viewing variables, text in command window, etc.) has occurred or after MATLAB is closed.
Could this be caused by the bug mentioned in the header?
This can be reproduced (at least on my end) by simply including the TVersionCheck.h in any mex-file.
I’ve compiled the file with the following command:
mex('-largeArrayDims', 'CXXFLAGS="$CXXFLAGS $(root-config --cflags)"', '-lCore', 'LDFLAGS="$LDFLAGS $(root-config --libs)"','root_test.cpp')
Any suggestions or work-around? Or is this a problem for Mathworks (and if so, what should they do)?
_ROOT Version:6.18.00
_Platform:Ubuntu 16.04
_Compiler:GCC 5.5