f3d: Segfault when thumbnailing with nautilus (Headless support)

Describe the bug F3D segfaults when Nautilus asks it to generate thumbnails.

To Reproduce Steps to reproduce the behavior:

  1. Open a directory containing files to be thumbnailed by F3D in Nautilus
  2. Observe the crash in journalctl -f

Note that I can open the files just fine in f3d directly and can also do

❯ f3d --dry-run -sta --no-background --output=out.png --resolution="256,256" ~/Downloads/Messbecher-20210813.STL

out You can find the STL here: https://www.printables.com/model/73864-washing-powder-scoop/files (but it will happen to every 3D model, not just this one)

Expected behavior I expected thumbnails to be generated and shown in the file manager.

System Information:

  • OS: ❯ uname -a Linux tpxy 5.19.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 05 Sep 2022 18:09:09 +0000 x86_64 GNU/Linux
  • GPU and GPU driver: Mesa Intel® HD Graphics 620 (KBL GT2)

F3D Information Paste the content of f3d --version:

❯ f3d --version
f3d 1.3.1

F3D - A fast and minimalist 3D viewer
Version: 1.3.1.
Build date: 2022-09-26 21:20:02.
Build system: Linux x86_64.
Compiler: GNU 12.2.0.
External rendering module: ON.
Raytracing module: ON.
Exodus module: ON.
OpenCASCADE module: 7.5.3 (full support).
Assimp module: 5.2.4.
Alembic module: 1.8.3.
VTK version: 9.1.0 (build 0).
Copyright (C) 2019-2021 Kitware SAS.
Copyright (C) 2021-2022 Michael Migliore, Mathieu Westphal.
License BSD-3-Clause.
By Michael Migliore, Mathieu Westphal and Joachim Pouderoux.

Additional context

❯ coredumpctl -1 info

           PID: 86471 (f3d)
           UID: 1000 (laurenz)
           GID: 1000 (laurenz)
        Signal: 11 (SEGV)
     Timestamp: Mon 2022-09-26 23:22:41 CEST (18min ago)
  Command Line: f3d --config=thumbnail --quiet --output=/tmp/gnome-desktop-thumbnailer.png --resolution=256,256 /tmp/LGX-Lite-Simplified-V6.step
    Executable: /usr/bin/f3d
 Control Group: /user.slice/user-1000.slice/user@1000.service/session.slice/dbus.service
          Unit: user@1000.service
     User Unit: dbus.service
         Slice: user-1000.slice
     Owner UID: 1000 (laurenz)
       Boot ID: 4c979aced18544ba8adbdb95256a66c9
    Machine ID: d2a6ddbbc02a477f9211d600d9bc5086
      Hostname: tpxy
       Storage: /var/lib/systemd/coredump/core.f3d.1000.4c979aced18544ba8adbdb95256a66c9.86471.1664227361000000.zst (present)
     Disk Size: 2.8M
       Message: Process 86471 (f3d) of user 1000 dumped core.

Stacktrace (via coredumpctl -1 debug):

Core was generated by `f3d --config=thumbnail --quiet --output=/tmp/gnome-desktop-thumbnailer.png --re'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f138293d0ed in XSync () from /usr/lib/libX11.so.6
(gdb) bt full
#0  0x00007f138293d0ed in XSync () at /usr/lib/libX11.so.6
#1  0x00007f1382a503cb in vtkXRenderWindowInteractor::Initialize() () at /usr/lib/libvtkRenderingUI.so.1
#2  0x00007f138e1514d7 in f3d::detail::interactor_impl::internals::internals(f3d::options&, f3d::detail::window_impl&, f3d::detail::loader_impl&) (this=0x55586dc26510, options=<optimized out>, window=<optimized out>, loader=<optimized out>)
    at /usr/src/debug/f3d/library/src/interactor_impl.cxx:36
        keyPressCallback = {Object = <optimized out>}
        dropFilesCallback = {Object = <optimized out>}
#3  0x00007f138e14f2b1 in std::make_unique<f3d::detail::interactor_impl::internals, f3d::options&, f3d::detail::window_impl&, f3d::detail::loader_impl&>(f3d::options&, f3d::detail::window_impl&, f3d::detail::loader_impl&) ()
    at /usr/include/c++/12.2.0/bits/unique_ptr.h:1065
#4  f3d::detail::interactor_impl::interactor_impl(f3d::options&, f3d::detail::window_impl&, f3d::detail::loader_impl&) (this=this@entry=0x55586dc22260, options=..., window=..., loader=...) at /usr/src/debug/f3d/library/src/interactor_impl.cxx:299
#5  0x00007f138e13c9f7 in std::make_unique<f3d::detail::interactor_impl, f3d::options&, f3d::detail::window_impl&, f3d::detail::loader_impl&>(f3d::options&, f3d::detail::window_impl&, f3d::detail::loader_impl&) ()
    at /usr/include/c++/12.2.0/bits/unique_ptr.h:1064
#6  f3d::engine::engine(f3d::window::Type) (this=this@entry=0x55586dc2d670, windowType=windowType@entry=f3d::window::Type::NATIVE_OFFSCREEN) at /usr/src/debug/f3d/library/src/engine.cxx:43
#7  0x000055586bbe4129 in std::make_unique<f3d::engine, f3d::window::Type>(f3d::window::Type&&) () at /usr/include/c++/12.2.0/bits/unique_ptr.h:1064
        window = <optimized out>
        interactor = <optimized out>
        files = std::vector of length 1, capacity 1 = {"/tmp/LGX-Lite-Simplified-V6.step"}
#8  F3DStarter::Start(int, char**) (this=this@entry=0x7ffcb9a88920, argc=argc@entry=6, argv=argv@entry=0x7ffcb9a88a58) at /usr/src/debug/f3d/application/F3DStarter.cxx:129
        window = <optimized out>
        interactor = <optimized out>
        files = std::vector of length 1, capacity 1 = {"/tmp/LGX-Lite-Simplified-V6.step"}
#9  0x000055586bb88c8b in main(int, char**) (argc=6, argv=0x7ffcb9a88a58) at /usr/src/debug/f3d/application/main.cxx:13
        starter = {Internals = std::unique_ptr<F3DStarter::F3DInternals> = {get() = 0x55586dc0ef30}}
        res = 1

Attached dumpfile:

❯ coredumpctl dump -1 > f3d-crash-2022092.dump                 
❯ tar cavf f3d-crash-2022092.dump.tar.gz f3d-crash-2022092.dump

Dumpfile: f3d-crash-2022092.dump.tar.gz

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

We discussed this with @Meakk , it may be not that hard to add EGL support to F3D, we will look into it !