Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebContent process crashed when resolving UiMonospace #3832

Open
1 task
bourdeau opened this issue Mar 6, 2025 · 1 comment · May be fixed by #3834
Open
1 task

WebContent process crashed when resolving UiMonospace #3832

bourdeau opened this issue Mar 6, 2025 · 1 comment · May be fixed by #3834

Comments

@bourdeau
Copy link

bourdeau commented Mar 6, 2025

Summary

Ladybird crashes when trying to resolve the UiMonospace font. The WebContent process fails with:

VERIFICATION FAILED: m_default_font at /build/source/Libraries/LibWebView/Plugins/FontPlugin.cpp:47

My system's default monospace font (according to fc-match monospace) is JetBrainsMono Nerd Font. The crash occurs at:

auto default_fixed_width_font_name = generic_font_name(Web::Platform::GenericFont::UiMonospace);

It seems that generic_font_name(UiMonospace) may be returning an invalid or empty font name, causing the crash.

Operating system

Linux

Steps to reproduce

1.Install and run Ladybird on NixOS (https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/applications/networking/browsers/ladybird/default.nix#L155)
2. Ensure that the system’s default monospace font is JetBrainsMono Nerd Font (check with fc-match monospace).
3. Open Ladybird and navigate to any page (or just about:newtab).
4. Observe that the WebContent process crashes.

Expected behavior

No crash

Actual behavior

Crashes

URL for a reduced test case

N/A

HTML/SVG/etc. source for a reduced test case

N/A

Log output and (if possible) backtrace

3249.845 Ladybird(18272): WebContent process crashed! Last page loaded: about:newtab
3249.845 Ladybird(18272): Consider raising an issue at https://github.com/LadybirdBrowser/ladybird/issues/new/choose
3249.845 Ladybird(18272): WebContent has crashed 5 times in quick succession! Not restarting...
VERIFICATION FAILED: m_default_font at /build/source/Libraries/LibWebView/Plugins/FontPlugin.cpp:47
/nix/store/2dg8q88zp8dd8an2722q0d21b54f6c4z-ladybird-0-unstable-2024-11-21/libexec/../lib/liblagom-ak.so.0(ak_verification_failed+0x83) [0x7f011d3a15f3]
/nix/store/2dg8q88zp8dd8an2722q0d21b54f6c4z-ladybird-0-unstable-2024-11-21/libexec/../lib/liblagom-webview.so.0 WebView::FontPlugin::FontPlugin(bool, Gfx::SystemFontProvider*) 0x3f4) [0x7f011fafd9a4]
/nix/store/2dg8q88zp8dd8an2722q0d21b54f6c4z-ladybird-0-unstable-2024-11-21/libexec/WebContent() [0x42ae9f]
/nix/store/2dg8q88zp8dd8an2722q0d21b54f6c4z-ladybird-0-unstable-2024-11-21/libexec/WebContent(main+0xf2) [0x429632]
/nix/store/nqb2ns2d1lahnd5ncwmn6k84qfd7vx2k-glibc-2.40-36/lib/libc.so.6(+0x2a27e) [0x7f011ce3127e]
/nix/store/nqb2ns2d1lahnd5ncwmn6k84qfd7vx2k-glibc-2.40-36/lib/libc.so.6(__libc_start_main+0x89) [0x7f011ce31339]
/nix/store/2dg8q88zp8dd8an2722q0d21b54f6c4z-ladybird-0-unstable-2024-11-21/libexec/WebContent() [0x429765]
3281.600 Ladybird(18272): WebContent process crashed! Last page loaded: about:newtab
3281.600 Ladybird(18272): Consider raising an issue at https://github.com/LadybirdBrowser/ladybird/issues/new/choose
VERIFICATION FAILED: m_default_font at /build/source/Libraries/LibWebView/Plugins/FontPlugin.cpp:47
/nix/store/2dg8q88zp8dd8an2722q0d21b54f6c4z-ladybird-0-unstable-2024-11-21/libexec/../lib/liblagom-ak.so.0(ak_verification_failed+0x83) [0x7f54b21a15f3]
/nix/store/2dg8q88zp8dd8an2722q0d21b54f6c4z-ladybird-0-unstable-2024-11-21/libexec/../lib/liblagom-webview.so.0 WebView::FontPlugin::FontPlugin(bool, Gfx::SystemFontProvider*) 0x3f4) [0x7f54b48fd9a4]
/nix/store/2dg8q88zp8dd8an2722q0d21b54f6c4z-ladybird-0-unstable-2024-11-21/libexec/WebContent() [0x42ae9f]
/nix/store/2dg8q88zp8dd8an2722q0d21b54f6c4z-ladybird-0-unstable-2024-11-21/libexec/WebContent(main+0xf2) [0x429632]
/nix/store/nqb2ns2d1lahnd5ncwmn6k84qfd7vx2k-glibc-2.40-36/lib/libc.so.6(+0x2a27e) [0x7f54b1c3127e]
/nix/store/nqb2ns2d1lahnd5ncwmn6k84qfd7vx2k-glibc-2.40-36/lib/libc.so.6(__libc_start_main+0x89) [0x7f54b1c31339]
/nix/store/2dg8q88zp8dd8an2722q0d21b54f6c4z-ladybird-0-unstable-2024-11-21/libexec/WebContent() [0x429765]
3281.708 Ladybird(18272): WebContent process crashed! Last page loaded: about:newtab

Screenshots or screen recordings

No response

Build flags or config settings

No response

Contribute a patch?

  • I’ll contribute a patch for this myself.
@AtkinsSJ
Copy link
Member

AtkinsSJ commented Mar 6, 2025

That nix package installs a version from November last year. That VERIFY that triggers no longer appears in the code, see 0b8b690#diff-b4193d5184c5c7b5cc1e3c15e919e0798bdd4e648644a485fc3435e6eb50a4f5L47 - can you try building from the master branch and seeing if you still get issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants