gtDMMB / RNAStructViz

Visualization, comparison, and analysis of RNA secondary structures via a cross-platform GUI
https://github.com/gtDMMB/RNAStructViz/wiki
GNU General Public License v3.0
17 stars 5 forks source link

Feature Suggestion: Better crash handler (with Boost Stacktrace library) #57

Closed maxieds closed 4 years ago

maxieds commented 4 years ago

We might consider enhancing the information that is printed on SEGFAULT or other crash by using this library.

maxieds commented 4 years ago

Note that in recent builds (at least on Linux with a sane recent g++), the -fsanitize=address compiler flag is enabled so long as the build config file scripts/BuildConfig.cfg contains the setting DEBUGGING=1. This will cause any particularly pervasive and/or abusive uses of memory on the heap to crash out with a detailed stack trace. Also, setting the bash shell export (as noted here)

$ export MALLOC_CHECK_=2

should provide some additional runtime error generations if any memory problems with the default libc heap allocation / free functions are found. We cannot, however, ensure that the users will run StructViz with that env variable set.

@ceheitsch Do you have any well reasoned bits of opinionation for me on why we should not leave this mechanism in place in the production code? Technically, it wreaks of a debugging build, but if there are unforeseen errors on Mac, perhaps this will give us some better clues from user reports as to why?

maxieds commented 4 years ago

We have now built in memory abuse monitoring libraries enabled whenever DEBUGGING=1 is set in the build-scripts/BuildConfig.cfg file. This will generate a decent stack trace on impact every time. So, for the time being, I'm going to put this issue aside.