GDMP icon indicating copy to clipboard operation
GDMP copied to clipboard

Segmentation fault when loading the library if Godot is built with system-provided `harfbuzz`

Open j20001970 opened this issue 1 year ago • 2 comments

If harfbuzz is system-provided instead of builtin when building Godot, loading GDMP library will cause immediate crash on said builds.

This is a problem because unlike official Godot editor that has everything builtin, distribution packagers might configure Godot to use system library for some modules (e.g. Arch, Flatpak), and users of these builds will run into such issue.

The crash is triggered by calling std::call_once during static initialization of the library.

Upstream issue: https://github.com/godotengine/godot/issues/91401

Known workarounds:

  • Preload GDMP library with LD_PRELOAD environment variable.
  • Configure icu4c the same way as harfbuzz when building Godot, however writing to stdout from GDExtension will lead to segfault if icu4c is system-provided. (https://github.com/godotengine/godot/issues/100301)

j20001970 avatar Mar 05 '24 10:03 j20001970

Is this what the crash looks like in console?

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.arch_linux
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/libc.so.6(+0x42200) [0x77ef27842200] (??:0)
-- END OF BACKTRACE --
===============================================================

kekonn avatar Feb 21 '25 07:02 kekonn

Is this what the crash looks like in console?

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.arch_linux
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/libc.so.6(+0x42200) [0x77ef27842200] (??:0)
-- END OF BACKTRACE --
===============================================================

Exactly, godot on Arch repository is configured to use harfbuzz from host system.

j20001970 avatar Feb 21 '25 12:02 j20001970