Open aeonik opened 2 months ago
Same issue, bambu-studio crashes too It seems after some recent system updates on Arch. Previous versions of orca slicers do not start too
[lzhecz@arch ~]$ orca-slicer
[2024-08-15 21:40:49.050649] [0x0000700b1b8d8b80] [trace] Initializing StaticPrintConfigs
add font of HarmonyOS_Sans_SC_Bold returns 1
add font of HarmonyOS_Sans_SC_Regular returns 1
add font of NanumGothic-Regular returns 1
add font of NanumGothic-Bold returns 1
zsh: segmentation fault (core dumped) orca-slicer
same....
[2024-08-15 22:05:46.193722] [0x00007cf6df338b80] [trace] Initializing StaticPrintConfigs add font of HarmonyOS_Sans_SC_Bold returns 1 add font of HarmonyOS_Sans_SC_Regular returns 1 add font of NanumGothic-Regular returns 1 add font of NanumGothic-Bold returns 1 Segmentation fault (core dumped)
Same experience here on Garuda Linux.
Related bambustudio issue: bambulab/BambuStudio#4634
Same here, as said above it should be some package update in Arch because before updating it worked flawless. Still working Bambu Studio for me though
Downgrading freetype2 to 2.13.2-2
fixed this for me.
same here, Arch Linux. Downgrading freetype2 also solves the issue.
Can also confirm that downgrading freetype2 fixes this issue!
How can such an update cause an entire application to segfault? I don't know if freetype follows semver, but if they do, this little patch update shouldn't break anything. The question is, who is responsible for the breakage in the first place? Is it freetype, arch or orca? I can confirm downgrading freetype2 fixes the issue.
Trying to assign blame like that isn’t helpful. Sometimes things break and it’s no one’s fault, esp since arch isn’t even officially supported. the freetype project dates back to 1996, so they may follow some type of semver but it’s not a perfect system, and you don’t always know when a change is breaking. freetype2 is from the main arch repos, and it’s gonna be tested against other stuff in the main repos, but it can’t and shouldn’t be tested against every aur package.
Looking at the gdb output I see that the crash is caused by a return value from Cairo and/or Pango while getting information on a font with a 'COL' v1 table (most likely an Emoji font). You should thus first contact the Cairo people asking for help – of course it is also possible that this is a problem of OrcaSlicer (I have no idea). To do that efficiently you should build the crashing program without any optimizations to get better stack traces – in particular, the topmost frame (#0) doesn't give any useful information, which means it is not clear at all where the program crashes.
How can such an update cause an entire application to segfault? I don't know if freetype follows semver, but if they do, this little patch update shouldn't break anything. The question is, who is responsible for the breakage in the first place? Is it freetype, arch or orca? I can confirm downgrading freetype2 fixes the issue.
Running Arch and other bleeding distros is nice because it gives us the latest software, but it's called bleeding edge because we get cut sometimes.
It's nice though because we find these issues and can get this information to the developers that build our software, so they know to fix it.
We are the canaries of the software coal mines. It's not glamourous, it's frustrating, but somebody has to do it.
Regards, Aeonik
Trying to assign blame like that isn’t helpful. Sometimes things break and it’s no one’s fault, esp since arch isn’t even officially supported. the freetype project dates back to 1996, so they may follow some type of semver but it’s not a perfect system, and you don’t always know when a change is breaking. freetype2 is from the main arch repos, and it’s gonna be tested against other stuff in the main repos, but it can’t and shouldn’t be tested against every aur package.
I understand and I'm not trying to assign a blame to anyone. For lack of better words my comment turned out to appear negative. I apologize for that. I'm just trying to understand which component is causing the segfault – is it freetype2 with a bug or breaking change or is it Orca for using something in freetype2 in a way that didn't cause issues before but now does, or is it an Arch specific issue. It's really just a question.
Running Arch and other bleeding distros is nice because it gives us the latest software, but it's called bleeding edge because we get cut sometimes.
It's nice though because we find these issues and can get this information to the developers that build our software, so they know to fix it.
We are the canaries of the software coal mines. It's not glamourous, it's frustrating, but somebody has to do it.
I agree with that. It gives us the opportunity to fix things before they arise at users more downstream or with non-rolling distros.
_cairo_ft_scaled_glyph_is_colr_v1
straightforwardly calls FT_Get_Color_Glyph_Paint
. The trace is lost there because FreeType's debug information is missing. In other words the backtrace needs to be improved once the missing package is installed or FreeType is recompiled with -g
.
Don't despair, improve the backtrace.
Don't despair, improve the backtrace.
So let's wait for that :slightly_smiling_face:
While imperfect, this should be a slightly improved backtrace.
Thread 1 "orcaslicer_main" received signal SIGSEGV, Segmentation fault.
0x000055555913de74 in tt_face_get_paint_layers ()
(gdb) thread apply all bt
Thread 7 (Thread 0x7fffdda006c0 (LWP 2945021) "pool-orca-slice"):
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007ffff6dc7367 in g_cond_wait_until (cond=<optimized out>, mutex=0x55555bdfef00, end_time=<optimized out>) at ../glib/glib/gthread-posix.c:1677
#2 0x00007ffff6d348d5 in g_async_queue_pop_intern_unlocked (queue=0x55555bdfef00, wait=1, end_time=2075481119181) at ../glib/glib/gasyncqueue.c:378
#3 0x00007ffff6da127b in g_thread_pool_wait_for_new_task (pool=0x55555bdf1170) at ../glib/glib/gthreadpool.c:260
#4 g_thread_pool_thread_proxy (data=<optimized out>) at ../glib/glib/gthreadpool.c:325
#5 0x00007ffff6d9b266 in g_thread_proxy (data=0x7fffd8015bb0) at ../glib/glib/gthread.c:835
#6 0x00007fffef8a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#7 0x00007fffef92849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Thread 6 (Thread 0x7fffde4006c0 (LWP 2945020) "gdbus"):
#0 0x00007fffef91a63d in __GI___poll (fds=0x7fffc4000b90, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007ffff6dcd92d in g_main_context_poll_unlocked (priority=2147483647, context=0x55555be0c020, timeout=<optimized out>, fds=0x7fffc4000b90, n_fds=2) at ../glib/glib/gmain.c:4521
#2 g_main_context_iterate_unlocked.isra.0 (context=0x55555be0c020, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4212
#3 0x00007ffff6d6c7b7 in g_main_loop_run (loop=0x55555ba1fa10) at ../glib/glib/gmain.c:4419
#4 0x00007ffff6fce574 in gdbus_shared_thread_func (user_data=0x55555be0bff0) at ../glib/gio/gdbusprivate.c:284
#5 0x00007ffff6d9b266 in g_thread_proxy (data=0x55555be0c120) at ../glib/glib/gthread.c:835
#6 0x00007fffef8a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#7 0x00007fffef92849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Thread 5 (Thread 0x7fffdee006c0 (LWP 2945019) "gmain"):
#0 0x00007fffef91a63d in __GI___poll (fds=0x55555b48fea0, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007ffff6dcd92d in g_main_context_poll_unlocked (priority=2147483647, context=0x55555be007c0, timeout=<optimized out>, fds=0x55555b48fea0, n_fds=2) at ../glib/glib/gmain.c:4521
#2 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x55555be007c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4212
#3 0x00007ffff6d6afc5 in g_main_context_iteration (context=0x55555be007c0, may_block=may_block@entry=1) at ../glib/glib/gmain.c:4282
#4 0x00007ffff6d6b01a in glib_worker_main (data=<optimized out>) at ../glib/glib/gmain.c:6442
#5 0x00007ffff6d9b266 in g_thread_proxy (data=0x55555be009c0) at ../glib/glib/gthread.c:835
#6 0x00007fffef8a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#7 0x00007fffef92849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Thread 4 (Thread 0x7fffe02006c0 (LWP 2945018) "pool-spawner"):
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007ffff6dc6a10 in g_cond_wait (cond=0x55555bdfed58, mutex=0x55555bdfed50) at ../glib/glib/gthread-posix.c:1552
#2 0x00007ffff6d3490c in g_async_queue_pop_intern_unlocked (queue=0x55555bdfed50, wait=1, end_time=-1) at ../glib/glib/gasyncqueue.c:375
#3 0x00007ffff6da06b7 in g_thread_pool_spawn_thread (data=<optimized out>) at ../glib/glib/gthreadpool.c:297
#4 0x00007ffff6d9b266 in g_thread_proxy (data=0x55555bdfdf90) at ../glib/glib/gthread.c:835
#5 0x00007fffef8a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#6 0x00007fffef92849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Thread 3 (Thread 0x7fffdf8006c0 (LWP 2945012) "orcaslicer_main"):
#0 FcCompareValueList (object=50, match=0x7ffff69b6610 <_FcMatchers+1200>, v1orig=0x55555c168390, v2orig=<optimized out>, bestValue=bestValue@entry=0x0, value=value@entry=0x7fffdc6392f8, n=0x0, result=0x7fffdf7f2a20) at ../fontconfig/src/fcmatch.c:435
#1 0x00007ffff69886b8 in FcCompare (pat=pat@entry=0x55555bfa2ba0, fnt=0x7fffe0534620, value=value@entry=0x7fffdc6392f8, result=result@entry=0x7fffdf7f2a20, data=data@entry=0x7fffdf7f2978) at ../fontconfig/src/fcmatch.c:647
#2 0x00007ffff698ed94 in IA__FcFontSetSort (config=<optimized out>, sets=sets@entry=0x55555bfa2c10, nsets=nsets@entry=1, p=0x55555bfa2ba0, trim=trim@entry=1, csp=csp@entry=0x0, result=0x7fffdf7f2a20) at ../fontconfig/src/fcmatch.c:1275
#3 0x00007ffff695874b in sort_in_thread (task_data=0x55555bfa2c00) at ../pango/pango/pangofc-fontmap.c:932
#4 fc_thread_func (data=0x55555b3b0d00) at ../pango/pango/pangofc-fontmap.c:972
#5 0x00007ffff6d9b266 in g_thread_proxy (data=0x55555b3b03b0) at ../glib/glib/gthread.c:835
#6 0x00007fffef8a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#7 0x00007fffef92849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Thread 1 (Thread 0x7fffeb24eb80 (LWP 2944172) "orcaslicer_main"):
#0 0x000055555913de74 in tt_face_get_paint_layers ()
#1 0x00007ffff716778d in _cairo_ft_scaled_glyph_is_colr_v1 (scaled_font=<optimized out>, scaled_glyph=0x55555c1e8730, face=0x55555bfa32e0) at ../cairo/src/cairo-ft-font.c:3266
#2 _cairo_ft_scaled_glyph_init_metrics (foreground_color=0x7ffff71d0c00 <cairo_color_black.lto_priv>, load_flags=66048, vertical_layout=0, face=0x55555bfa32e0, scaled_glyph=0x55555c1e8730, scaled_font=<optimized out>) at ../cairo/src/cairo-ft-font.c:3335
#3 _cairo_ft_scaled_glyph_init (abstract_font=<optimized out>, scaled_glyph=0x55555c1e8730, info=CAIRO_SCALED_GLYPH_INFO_METRICS, foreground_color=0x7ffff71d0c00 <cairo_color_black.lto_priv>) at ../cairo/src/cairo-ft-font.c:3453
#4 0x00007ffff711dd00 in _cairo_scaled_glyph_lookup (scaled_font=scaled_font@entry=0x55555be98ef0, index=<optimized out>, info=info@entry=CAIRO_SCALED_GLYPH_INFO_METRICS, foreground_color=0x7ffff71d0c00 <cairo_color_black.lto_priv>, foreground_color@entry=0x0, scaled_glyph_ret=scaled_glyph_ret@entry=0x7fffffff4fa0) at ../cairo/src/cairo-scaled-font.c:2913
#5 0x00007ffff711df87 in cairo_scaled_font_glyph_extents (scaled_font=0x55555be98ef0, glyphs=glyphs@entry=0x7fffffff4ff0, num_glyphs=num_glyphs@entry=1, extents=extents@entry=0x7fffffff5010) at ../cairo/src/cairo-scaled-font.c:1643
#6 0x00007ffff7eac242 in compute_glyph_extents (cf_priv=0x55555c1e4e28, glyph=28635, entry=0x55555c1e8378) at ../pango/pango/pangocairo-font.c:807
#7 _pango_cairo_font_private_get_glyph_extents_cache_entry (cf_priv=0x55555c1e4e28, glyph=28635) at ../pango/pango/pangocairo-font.c:833
#8 _pango_cairo_font_private_get_glyph_extents (cf_priv=0x55555c1e4e28, glyph=28635, ink_rect=0x7fffffff50c0, logical_rect=0x7fffffff50d0) at ../pango/pango/pangocairo-font.c:870
#9 pango_cairo_fc_font_get_glyph_extents (font=0x55555c1e4db0, glyph=28635, ink_rect=0x7fffffff50c0, logical_rect=0x7fffffff50d0) at ../pango/pango/pangocairo-fcfont.c:130
#10 0x00007ffff79d1779 in pango_glyph_string_extents_range (glyphs=0x55555b3b5400, start=0, end=5, font=0x55555c1e4db0, ink_rect=<optimized out>, logical_rect=0x7fffffff5180) at ../pango/pango/glyphstring.c:210
#11 pango_glyph_string_extents_range (glyphs=0x55555b3b5400, start=0, end=5, font=0x55555c1e4db0, ink_rect=<optimized out>, logical_rect=0x7fffffff5180) at ../pango/pango/glyphstring.c:164
#12 0x00007ffff79ea01a in pango_layout_run_get_extents_and_height (run=0x55555c16a940, run_ink=run_ink@entry=0x7fffffff5260, run_logical=0x7fffffff5180, run_logical@entry=0x0, line_logical=line_logical@entry=0x7fffffff5250, height=height@entry=0x7fffffff524c) at ../pango/pango/pango-layout.c:5640
#13 0x00007ffff79eb253 in pango_layout_line_get_extents_and_height.part.0.lto_priv.0 (line=0x55555c0971a0, ink_rect=<optimized out>, logical_rect=<optimized out>, height=<optimized out>) at ../pango/pango/pango-layout.c:5836
#14 0x00007ffff79dfb46 in pango_layout_line_get_extents_and_height (line=0x55555c0971a0, ink_rect=0x0, logical_rect=0x7fffffff52e0, height=0x7fffffff52d8) at ../pango/pango/pango-layout.c:5779
#15 get_line_extents_layout_coords (layout=layout@entry=0x55555bfa25e0, line=0x55555c0971a0, layout_width=layout_width@entry=-1, y_offset=0, baseline=baseline@entry=0x7fffffff539c, line_ink_layout=line_ink_layout@entry=0x0, line_logical_layout=0x7fffffff53a0) at ../pango/pango/pango-layout.c:2877
#16 0x00007ffff79dff6c in pango_layout_get_extents_internal (layout=0x55555bfa25e0, ink_rect=<optimized out>, ink_rect@entry=0x0, logical_rect=<optimized out>, logical_rect@entry=0x7fffffff5410, line_extents=line_extents@entry=0x0) at ../pango/pango/pango-layout.c:3001
#17 0x00007ffff79e0220 in pango_layout_get_extents (layout=<optimized out>, ink_rect=ink_rect@entry=0x0, logical_rect=logical_rect@entry=0x7fffffff5410) at ../pango/pango/pango-layout.c:3118
#18 0x00007ffff79e026e in pango_layout_get_size (layout=<optimized out>, width=0x7fffffff5700, height=0x7fffffff5620) at ../pango/pango/pango-layout.c:3166
#19 0x00007ffff79ee827 in pango_layout_check_lines.part.0.lto_priv.0 (layout=<optimized out>) at ../pango/pango/pango-layout.c:4983
#20 0x00007ffff79e009f in pango_layout_check_lines (layout=<optimized out>) at ../pango/pango/pango-layout.c:4792
#21 pango_layout_get_extents_internal (layout=0x55555bfa25e0, ink_rect=ink_rect@entry=0x0, logical_rect=logical_rect@entry=0x7fffffff58d0, line_extents=line_extents@entry=0x0) at ../pango/pango/pango-layout.c:2925
#22 0x00007ffff79e41b4 in pango_layout_get_pixel_size (layout=<optimized out>, width=0x7fffffff5944, height=0x7fffffff5948) at ../pango/pango/pango-layout.c:3194
#23 0x000055555991d888 in wxCairoContext::GetTextExtent(wxString const&, double*, double*, double*, double*) const ()
#24 0x00005555596bf9d7 in wxGCDCImpl::DoGetTextExtent(wxString const&, int*, int*, int*, int*, wxFont const*) const ()
#25 0x0000555556b7429a in Slic3r::GUI::SplashScreen::Decorate(wxBitmap&) ()
#26 0x0000555556b69dc5 in Slic3r::GUI::GUI_App::on_init_inner() ()
#27 0x0000555556b6b62a in Slic3r::GUI::GUI_App::OnInit() ()
#28 0x00005555599cd4d7 in wxEntry(int&, wchar_t**) ()
#29 0x0000555556b2a01b in Slic3r::GUI::GUI_Run(Slic3r::GUI::GUI_InitParams&) ()
#30 0x0000555555fc442b in Slic3r::CLI::run(int, char**) ()
#31 0x0000555555ec3209 in main ()
Thanks, but the most crucial information is still missing, namely FreeType's file and line number details for frame #0.
If possible, please compile FreeType manually without optimization and temporarily replace the OS's version.
I tried my hand at that, but I must have been doing something wrong, because I couldn't get it to read the symbols, even after installing the -debug package. Hopefully someone who's done this before can give it a shot. Symbols read fine for that package, that's not what's missing. Seems like we need a debug build of orca, but I've had no luck building it myself.
Downgrading freetype2 to
2.13.2-2
fixed this for me.
Yes, it opens when I downgraded freetype2 to 2.13.2-2
. But I had visual issue.
This might be a multithreading issue. FT_Face can be safely used within a single thread, but I see IA__FcFontSetSort in a separate thread.
I'm seeing this problem in the appimage same as the OP and others... but I do not get the segfault when I compiled it using an Arch Linux PKGBUILD - specifically, I took https://aur.archlinux.org/packages/orca-slicer, updated the tagged version to 2.1.1, commented out some of the patches that were no longer relevant, and than a makepkg -si
yielded a working Orca Slicer!
(it could still be a threading issue of course - by compiling it that way I might have just resulted in some changed linking order that works around whatever race condition is the problem. But at least it got me a working orca slicer on Arch...)
same issue for me. downgrading freetype2 to 2.13.2-2 worked to open the app, and backup my configs, but I have no view in 3D area.
also the backup is impossible cos I can't expand the windows to select my settings to export
Same issue, after some testing, I can start OrcaSlicer successfully with the following command on ArchLinux
WEBKIT_DISABLE_DMABUF_RENDERER=1 __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json /opt/orca-slicer/bin/orca-slicer
same issue for me. downgrading freetype2 to 2.13.2-2 worked to open the app, and backup my configs, but I have no view in 3D area.
also the backup is impossible cos I can't expand the windows to select my settings to export
Same issue for me.
But I've just recompile freetype2 package.
asp checkout freetype2
cd freetype2/trunk
makepkg -sci
Package orca-slicer-bin-2.1.1-1 work fine with freetype2-2.13.3-1.
Edit: Managed to make OrcaSlicer run properly by upgrading to the beta (2.2.0-beta2), downgrading to freetype 2.13.2-2, and using only __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json /opt/orca-slicer/bin/orca-slicer
as the environment variable. It's this particular combination of changes that made it function again.
@Communing-With-Coyotes
Tried the environment variables listed by @wuhgit and downgraded freetype to 2.13.2-2 and while Orca will launch, it freezes shortly after (usually within 10-15 seconds) and crashes roughly another 10-15 seconds after that. Lots of Gtk-CRITICAL errors, but those aren't unusual. Even when it worked properly, Orca has always spit hundreds of these errors.
The crashes can be worked around by editing the connection settings and changing the Device UI to something it can't reach:
It was crashing for me otherwise with the same symptoms as you described.
Looks like the latest beta has fixed this issue, perhaps simply through a build system update. Used OrcaSlicer_Linux_Ubuntu2404_V2.2.0-beta26.AppImage
and it started up a-ok with no modifications.
For me installing Webkit2gtk, gst-plugins-base, and gst-libav from AUR fix the crash. The last one is only needed for the X1C camera.
Is there an existing issue for this problem?
OrcaSlicer Version
2.1.1 (AppImg)
Operating System (OS)
Linux
OS Version
Arch Linux
Additional system information
Printer
N/A
How to reproduce
I try to run orca-slicer from either my desktop, or the terminal
/opt/orca-slicer/bin/orca-slicer
.Actual results
Both techniques of starting the app are terminated abnormally with signal 11/SEGV aka a segfault.
Expected results
Orcaslicer should start normally.
Project file & Debug log uploads
Debug Backtrace (missing orca-slicer symbols, but has library symbols, I can't get compiled version to build on my machine).
Journalctl Logs:
Checklist of files to include
Anything else?
I have reinstalled OrcaSlicer, and deleted my entire configuration. No printer configuration or project files are involved with the crash. There are no log files that I can find relating to OrcaSlicer, I think it might crashing before the log writing process.
It was working yesterday, however I did a system update today, so I assume it is some library compatibility issue. All signs point to a font library issue.
I have uploaded a full coredump as well here: orca-slicer-coredump.gz
You can also find all libraries linked to OrcaSlicer here: