Opened 8 years ago

Closed 8 years ago

#4197 closed enhancement (fixed)

Show backtraces from all threads

Reported by: adeas31 Owned by: adeas31
Priority: high Milestone: 1.12.0
Component: OMEdit Version:
Keywords: Cc: sjoelund.se, adrpo

Description

When OMEdit crashes the backtrace of the current thread can be sent via crash report. Would be nice of backtraces from all threads are shown.

Change History (4)

comment:1 Changed 8 years ago by adeas31

Right now we are using GNU backtraces to generate a stack trace. Unfortunately it is only limited to currently active thread. For Windows a custom implementation is done using WIN API.

In order to the the backtraces from all threads we could use GDB command thread apply all bt full. All we need is start gdb when crash occur and attach it to the process and execute some commands to get the full backtrace.

The only problem is some users might not have gdb installed by default. On Windows we always ship gdb with OpenModelica installation so its not an issue there but unix users might have or might not have gdb.

comment:2 Changed 8 years ago by adrpo

You could search for GDB in the path and if not there use the normal backtrace.

comment:3 Changed 8 years ago by adeas31

PR:77 fixes this.
By default gdb based stack trace is used. If for some reason gdb fails then it will fallback to existing implementation.

I just made a divison by zero crash report which includes backtrace from all threads.

comment:4 Changed 8 years ago by adeas31

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.