You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, stacktrace on linux does not provide numbers of lines. This is correct default behavior according to boost documentation, which could be modified by a flag: BOOST_STACKTRACE_USE_BACKTRACE.
However, I have experienced some issues when trying to introduce this flag in MeshLib (#3036). Namely, it works only if compiled twice.
Steps to reproduce
Build ubuntu22 container from the docker folder
Inside the container, run
git clone --recursive https://github.com/MeshInspector/MeshLib.git
cd MeshLib
git switch boost-use-backtrace
ln -s /usr/local/lib/meshlib-thirdparty-lib/include ./include
ln -s /usr/local/lib/meshlib-thirdparty-lib/lib ./lib
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make -j12
The branch asserts on application start-up, therefore a stacktrace is printed. This build, however, does not produce line numbers. The application can be started with the following commad: ./bin/MeshViewer.
Then, run the following command: cmake .. -DCMAKE_BUILD_TYPE=Debug -DMESHINSPECTOR_CUDA_SUPPORT=OFF && make -j12 (the important part is to change configuration somehow, the problem does not seem to be related to cuda specifically and the similar result could be achieved by modifying sources).
This time, if started, the application produces a stacktrace with line numbers.
We can do the same thing in reverse: first time compile with MESHINSPECTOR_CUDA_SUPPORT=OFF and second time without this flag, and the result will be equivalent: first-time build does not print line numbers, and second-time build does.
Thoughts
I failed to produce a MRE. Simple programs with backtrace and boost_backtrace work as expected. I think the problem is somehow related to PCH, but have not yet justified this claim.
The text was updated successfully, but these errors were encountered:
Currently, stacktrace on linux does not provide numbers of lines. This is correct default behavior according to boost documentation, which could be modified by a flag:
BOOST_STACKTRACE_USE_BACKTRACE
.However, I have experienced some issues when trying to introduce this flag in MeshLib (#3036). Namely, it works only if compiled twice.
Steps to reproduce
ubuntu22
container from thedocker
folder./bin/MeshViewer
.cmake .. -DCMAKE_BUILD_TYPE=Debug -DMESHINSPECTOR_CUDA_SUPPORT=OFF && make -j12
(the important part is to change configuration somehow, the problem does not seem to be related to cuda specifically and the similar result could be achieved by modifying sources).MESHINSPECTOR_CUDA_SUPPORT=OFF
and second time without this flag, and the result will be equivalent: first-time build does not print line numbers, and second-time build does.Thoughts
I failed to produce a MRE. Simple programs with backtrace and boost_backtrace work as expected. I think the problem is somehow related to PCH, but have not yet justified this claim.
The text was updated successfully, but these errors were encountered: