Is this issue reproducible in the latest nightly build?
- [x] I have checked the latest nightly build and the issue is still reproducible
Is there an existing issue for this problem?
- [x] I have searched the existing issues
OrcaSlicer Version
2.4.0
Operating System (OS)
Linux
OS Version
Additional system information
TigerLake-LP GT2 [Iris Xe Graphics]
GL driver: iris (native). Crash happens only with iris; it does not happen with zink or llvmpipe
Mesa, Vulkan 26.1.3
Wayland 1.25.0
Printer
How to reproduce
- Launch OrcaSlicer with the native Intel driver (hardware OpenGL).
- New project → add a default cube.
- Click Slice plate.
Actual results
Immediate Segmentation fault (core dumped).
SIGSEGV (si_code=SEGV_MAPERR, si_addr=NULL). No useful entry is written to the OrcaSlicer log.
Expected results
The plate slices and its thumbnail is generated without crashing.
Project file & Debug log uploads
cube.zip
Checklist of files to include
- [x] Log file
- [x] Project file
Anything else?
OrcaSlicer segfaults the instant a plate is sliced. The crash is a NULL-pointer dereference inside an OpenGL draw call issued during plate-thumbnail generation.
It is not geometry-specific — it reproduces with a single default cube on an otherwise empty project.
Slicing switches to the 3D view, whose focus-in handler calls Plater::update_all_plate_thumbnails(). Thumbnail rendering reaches GLModel::render(), which issues:
glDrawElements(GL_TRIANGLES, count=30336, type=GL_UNSIGNED_SHORT, indices=0x0)
with no element-array-buffer bound to the active VAO. Because nothing is bound, Mesa interprets indices=0x0 as a client-side index-array pointer (valid only in a compatibility-profile context) and tries to memcpy() the index data from address 0 → segfault.
In other words, the thumbnail / simple_render path emits an indexed draw whose index buffer is either never created (IBO id 0) or not bound, while count is non-zero. The native iris driver + gallium threaded context dereferences the NULL pointer and dies; llvmpipe and zink don't take that path, which is why the workarounds below avoid the crash instead of fixing the underlying invalid draw. The fix should be on the OrcaSlicer side: don't emit a draw with a NULL index pointer / unbound element buffer.
Backtrace (OrcaSlicer + Mesa with symbols)
(gdb) bt
#0 __memcpy_evex_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:265
#1 0x00007f706f270db8 in tc_draw_user_indices_single
(_pipe=0x560b6f7ced60, info=0x7ffe34ac3e30, drawid_offset=<optimized out>, indirect=<optimized out>, draws=0x7ffe34ac3e20, num_draws=<optimized out>)
at ../mesa-26.1.3/src/gallium/auxiliary/util/u_threaded_context.c:3966
#2 0x00007f706f26ae29 in tc_draw_vbo
(_pipe=0x560b6f7ced60, info=<optimized out>, drawid_offset=<optimized out>, indirect=<optimized out>, draws=<optimized out>, num_draws=<optimized out>)
at ../mesa-26.1.3/src/gallium/auxiliary/util/u_threaded_context.c:4233
#3 0x00007f706ed1d8eb in _mesa_validated_drawrangeelements
(ctx=ctx@entry=0x560b6f870600, index_bo=<optimized out>, mode=mode@entry=4, index_bounds_valid=index_bounds_valid@entry=false, start=start@entry=0, end=end@entry=4294967295, count=30336, type=5123, indices=0x0, basevertex=0, numInstances=1, baseInstance=0) at ../mesa-26.1.3/src/mesa/main/draw.c:1696
#4 0x00007f706ed1eef7 in _mesa_DrawElementsBaseVertex (mode=4, count=30336, type=5123, indices=0x0, basevertex=0) at ../mesa-26.1.3/src/mesa/main/draw.c:1839
#5 0x0000560b3283f8d6 in Slic3r::GUI::GLModel::render(std::pair<unsigned long, unsigned long> const&, Slic3r::GLShaderProgram*) ()
#6 0x0000560b3283f566 in Slic3r::GUI::GLModel::render(Slic3r::GLShaderProgram*) ()
#7 0x0000560b323b7698 in Slic3r::GLVolume::simple_render(Slic3r::GLShaderProgram*, std::vector<Slic3r::ModelObject*, std::allocator<Slic3r::ModelObject*> >&, std::vector<Slic3r::ColorRGBA, std::allocator<Slic3r::ColorRGBA> >&, bool) ()
#8 0x0000560b3266287c in Slic3r::GUI::GLCanvas3D::render_thumbnail_internal(Slic3r::ThumbnailData&, Slic3r::ThumbnailsParams const&, Slic3r::GUI::PartPlateList&, std::vector<Slic3r::ModelObject*, std::allocator<Slic3r::ModelObject*> >&, Slic3r::GLVolumeCollection const&, std::vector<Slic3r::ColorRGBA, std::allocator<Slic3r::ColorRGBA> >&, Slic3r::GLShaderProgram*, Slic3r::GUI::Camera::EType, Slic3r::GUI::Camera::ViewAngleType, bool, bool) ()
#9 0x0000560b3264c6e6 in Slic3r::GUI::GLCanvas3D::render_thumbnail_framebuffer(Slic3r::ThumbnailData&, unsigned int, unsigned int, Slic3r::ThumbnailsParams const&, Slic3r::GUI::PartPlateList&, std::vector<Slic3r::ModelObject*, std::allocator<Slic3r::ModelObject*> >&, Slic3r::GLVolumeCollection const&, std::vector<Slic3r::ColorRGBA, std::allocator<Slic3r::ColorRGBA> >&, Slic3r::GLShaderProgram*, Slic3r::GUI::Camera::EType, Slic3r::GUI::Camera::ViewAngleType, bool, bool) ()
#10 0x0000560b3264ba82 in Slic3r::GUI::GLCanvas3D::render_thumbnail(Slic3r::ThumbnailData&, unsigned int, unsigned int, Slic3r::ThumbnailsParams const&, std::vector<Slic3r::ModelObject*, std::allocator<Slic3r::ModelObject*> >&, Slic3r::GLVolumeCollection const&, Slic3r::GUI::Camera::EType, Slic3r::GUI::Camera::ViewAngleType, bool, bool) ()
#11 0x0000560b3264b8c1 in Slic3r::GUI::GLCanvas3D::render_thumbnail(Slic3r::ThumbnailData&, unsigned int, unsigned int, Slic3r::ThumbnailsParams const&, Slic3r::GUI::Camera::EType, Slic3r::GUI::Camera::ViewAngleType, bool, bool) ()
#12 0x0000560b32e045c2 in Slic3r::GUI::Plater::update_all_plate_thumbnails(bool) ()
#13 0x0000560b32655428 in Slic3r::GUI::GLCanvas3D::on_set_focus(wxFocusEvent&) ()
...
#44 0x0000560b32e19de3 in Slic3r::GUI::Plater::priv::set_current_panel(wxPanel*, bool) ()
#45 0x0000560b32e20c58 in Slic3r::GUI::Plater::priv::select_view_3D(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) ()
#46 0x0000560b32e171ae in Slic3r::GUI::Plater::priv::on_action_slice_plate(Slic3r::GUI::SimpleEvent&) ()
Workarounds
MESA_LOADER_DRIVER_OVERRIDE=zink
LIBGL_ALWAYS_SOFTWARE=1
Possibly related #12758 — Mesa errors / blank 3D build plate on recent Mesa, with the same zink + software-rendering workarounds.