0

I have to debug and fix a C++11 app in Ubuntu 14.04 which - unfortunately - exits with a "terminate called without an active exception". Since there are myriads of threads started and stopped in different and changing orders - is there an easy way to figure out, which one causes the error message? Thanks, Hermann

x y
  • 911
  • 9
  • 27
  • 3
    Can you attach a debugger, break on the last line of main, view the still active threads and their stack frames? I could do this on MS-Windows but I don't know enough about debugging on Ubuntu. – Richard Critten Mar 11 '17 at 16:06
  • On Ubuntu, if you are running without an IDE, then GDB is your way to set breakpoints and display status. To use gdb, type "gdb arg1 arg2...". One its starts, use the br command to set breakpoints, then type run. Read this post for details on debugging threads. http://stackoverflow.com/questions/18391808/getting-the-backtrace-for-all-the-threads-in-gdb – ScottK Mar 11 '17 at 16:10
  • Richard Critten, @ScottK Thank you for your suggestion. I managed to inject GDB into the startup script (the 'app' actually consists of 6 cooperating apps) and in one of them GDB popped up with some helpful line numbers. So have something to dig into. – x y Mar 11 '17 at 19:09

0 Answers0