Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

debug build

Open takanokage opened this issue 8 years ago • 6 comments

What is the guideline for debugging the C/C++ code? Do we have a debug build option?

takanokage avatar Mar 27 '18 19:03 takanokage

I am using src/Test as my playground for C++ code testing, debugging, and benchmarking. The build flag is Open3D_BUILD_TESTS .

Later on I switched to exposing interfaces in Python and using Jupyter notebook for debugging and benchmarking.

qianyizh avatar Mar 27 '18 19:03 qianyizh

Have you ever had to trace a crash (segmentation fault in my case)?

I'm using faulthandler to find the location of the crash inside the python script. Obviously that is of limited use in my case as the crash is really happening somewhere after I call create_window(). I can see the the list of library dependencies using ldd. Would be nice to have a way to see exactly which of these libraries is failing. That way I could address whatever dependency my current setup is missing.

takanokage avatar Mar 27 '18 19:03 takanokage

My recommendation is to specify CMAKE_BUILD_TYPE=Debug flag.

https://github.com/IntelVCL/Open3D/blob/39e432b5cd2179725cc5403b5d53255f3eb41b71/src/CMakeLists.txt#L24-L29

For example,

cmake -DCMAKE_BUILD_TYPE=Debug ../src

syncle avatar Mar 27 '18 19:03 syncle

thank you guys!

takanokage avatar Mar 30 '18 23:03 takanokage

@takanokage, can you tell me which comment helped you to resolve the issue?

syncle avatar Mar 31 '18 16:03 syncle

I ended up not needing the debug build. I was trying to figure out why Open3D was crashing in Docker. Turns out that GLFW 3.3 was crashing in Docker however the mainline/master version of GLFW was working just fine.

takanokage avatar Apr 02 '18 03:04 takanokage