[3dprinter-general] Bug#917780: slic3r: Segfault in stl_fix_normal_directions

Bernhard Übelacker bernhardu at mailbox.org
Sun Dec 30 22:14:21 GMT 2018


Dear Maintainer, hello Philipp Marek
tried to have a look at this backtrace.
Unfortunately I could not reproduce a crash with a random test file.

See the same backtrace with all needed debug symbols below.

It points to following line 147:

    (gdb) list
    144           /* If this edge of the facet is connected: */
    145           if(stl->neighbors_start[facet_num].neighbor[j] != -1) {
    146             /* If we haven't fixed this facet yet, add it to the list: */
    147             if(norm_sw[stl->neighbors_start[facet_num].neighbor[j]] != 1) {
    148               /* Add node to beginning of list. */
    149               newn = (struct stl_normal*)malloc(sizeof(struct stl_normal));
    150               if(newn == NULL) perror("stl_fix_normal_directions");
    151               newn->facet_num = stl->neighbors_start[facet_num].neighbor[j];

More exactly to that instruction:

    (gdb) disassemble /m stl_fix_normal_directions,stl_fix_normal_directions+696 
    Dump of assembler code from 0x7ffff75a7f50 to 0x7ffff75a8208:
    88      stl_fix_normal_directions(stl_file *stl) {
    ...
    146             /* If we haven't fixed this facet yet, add it to the list: */
    147             if(norm_sw[stl->neighbors_start[facet_num].neighbor[j]] != 1) {
       0x00007ffff75a8042 <stl_fix_normal_directions(stl_file*)+242>:       movslq %esi,%rax
       0x00007ffff75a8045 <stl_fix_normal_directions(stl_file*)+245>:       mov    %esi,0x8(%rsp)
    => 0x00007ffff75a8049 <stl_fix_normal_directions(stl_file*)+249>:       cmpb   $0x1,(%r15,%rax,1)
       0x00007ffff75a804e <stl_fix_normal_directions(stl_file*)+254>:       je     0x7ffff75a8079 <stl_fix_normal_directions(stl_file*)+297>
    
    148               /* Add node to beginning of list. */



Unfortunately I assume that exact file would help the maintainer
or upstream to find a fix, if that file could be published.


Kind regards,
Bernhard


(gdb) bt
#0  0x00007ffff75a8049 in stl_fix_normal_directions (stl=stl at entry=0x55555983b820) at src/admesh/normals.c:147
#1  0x00007ffff775b427 in Slic3r::TriangleMesh::repair (this=0x55555983b820) at src/libslic3r/TriangleMesh.cpp:164
#2  Slic3r::TriangleMesh::repair (this=0x55555983b820) at src/libslic3r/TriangleMesh.cpp:144
#3  0x00007ffff75972a8 in Slic3r::ModelObject::repair (this=0x555555940660) at src/libslic3r/Model.cpp:583
#4  0x00007ffff749c46f in XS_Slic3r__Model__Object_repair (my_perl=<optimized out>, cv=<optimized out>) at /usr/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- -t "../xsp/typemap.xspt"  "../xsp/Model.xsp":971
#5  0x000055555563fd11 in Perl_pp_entersub (my_perl=0x555555868260) at pp_hot.c:5232
#6  0x0000555555636026 in Perl_runops_standard (my_perl=0x555555868260) at run.c:42
#7  0x00005555555a9f02 in Perl_call_sv (my_perl=my_perl at entry=0x555555868260, sv=0x555558568390, flags=flags at entry=13) at perl.c:3021
#8  0x00007ffff6d35fcd in wxPliEventCallback::Handler (this=<optimized out>, event=...) at cpp/e_cback.cpp:93
#9  0x00007ffff62627ae in wxEvtHandler::ProcessEventIfMatchesId (event=..., handler=<optimized out>, entry=...) at ../include/wx/app.h:439
#10 wxEvtHandler::ProcessEventIfMatchesId (entry=..., handler=<optimized out>, event=...) at ../src/common/event.cpp:1365
#11 0x00007ffff6262b2a in wxEvtHandler::SearchDynamicEventTable (this=0x555556791da0, event=...) at ../src/common/event.cpp:1749
#12 0x00007ffff6262bc0 in wxEvtHandler::TryHereOnly (this=0x555556791da0, event=...) at ../src/common/event.cpp:1583
#13 0x00007ffff6262c73 in wxEvtHandler::TryBeforeAndHere (event=..., this=0x555556791da0) at ../include/wx/event.h:3692
#14 wxEvtHandler::ProcessEventLocally (this=0x555556791da0, event=...) at ../src/common/event.cpp:1520
#15 0x00007ffff6262d11 in wxEvtHandler::ProcessEvent (this=0x555556791da0, event=...) at ../src/common/event.cpp:1493
#16 0x00007ffff677840b in wxWindowBase::TryAfter (this=0x555559424610, event=...) at ../include/wx/window.h:846
#17 0x00007ffff6262ab7 in wxEvtHandler::SafelyProcessEvent (this=<optimized out>, event=...) at ../src/common/event.cpp:1611
#18 0x00007ffff677992c in wxWindowBase::HandleWindowEvent (this=this at entry=0x555559424610, event=...) at ../include/wx/window.h:846
#19 0x00007ffff672f9e5 in wxMenuBase::SendEvent (this=this at entry=0x5555590d2f60, itemid=itemid at entry=117, checked=<optimized out>) at ../src/common/menucmn.cpp:666
#20 0x00007ffff662f10b in menuitem_activate (item=0x5555593a1730) at ../include/wx/menuitem.h:92
#21 menuitem_activate (item=0x5555593a1730) at ../src/gtk/menu.cpp:553
#22 0x00007ffff5664b6d in g_closure_invoke (closure=0x55555941c810, return_value=0x0, n_param_values=1, param_values=0x7fffffffd9c0, invocation_hint=0x7fffffffd940) at ../../../../gobject/gclosure.c:810
#23 0x00007ffff56778f3 in signal_emit_unlocked_R (node=node at entry=0x555556886910, detail=detail at entry=0, instance=instance at entry=0x555559266cc0, emission_return=emission_return at entry=0x0, instance_and_params=instance_and_params at entry=0x7fffffffd9c0) at ../../../../gobject/gsignal.c:3635
#24 0x00007ffff5680882 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args at entry=0x7fffffffdb70) at ../../../../gobject/gsignal.c:3391
#25 0x00007ffff5680ecf in g_signal_emit (instance=instance at entry=0x555559266cc0, signal_id=<optimized out>, detail=detail at entry=0) at ../../../../gobject/gsignal.c:3447
#26 0x00007ffff5cb0aba in gtk_widget_activate (widget=widget at entry=0x555559266cc0) at ../../../../gtk/gtkwidget.c:7777
#27 0x00007ffff5b84276 in gtk_menu_shell_activate_item (menu_shell=0x5555594182a0, menu_item=0x555559266cc0, force_deactivate=<optimized out>) at ../../../../gtk/gtkmenushell.c:1375
#28 0x00007ffff5b84513 in gtk_menu_shell_button_release (widget=0x5555594182a0, event=<optimized out>) at ../../../../gtk/gtkmenushell.c:791
#29 0x00007ffff5d00434 in _gtk_marshal_BOOLEAN__BOXEDv (closure=0x55555687b6c0, return_value=0x7fffffffdea0, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x55555687b6f0) at ../../../../gtk/gtkmarshalers.c:129
#30 0x00007ffff5664da6 in _g_closure_invoke_va (closure=0x55555687b6c0, return_value=0x7fffffffdea0, instance=0x5555594182a0, args=0x7fffffffdf70, n_params=1, param_types=0x55555687b6f0) at ../../../../gobject/gclosure.c:873
#31 0x00007ffff568032b in g_signal_emit_valist (instance=0x5555594182a0, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args at entry=0x7fffffffdf70) at ../../../../gobject/gsignal.c:3300
#32 0x00007ffff5680ecf in g_signal_emit (instance=instance at entry=0x5555594182a0, signal_id=<optimized out>, detail=detail at entry=0) at ../../../../gobject/gsignal.c:3447
#33 0x00007ffff5cae554 in gtk_widget_event_internal (widget=widget at entry=0x5555594182a0, event=event at entry=0x555559288f20) at ../../../../gtk/gtkwidget.c:7744
#34 0x00007ffff5cb066a in gtk_widget_event (widget=widget at entry=0x5555594182a0, event=event at entry=0x555559288f20) at ../../../../gtk/gtkwidget.c:7314
#35 0x00007ffff5b6f1c6 in propagate_event_up (topmost=<optimized out>, event=<optimized out>, widget=0x5555594182a0) at ../../../../gtk/gtkmain.c:2592
#36 propagate_event (widget=<optimized out>, event=0x555559288f20, captured=<optimized out>, topmost=0x0) at ../../../../gtk/gtkmain.c:2695
#37 0x00007ffff5b712e3 in gtk_main_do_event (event=0x555559288f20) at ../../../../gtk/gtkmain.c:1915
#38 gtk_main_do_event (event=<optimized out>) at ../../../../gtk/gtkmain.c:1685
#39 0x00007ffff5872435 in _gdk_event_emit (event=event at entry=0x555559288f20) at ../../../../gdk/gdkevents.c:73
#40 0x00007ffff58a2eb2 in gdk_event_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../../../../../gdk/x11/gdkeventsource.c:367
#41 0x00007ffff5584c3e in g_main_dispatch (context=0x55555686fd10) at ../../../../glib/gmain.c:3182
#42 g_main_context_dispatch (context=context at entry=0x55555686fd10) at ../../../../glib/gmain.c:3847
#43 0x00007ffff5584ed8 in g_main_context_iterate (context=0x55555686fd10, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at ../../../../glib/gmain.c:3920
#44 0x00007ffff55851d2 in g_main_loop_run (loop=0x555558b7f2f0) at ../../../../glib/gmain.c:4116
#45 0x00007ffff5b70365 in gtk_main () at ../../../../gtk/gtkmain.c:1323
#46 0x00007ffff65bb1d5 in wxGUIEventLoop::DoRun (this=0x5555594c88a0) at ../src/gtk/evtloop.cpp:65
#47 0x00007ffff613848d in wxEventLoopBase::Run (this=0x5555594c88a0) at ../src/common/evtloopcmn.cpp:78
#48 0x00007ffff6101616 in wxAppConsoleBase::MainLoop (this=this at entry=0x555556791da0) at ../src/common/appbase.cpp:334
#49 0x00007ffff6c80a39 in wxPliApp::MainLoop (this=0x555556791da0) at cpp/app.h:195
#50 0x00007ffff6c3dfe1 in XS_Wx__App_MainLoop (my_perl=0x555555868260, cv=<optimized out>) at Wx.c:15093
#51 0x000055555563fd11 in Perl_pp_entersub (my_perl=0x555555868260) at pp_hot.c:5232
#52 0x0000555555636026 in Perl_runops_standard (my_perl=0x555555868260) at run.c:42
#53 0x00005555555b2097 in S_run_body (oldscope=<optimized out>, my_perl=<optimized out>) at perl.c:2694
#54 perl_run (my_perl=0x555555868260) at perl.c:2617
#55 0x0000555555588402 in main (argc=<optimized out>, argv=<optimized out>, env=<optimized out>) at perlmain.c:122
-------------- next part --------------

# Buster amd64 qemu VM

apt update
apt dist-upgrade

apt install xserver-xorg lightdm openbox systemd-coredump gdb mc slic3r perl-debug libwx-perl-dbgsym libwxbase3.0-0v5-dbgsym libwxgtk3.0-gtk3-0v5-dbgsym libgtk-3-0-dbgsym libglib2.0-0-dbgsym slic3r-dbgsym
apt install dpkg-dev devscripts

systemctl start lightdm




mkdir source/slic3r/orig -p
cd    source/slic3r/orig
apt source slic3r
cd





# https://free3d.com/3d-model/dog-v1--722788.html#
unzip Dog_v1_L2.123c6edcac29-19b6-4703-8b46-586ed912e634.zip

export DISPLAY=:0
/usr/bin/slic3r






benutzer at debian:~$ /usr/bin/env gdb -q -ex 'set width 0' -ex 'set pagination off' --args /usr/bin/perl /usr/bin/slic3r
Reading symbols from /usr/bin/perl...(no debugging symbols found)...done.
(gdb) b stl_fix_normal_directions
Function "stl_fix_normal_directions" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (stl_fix_normal_directions) pending.
(gdb) run
...
Thread 1 "perl" hit Breakpoint 1, 0x00007ffff75a7f50 in stl_fix_normal_directions () from /usr/lib/slic3r/auto/Slic3r/XS/XS.so
(gdb) disassemble stl_fix_normal_directions,stl_fix_normal_directions+696
Dump of assembler code from 0x7ffff75a7f50 to 0x7ffff75a8208:
=> 0x00007ffff75a7f50 <stl_fix_normal_directions+0>:    cmpb   $0x0,0x130(%rdi)
...
   0x00007ffff75a8045 <stl_fix_normal_directions+245>:  mov    %esi,0x8(%rsp)
   0x00007ffff75a8049 <stl_fix_normal_directions+249>:  cmpb   $0x1,(%r15,%rax,1)
   0x00007ffff75a804e <stl_fix_normal_directions+254>:  je     0x7ffff75a8079 <stl_fix_normal_directions+297>
...



############



benutzer at debian:~$ /usr/bin/env gdb -q -ex 'set width 0' -ex 'set pagination off' --args /usr/bin/perl /usr/bin/slic3r
Reading symbols from /usr/bin/perl...(no debugging symbols found)...done.
(gdb) b stl_fix_normal_directions
Function "stl_fix_normal_directions" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (stl_fix_normal_directions) pending.
(gdb) run
Starting program: /usr/bin/perl /usr/bin/slic3r

# open file

Thread 1 "perl" hit Breakpoint 1, 0x00007ffff75a7f50 in stl_fix_normal_directions () from /usr/lib/slic3r/auto/Slic3r/XS/XS.so
(gdb) disa 1
(gdb) print stl_fix_normal_directions+249
$1 = (<text variable, no debug info> *) 0x7ffff75a8049 <stl_fix_normal_directions+249>
(gdb) b *$1
Breakpoint 2 at 0x7ffff75a8049
(gdb) cont
Continuing.

Thread 1 "perl" hit Breakpoint 2, 0x00007ffff75a8049 in stl_fix_normal_directions () from /usr/lib/slic3r/auto/Slic3r/XS/XS.so
(gdb) generate-core-file ~/core-no-crash
(gdb) detach
Detaching from program: /usr/bin/perl, process 15356
[Inferior 1 (process 15356) detached]
(gdb) q




/usr/bin/env gdb -q -ex 'set width 0' -ex 'set pagination off' --args /usr/bin/perl /usr/bin/slic3r
b stl_fix_normal_directions
y
run
disa 1
print stl_fix_normal_directions+249
b *$1
cont
generate-core-file ~/core-no-crash
detach
q







gdb -q -ex 'set width 0' -ex 'set pagination off' -ex 'directory /home/benutzer/source/slic3r/orig/slic3r-1.3.0+dfsg1/xs' /usr/bin/perl --core ~/core-no-crash



(gdb) bt
#0  0x00007ffff75a8049 in stl_fix_normal_directions () from /usr/lib/slic3r/auto/Slic3r/XS/XS.so
#1  0x00007ffff775b427 in Slic3r::TriangleMesh::repair() () from /usr/lib/slic3r/auto/Slic3r/XS/XS.so
#2  0x00007ffff75972a8 in Slic3r::ModelObject::repair() () from /usr/lib/slic3r/auto/Slic3r/XS/XS.so
#3  0x00007ffff749c46f in ?? () from /usr/lib/slic3r/auto/Slic3r/XS/XS.so
#4  0x000055555563fd11 in Perl_pp_entersub ()
#5  0x0000555555636026 in Perl_runops_standard ()
#6  0x00005555555a9f02 in Perl_call_sv ()
#7  0x00007ffff6d35fcd in wxPliEventCallback::Handler(wxEvent&) () from /usr/lib/x86_64-linux-gnu/perl5/5.28/auto/Wx/Wx.so
#8  0x00007ffff62627ae in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9  0x00007ffff6262b2a in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x00007ffff6262bc0 in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x00007ffff6262c73 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#12 0x00007ffff6262d11 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#13 0x00007ffff677840b in wxWindowBase::TryAfter(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#14 0x00007ffff6262ab7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#15 0x00007ffff672f9e5 in wxMenuBase::SendEvent(int, int) () from /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#16 0x00007ffff662f10b in ?? () from /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#17 0x00007ffff5664b6d in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff56778f3 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007ffff5680882 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007ffff5680ecf in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff5cb0aba in gtk_widget_activate () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#22 0x00007ffff5b84276 in gtk_menu_shell_activate_item () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#23 0x00007ffff5b84513 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#24 0x00007ffff5d00434 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#25 0x00007ffff5664da6 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#26 0x00007ffff568032b in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#27 0x00007ffff5680ecf in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007ffff5cae554 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#29 0x00007ffff5b6f1c6 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#30 0x00007ffff5b712e3 in gtk_main_do_event () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#31 0x00007ffff5872435 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#32 0x00007ffff58a2eb2 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#33 0x00007ffff5584c3e in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007ffff5584ed8 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007ffff55851d2 in g_main_loop_run () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007ffff5b70365 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#37 0x00007ffff65bb1d5 in wxGUIEventLoop::DoRun() () from /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#38 0x00007ffff613848d in wxEventLoopBase::Run() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#39 0x00007ffff6101616 in wxAppConsoleBase::MainLoop() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#40 0x00007ffff6c80a39 in wxPliApp::MainLoop() () from /usr/lib/x86_64-linux-gnu/perl5/5.28/auto/Wx/Wx.so
#41 0x00007ffff6c3dfe1 in ?? () from /usr/lib/x86_64-linux-gnu/perl5/5.28/auto/Wx/Wx.so
#42 0x000055555563fd11 in Perl_pp_entersub ()
#43 0x0000555555636026 in Perl_runops_standard ()
#44 0x00005555555b2097 in perl_run ()
#45 0x0000555555588402 in main ()


# With debug symbols


(gdb) bt
#0  0x00007ffff75a8049 in stl_fix_normal_directions (stl=stl at entry=0x55555983b820) at src/admesh/normals.c:147
#1  0x00007ffff775b427 in Slic3r::TriangleMesh::repair (this=0x55555983b820) at src/libslic3r/TriangleMesh.cpp:164
#2  Slic3r::TriangleMesh::repair (this=0x55555983b820) at src/libslic3r/TriangleMesh.cpp:144
#3  0x00007ffff75972a8 in Slic3r::ModelObject::repair (this=0x555555940660) at src/libslic3r/Model.cpp:583
#4  0x00007ffff749c46f in XS_Slic3r__Model__Object_repair (my_perl=<optimized out>, cv=<optimized out>) at /usr/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- -t "../xsp/typemap.xspt"  "../xsp/Model.xsp":971
#5  0x000055555563fd11 in Perl_pp_entersub (my_perl=0x555555868260) at pp_hot.c:5232
#6  0x0000555555636026 in Perl_runops_standard (my_perl=0x555555868260) at run.c:42
#7  0x00005555555a9f02 in Perl_call_sv (my_perl=my_perl at entry=0x555555868260, sv=0x555558568390, flags=flags at entry=13) at perl.c:3021
#8  0x00007ffff6d35fcd in wxPliEventCallback::Handler (this=<optimized out>, event=...) at cpp/e_cback.cpp:93
#9  0x00007ffff62627ae in wxEvtHandler::ProcessEventIfMatchesId (event=..., handler=<optimized out>, entry=...) at ../include/wx/app.h:439
#10 wxEvtHandler::ProcessEventIfMatchesId (entry=..., handler=<optimized out>, event=...) at ../src/common/event.cpp:1365
#11 0x00007ffff6262b2a in wxEvtHandler::SearchDynamicEventTable (this=0x555556791da0, event=...) at ../src/common/event.cpp:1749
#12 0x00007ffff6262bc0 in wxEvtHandler::TryHereOnly (this=0x555556791da0, event=...) at ../src/common/event.cpp:1583
#13 0x00007ffff6262c73 in wxEvtHandler::TryBeforeAndHere (event=..., this=0x555556791da0) at ../include/wx/event.h:3692
#14 wxEvtHandler::ProcessEventLocally (this=0x555556791da0, event=...) at ../src/common/event.cpp:1520
#15 0x00007ffff6262d11 in wxEvtHandler::ProcessEvent (this=0x555556791da0, event=...) at ../src/common/event.cpp:1493
#16 0x00007ffff677840b in wxWindowBase::TryAfter (this=0x555559424610, event=...) at ../include/wx/window.h:846
#17 0x00007ffff6262ab7 in wxEvtHandler::SafelyProcessEvent (this=<optimized out>, event=...) at ../src/common/event.cpp:1611
#18 0x00007ffff677992c in wxWindowBase::HandleWindowEvent (this=this at entry=0x555559424610, event=...) at ../include/wx/window.h:846
#19 0x00007ffff672f9e5 in wxMenuBase::SendEvent (this=this at entry=0x5555590d2f60, itemid=itemid at entry=117, checked=<optimized out>) at ../src/common/menucmn.cpp:666
#20 0x00007ffff662f10b in menuitem_activate (item=0x5555593a1730) at ../include/wx/menuitem.h:92
#21 menuitem_activate (item=0x5555593a1730) at ../src/gtk/menu.cpp:553
#22 0x00007ffff5664b6d in g_closure_invoke (closure=0x55555941c810, return_value=0x0, n_param_values=1, param_values=0x7fffffffd9c0, invocation_hint=0x7fffffffd940) at ../../../../gobject/gclosure.c:810
#23 0x00007ffff56778f3 in signal_emit_unlocked_R (node=node at entry=0x555556886910, detail=detail at entry=0, instance=instance at entry=0x555559266cc0, emission_return=emission_return at entry=0x0, instance_and_params=instance_and_params at entry=0x7fffffffd9c0) at ../../../../gobject/gsignal.c:3635
#24 0x00007ffff5680882 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args at entry=0x7fffffffdb70) at ../../../../gobject/gsignal.c:3391
#25 0x00007ffff5680ecf in g_signal_emit (instance=instance at entry=0x555559266cc0, signal_id=<optimized out>, detail=detail at entry=0) at ../../../../gobject/gsignal.c:3447
#26 0x00007ffff5cb0aba in gtk_widget_activate (widget=widget at entry=0x555559266cc0) at ../../../../gtk/gtkwidget.c:7777
#27 0x00007ffff5b84276 in gtk_menu_shell_activate_item (menu_shell=0x5555594182a0, menu_item=0x555559266cc0, force_deactivate=<optimized out>) at ../../../../gtk/gtkmenushell.c:1375
#28 0x00007ffff5b84513 in gtk_menu_shell_button_release (widget=0x5555594182a0, event=<optimized out>) at ../../../../gtk/gtkmenushell.c:791
#29 0x00007ffff5d00434 in _gtk_marshal_BOOLEAN__BOXEDv (closure=0x55555687b6c0, return_value=0x7fffffffdea0, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x55555687b6f0) at ../../../../gtk/gtkmarshalers.c:129
#30 0x00007ffff5664da6 in _g_closure_invoke_va (closure=0x55555687b6c0, return_value=0x7fffffffdea0, instance=0x5555594182a0, args=0x7fffffffdf70, n_params=1, param_types=0x55555687b6f0) at ../../../../gobject/gclosure.c:873
#31 0x00007ffff568032b in g_signal_emit_valist (instance=0x5555594182a0, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args at entry=0x7fffffffdf70) at ../../../../gobject/gsignal.c:3300
#32 0x00007ffff5680ecf in g_signal_emit (instance=instance at entry=0x5555594182a0, signal_id=<optimized out>, detail=detail at entry=0) at ../../../../gobject/gsignal.c:3447
#33 0x00007ffff5cae554 in gtk_widget_event_internal (widget=widget at entry=0x5555594182a0, event=event at entry=0x555559288f20) at ../../../../gtk/gtkwidget.c:7744
#34 0x00007ffff5cb066a in gtk_widget_event (widget=widget at entry=0x5555594182a0, event=event at entry=0x555559288f20) at ../../../../gtk/gtkwidget.c:7314
#35 0x00007ffff5b6f1c6 in propagate_event_up (topmost=<optimized out>, event=<optimized out>, widget=0x5555594182a0) at ../../../../gtk/gtkmain.c:2592
#36 propagate_event (widget=<optimized out>, event=0x555559288f20, captured=<optimized out>, topmost=0x0) at ../../../../gtk/gtkmain.c:2695
#37 0x00007ffff5b712e3 in gtk_main_do_event (event=0x555559288f20) at ../../../../gtk/gtkmain.c:1915
#38 gtk_main_do_event (event=<optimized out>) at ../../../../gtk/gtkmain.c:1685
#39 0x00007ffff5872435 in _gdk_event_emit (event=event at entry=0x555559288f20) at ../../../../gdk/gdkevents.c:73
#40 0x00007ffff58a2eb2 in gdk_event_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../../../../../gdk/x11/gdkeventsource.c:367
#41 0x00007ffff5584c3e in g_main_dispatch (context=0x55555686fd10) at ../../../../glib/gmain.c:3182
#42 g_main_context_dispatch (context=context at entry=0x55555686fd10) at ../../../../glib/gmain.c:3847
#43 0x00007ffff5584ed8 in g_main_context_iterate (context=0x55555686fd10, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at ../../../../glib/gmain.c:3920
#44 0x00007ffff55851d2 in g_main_loop_run (loop=0x555558b7f2f0) at ../../../../glib/gmain.c:4116
#45 0x00007ffff5b70365 in gtk_main () at ../../../../gtk/gtkmain.c:1323
#46 0x00007ffff65bb1d5 in wxGUIEventLoop::DoRun (this=0x5555594c88a0) at ../src/gtk/evtloop.cpp:65
#47 0x00007ffff613848d in wxEventLoopBase::Run (this=0x5555594c88a0) at ../src/common/evtloopcmn.cpp:78
#48 0x00007ffff6101616 in wxAppConsoleBase::MainLoop (this=this at entry=0x555556791da0) at ../src/common/appbase.cpp:334
#49 0x00007ffff6c80a39 in wxPliApp::MainLoop (this=0x555556791da0) at cpp/app.h:195
#50 0x00007ffff6c3dfe1 in XS_Wx__App_MainLoop (my_perl=0x555555868260, cv=<optimized out>) at Wx.c:15093
#51 0x000055555563fd11 in Perl_pp_entersub (my_perl=0x555555868260) at pp_hot.c:5232
#52 0x0000555555636026 in Perl_runops_standard (my_perl=0x555555868260) at run.c:42
#53 0x00005555555b2097 in S_run_body (oldscope=<optimized out>, my_perl=<optimized out>) at perl.c:2694
#54 perl_run (my_perl=0x555555868260) at perl.c:2617
#55 0x0000555555588402 in main (argc=<optimized out>, argv=<optimized out>, env=<optimized out>) at perlmain.c:122



(gdb) list
142             }
143           }
144           /* If this edge of the facet is connected: */
145           if(stl->neighbors_start[facet_num].neighbor[j] != -1) {
146             /* If we haven't fixed this facet yet, add it to the list: */
147             if(norm_sw[stl->neighbors_start[facet_num].neighbor[j]] != 1) {
148               /* Add node to beginning of list. */
149               newn = (struct stl_normal*)malloc(sizeof(struct stl_normal));
150               if(newn == NULL) perror("stl_fix_normal_directions");
151               newn->facet_num = stl->neighbors_start[facet_num].neighbor[j];



(gdb) disassemble /m stl_fix_normal_directions,stl_fix_normal_directions+696 
Dump of assembler code from 0x7ffff75a7f50 to 0x7ffff75a8208:
88      stl_fix_normal_directions(stl_file *stl) {
...
146             /* If we haven't fixed this facet yet, add it to the list: */
147             if(norm_sw[stl->neighbors_start[facet_num].neighbor[j]] != 1) {
   0x00007ffff75a8042 <stl_fix_normal_directions(stl_file*)+242>:       movslq %esi,%rax
   0x00007ffff75a8045 <stl_fix_normal_directions(stl_file*)+245>:       mov    %esi,0x8(%rsp)
=> 0x00007ffff75a8049 <stl_fix_normal_directions(stl_file*)+249>:       cmpb   $0x1,(%r15,%rax,1)
   0x00007ffff75a804e <stl_fix_normal_directions(stl_file*)+254>:       je     0x7ffff75a8079 <stl_fix_normal_directions(stl_file*)+297>

148               /* Add node to beginning of list. */




(gdb) info local
norm_sw = 0x5555595b85a0 "\001"
checked = 1
facet_num = <optimized out>
i = <optimized out>
j = 0
head = 0x555559783500
tail = 0x555559812800
newn = <optimized out>
temp = <optimized out>

(gdb) print/x $rax
$1 = 0x25
(gdb) print/x $r15
$2 = 0x5555595b85a0



############






More information about the 3dprinter-general mailing list