How to create useful backtrace when Segmentation fault occurs

1. Run BricsCad in gdb with the following command:

LD_LIBRARY_PATH=/opt/bricsys/bricscad/v10 gdb /opt/bricsys/bricscad/v10/bricscad

2. In the window type run followed with a Enter to start the program.

3. Do the thing, which causes the crash. After crashing BricsCad window simply freezes, but does not disappear.

4. Switch to terminal and type bt (+enter) to get backtrace.

5. If whole backtrace does not fit the screen at once, type enter. In this case the last line reads like this:

---Type <return> to continue, or q <return> to quit---

5. Copy the relevant part of backtrace into bug report.

6. Type q (+enter) into terminal window and press y (+enter) to confirm.

 

A backtrace may look like this:

(gdb) bt
#0 0xf7fdf430 in __kernel_vsyscall ()
#1 0xf325aa01 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2 0xf325de42 in abort () at abort.c:92
#3 0xf347b3f5 in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib32/libstdc++.so.6
#4 0xf34792d5 in ?? () from /usr/lib32/libstdc++.so.6
#5 0xf3479312 in std::terminate() () from /usr/lib32/libstdc++.so.6
#6 0xf3479481 in __cxa_throw () from /usr/lib32/libstdc++.so.6
#7 0xf341e2ef in std::__throw_out_of_range(char const*) ()
from /usr/lib32/libstdc++.so.6
#8 0xf6adbef5 in wxg::LayoutTabs::tabIndexAtPoint(wxPoint) const ()
from /opt/bricsys/bricscad/v10/libwxgui.so
#9 0xf6adcce6 in wxg::LayoutTabs::onLeftDown(wxMouseEvent&) ()
from /opt/bricsys/bricscad/v10/libwxgui.so
#10 0xf64c6c01 in wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const ()
from /opt/bricsys/bricscad/v10/libwx_baseu-2.8.so.0
#11 0xf656623a in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
from /opt/bricsys/bricscad/v10/libwx_baseu-2.8.so.0
#12 0xf65663c6 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) ()
---Type <return> to continue, or q <return> to quit---
from /opt/bricsys/bricscad/v10/libwx_baseu-2.8.so.0
#13 0xf656752d in wxEvtHandler::ProcessEvent(wxEvent&) ()
from /opt/bricsys/bricscad/v10/libwx_baseu-2.8.so.0
#14 0xf623bf6b in wxWindow::GTKProcessEvent(wxEvent&) const ()
from /opt/bricsys/bricscad/v10/libwx_gtk2u_core-2.8.so.0
#15 0xf6241d80 in gtk_window_button_press_callback ()
from /opt/bricsys/bricscad/v10/libwx_gtk2u_core-2.8.so.0
#16 0xf2d09284 in ?? () from /usr/lib32/libgtk-x11-2.0.so.0
#17 0xf2907412 in g_closure_invoke () from /usr/lib32/libgobject-2.0.so.0
#18 0xf291d595 in ?? () from /usr/lib32/libgobject-2.0.so.0
#19 0xf291e83b in g_signal_emit_valist () from /usr/lib32/libgobject-2.0.so.0
#20 0xf291ee62 in g_signal_emit () from /usr/lib32/libgobject-2.0.so.0
#21 0xf2e37b96 in ?? () from /usr/lib32/libgtk-x11-2.0.so.0
#22 0xf2d0185d in gtk_propagate_event () from /usr/lib32/libgtk-x11-2.0.so.0
#23 0xf2d02ed7 in gtk_main_do_event () from /usr/lib32/libgtk-x11-2.0.so.0
#24 0xf2b9336a in ?? () from /usr/lib32/libgdk-x11-2.0.so.0
#25 0xf2856855 in g_main_context_dispatch () from /lib32/libglib-2.0.so.0
#26 0xf285a668 in ?? () from /lib32/libglib-2.0.so.0
#27 0xf285aba7 in g_main_loop_run () from /lib32/libglib-2.0.so.0
#28 0xf2d031d9 in gtk_main () from /usr/lib32/libgtk-x11-2.0.so.0
#29 0xf622caa5 in wxEventLoop::Run() ()
---Type <return> to continue, or q <return> to quit---
from /opt/bricsys/bricscad/v10/libwx_gtk2u_core-2.8.so.0
#30 0xf62b3a1e in wxAppBase::MainLoop() ()
from /opt/bricsys/bricscad/v10/libwx_gtk2u_core-2.8.so.0
#31 0xf62b35f1 in wxAppBase::OnRun() ()
from /opt/bricsys/bricscad/v10/libwx_gtk2u_core-2.8.so.0
#32 0xf6500a4a in wxEntry(int&, wchar_t**) ()
from /opt/bricsys/bricscad/v10/libwx_baseu-2.8.so.0
#33 0xf6500c47 in wxEntry(int&, char**) ()
from /opt/bricsys/bricscad/v10/libwx_baseu-2.8.so.0
#34 0x0805ce4f in main ()
(gdb)

Comments

  • I know this is an old post, but the information is still useful. Thanks for posting it. I used gdb today, to get a backtrace of the problem I am currently having with Bricscad v12.
  • is there a way to make it stick at the top?
  • is there a way to make it stick at the top?
    Maybe this could become an entry in the 'Knowledge base'?
  • Thanks for your suggestion Roy, this topic is indeed a perfect candidate!
  • I have often used this forumpost as a knowledge base article and referred to it in support requests, without creating a knowledge base article instead, shame on me!
    I have created a knowledge base article for this, it will become public after a review by colleagues.
  • The knowledge base article How to create useful backtrace on linux is now public.
  •  Hello...

    I know this is an old thread but I have a question that has everything to do with this.
    I have just installed BricsCAD 16.2.18 (x64) revision 46383 in my Debian Jessie 8, 64bit and started working on my ppppproject and all of a sudden, my laptop just froze.
    I had to power off my laptop long pressing Power button and probably lost some progress of my project.
    What I wanted to know is if is there any way of recovering any debug info to send to BricSys team so that they can check if is there any possibility for bugs or if there's is nothing to do with BricsCAD

    Thanks

This discussion has been closed.