flathub / com.prusa3d.PrusaSlicer

https://flathub.org/apps/details/com.prusa3d.PrusaSlicer
8 stars 14 forks source link

Crash with "Complete individual objects" #55

Closed friedelwolff closed 1 year ago

friedelwolff commented 1 year ago

I realise this might be an upstream bug, but I thought I'll start here, since I'm using version 2.5.0 from flathub.

When slicing with the option Print Settings -> Output options -> Complete individual objects enabled, I get a crash with this error:

/usr/include/c++/11.3.0/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = double; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::reference = double&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__n < this->size()' failed.

It is reproducible on the project where I wanted to use that setting, but on another, no crash occurs. I assume you'll need more information, but I'm not sure what is best. I attach the .3mf file (zipped) as first guess to what you'll need to reproduce.

onder.zip

xarbit commented 1 year ago

Hi @friedelwolff ..

thanks for your report. Can you please do us a favor, can you download the official AppImage with Gtk3 from Prusa3D and do the same test?

Download: https://github.com/prusa3d/PrusaSlicer/releases/tag/version_2.5.0

That would be a big help to decide where this issue belongs, if the AppImage has the same issue then it might be an upstream bug.

Let us know.

Thanks a lot!

eliadevito commented 1 year ago

Hi to all, I can reproduce this only with flatpak version, the appimages version seems to work fine.

From backtrace seems to crash during the rendering of the layers slider (maybe there is a problem with wxwidget), I will investigate on this during the weekend.

backtrace:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007ffff694c857 in __GI_abort () at abort.c:79
#2  0x0000555555996d06 in std::__replacement_assert(char const*, int, char const*, char const*)
    (__file=__file@entry=0x555557495e78 "/usr/include/c++/11.3.0/bits/stl_vector.h", __line=__line@entry=1045, __function=__function@entry=0x5555574972d0 "std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = double; _Alloc = std::allocator<double>; std::vector<_Tp, _Alloc>::reference ="..., __condition=__condition@entry=0x555557495d2b "__n < this->size()") at /usr/include/c++/11.3.0/x86_64-unknown-linux-gnu/bits/c++config.h:514
#3  0x000055555671dda8 in std::vector<double, std::allocator<double> >::operator[](unsigned long) (this=<optimized out>, this=0x55555b398ab0, __n=1)
    at /usr/include/c++/11.3.0/bits/stl_vector.h:1045
#4  Slic3r::DoubleSlider::Control::draw_ruler(wxDC&) (this=0x55555b396e80, dc=...) at /run/build/PrusaSlicer/src/slic3r/GUI/DoubleSlider.cpp:1167
#5  0x000055555672363b in Slic3r::DoubleSlider::Control::render() (this=0x55555b396e80) at /run/build/PrusaSlicer/src/slic3r/GUI/DoubleSlider.cpp:529
#6  0x00005555573d5676 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (entry=<optimized out>, entry=<optimized out>, event=
    ..., handler=<optimized out>) at /run/build/PrusaSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/common/event.cpp:1425
#7  wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (entry=<optimized out>, handler=<optimized out>, event=...)
    at /run/build/PrusaSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/common/event.cpp:1400
#8  0x00005555573d5aa1 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) (this=this@entry=0x55555b396e80, event=...)
    at /run/build/PrusaSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/common/event.cpp:1897
#9  0x00005555573d5bfd in wxEvtHandler::TryHereOnly(wxEvent&) (this=0x55555b396e80, event=...)
    at /run/build/PrusaSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/common/event.cpp:1618
#10 0x00005555573d5cb0 in wxEvtHandler::TryBeforeAndHere(wxEvent&) (event=..., this=0x55555b396e80)
    at /run/build/PrusaSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/include/wx/event.h:3927
#11 wxEvtHandler::ProcessEventLocally(wxEvent&) (this=0x55555b396e80, event=...) at /run/build/PrusaSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/common/event.cpp:1555
#12 0x00005555573d5d6a in wxEvtHandler::ProcessEvent(wxEvent&) (this=0x55555b396e80, event=...)
    at /run/build/PrusaSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/common/event.cpp:1528
#13 0x00005555573d6734 in wxEvtHandler::SafelyProcessEvent(wxEvent&) (this=<optimized out>, event=...)
    at /run/build/PrusaSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/common/event.cpp:1646
#14 0x000055555714aca0 in wxWindowBase::HandleWindowEvent(wxEvent&) const (this=this@entry=0x55555b396e80, event=...)
    at /run/build/PrusaSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/common/wincmn.cpp:1570
#15 0x00005555571f2292 in wxWindow::GTKSendPaintEvents(_cairo*) (this=0x55555b396e80, cr=0x55555830a870)
    at /run/build/PrusaSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/gtk/window.cpp:5243
#16 0x00005555571f2853 in draw(GtkWidget*, cairo_t*, wxWindow*) (cr=0x55555830a870, win=0x55555b396e80)
    at /run/build/PrusaSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/gtk/window.cpp:425
#17 0x00007ffff742c5b1 in _gtk_marshal_BOOLEAN__BOXED
    (closure=closure@entry=0x55555b2bb0b0, return_value=return_value@entry=0x7fffffff6720, n_param_values=n_param_values@entry=2, param_values=param_values@entry=0x7fffffff6780, invocation_hint=invocation_hint@entry=0x7fffffff6700, marshal_data=marshal_data@entry=0x0) at gtkmarshalers.c:83
#18 0x00007ffff73d0444 in gtk_widget_draw_marshaller
    (closure=closure@entry=0x55555b2bb0b0, return_value=return_value@entry=0x7fffffff6720, n_param_values=n_param_values@entry=2, param_values=param_values@entry=0x7fffffff6780, invocation_hint=invocation_hint@entry=0x7fffffff6700, marshal_data=marshal_data@entry=0x0) at ../../gtk/gtkwidget.c:951
#22 0x00007ffff6cc8ab3 in <emit signal ??? on instance 0x55555b2419c0 [wxPizza]> (instance=instance@entry=0x55555b2419c0, signal_id=<optimized out>, detail=detail@entry=0)
    at ../gobject/gsignal.c:3553
    #19 0x00007ffff6cae349 in g_closure_invoke
    (closure=0x55555b2bb0b0, return_value=return_value@entry=0x7fffffff6720, n_param_values=2, param_values=param_values@entry=0x7fffffff6780, invocation_hint=invocation_hint@entry=0x7fffffff6700) at ../gobject/gclosure.c:810
    #20 0x00007ffff6cc1aef in signal_emit_unlocked_R
xarbit commented 1 year ago

awesome 👏

eliadevito commented 1 year ago

Hi @friedelwolff, sorry for the long delay in replying, can you test the build in this pull request and tell me if it solves the problem for you?

friedelwolff commented 1 year ago

Thank you for the work on this! I won't be able to confirm any time soon, unfortunately. I might only get back to these things in the new year.