#12179·ladybird

scribd: Crash due to "referenced selector entry identity"

Author: BenWiederhakeCreated Sep 26, 2026Updated Sep 26, 2026

Summary

When I open SCRIBD in Ladybird and scroll around a bit, it sometimes crashes. It seems to crash more often when you toggle the document-miniature-preview.

Possibly related: It seems that Ladybird tries to render EVERYTHING all the time, including hundreds of pages that are below the viewport. This might be the cause for some timeouts, laggy UI, etc. I can't articulate a single specific issue, but that general area needs a bit more love, too. Back to topic: The crash.

Since the crash is in the Rust code, I'm running Ladybird with RUST_BACKTRACE=1 ./Meta/ladybird.py run. Here's the crash report file:

Ladybird crash report, format 1
Process: WebContent
Version: 1.0
Platform: Linux
Architecture: x86_64
Git commit: 6f1f16e22dbf36f348f7b2d4d8b51e85f14be6f7
Tracked source state: clean
C++ compiler: GNU 15.3.0
Build options: BUILD_SHARED_LIBS=ON; BUILD_TESTING=ON; ENABLE_ADDRESS_SANITIZER=OFF; ENABLE_ALL_THE_DEBUG_MACROS=OFF; ENABLE_CI_BASELINE_CPU=OFF; ENABLE_CLANG_PLUGINS=OFF; ENABLE_CLANG_PLUGINS_INVALID_FUNCTION_MEMBERS=OFF; ENABLE_COMPILETIME_FORMAT_CHECK=ON; ENABLE_CRANELIFT_JIT=ON; ENABLE_FUZZERS=OFF; ENABLE_FUZZERS_LIBFUZZER=OFF; ENABLE_FUZZERS_OSSFUZZ=OFF; ENABLE_GUI_TARGETS=ON; ENABLE_INSTALL_FREEDESKTOP_FILES=ON; ENABLE_INSTALL_HEADERS=ON; ENABLE_LAGOM_CCACHE=ON; ENABLE_LAGOM_COVERAGE_COLLECTION=OFF; ENABLE_LTO_FOR_RELEASE=ON; ENABLE_MEMORY_SANITIZER=OFF; ENABLE_NETWORK_DOWNLOADS=ON; ENABLE_UNDEFINED_SANITIZER=OFF; LADYBIRD_ENABLE_CPPTRACE=ON; LADYBIRD_GENERATE_DSYM=OFF; USE_VULKAN_DMABUF_IMAGES=ON
C++ flags (WebContent main; paths and string defines omitted): -DENABLE_COMPILETIME_FORMAT_CHECK -DHAVE_WASM_COMPILER_SERVICE=1 -DUSE_FONTCONFIG=1 -DUSE_VULKAN=1 -DUSE_VULKAN_DMABUF_IMAGES=1 -O2 -g -DNDEBUG -std=c++23 -fPIE -march=native -Wcast-qual -Wimplicit-fallthrough -Wlogical-op -Wmissing-declarations -Wmissing-field-initializers -Wsuggest-override -Wno-expansion-to-defined -Wno-invalid-offsetof -Wno-maybe-uninitialized -Wno-shorten-64-to-32 -Wno-unknown-warning-option -Wno-unused-command-line-argument -Wno-user-defined-literals -Werror -Wall -Wextra -fno-exceptions -ffp-contract=off -fstrict-flex-arrays=2 -fstack-protector-strong -fsigned-char -ftrivial-auto-var-init=zero -ggnu-pubnames -fno-semantic-interposition -fvisibility-inlines-hidden -Wno-literal-suffix -Wno-unqualified-std-cast-call -Wvla -Wno-array-bounds -Wno-stringop-overflow -Wno-dangling-reference -fstack-clash-protection -O2 -g1
Process uptime (seconds): 185
Build configuration: release
Kernel release: 7.1.13
Termination signal: SIGABRT (6)
Captured signal: SIGABRT (6)
Signal code: -6
Rust panic: a referenced selector entry identity must remain live at Libraries/LibWeb/Rust/src/css/style/selector.rs:2992:52
Executable build ID: c5c842f892f597145a1b961c642dae095129aa3d

Native stack (binary build ID, object address):
#0 be4b64f62effbb2830ebe48a71efc0eea7f2b0ec 0x96d0c
#1 02420797fd904db0af591ac8b2fb7b96786a7daa 0x803028 _RNvNtCs6ZjlLoI6YmX_3std7process5abort + 0x8
#2 02420797fd904db0af591ac8b2fb7b96786a7daa 0x801c99 _RNvCs6rREvFdRhLb_7___rustc12___rust_abort + 0x9
#3 02420797fd904db0af591ac8b2fb7b96786a7daa 0x358dd69 _RNvCs6rREvFdRhLb_7___rustc18___rust_start_panic + 0x9
#4 02420797fd904db0af591ac8b2fb7b96786a7daa 0x801c4d _RNvCs6rREvFdRhLb_7___rustc10rust_panic + 0xd
#5 02420797fd904db0af591ac8b2fb7b96786a7daa 0x33bd694 _RNvNtCs6ZjlLoI6YmX_3std9panicking15panic_with_hook + 0xfe
#6 02420797fd904db0af591ac8b2fb7b96786a7daa 0x339a181
#7 02420797fd904db0af591ac8b2fb7b96786a7daa 0x338e508 _RINvNtNtCs6ZjlLoI6YmX_3std3sys9backtrace26___rust_end_short_backtraceNCNvNtB6_9panicking13panic_handler0zEB6_ + 0x8
#8 02420797fd904db0af591ac8b2fb7b96786a7daa 0x339b84c _RNvCs6rREvFdRhLb_7___rustc17rust_begin_unwind + 0x1c
#9 02420797fd904db0af591ac8b2fb7b96786a7daa 0x803feb _RNvNtCsc36rpYXAlPq_4core9panicking9panic_fmt + 0x2b
#10 02420797fd904db0af591ac8b2fb7b96786a7daa 0x803c73 _RNvNtCsc36rpYXAlPq_4core6option13expect_failed + 0x33

Stacks may be partial.

Here's the interesting part of the log output:

thread '<unnamed>' (2952922) panicked at Libraries/LibWeb/Rust/src/css/style/selector.rs:2992:52:
a referenced selector entry identity must remain live
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/std/src/panicking.rs:679:5
   1: core::panicking::panic_fmt
             at /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/panicking.rs:80:14
   2: core::panicking::panic_display::<&str>
             at /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/panicking.rs:259:5
   3: core::option::expect_failed
             at /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/option.rs:2260:5
   4: <libweb_rust::css::style::StyleEngineState>::take_style_transaction_with_clock::<libweb_rust::css::style::bridge::style_engine_take_style_transaction::{closure#1}>::{closure#37}
   5: <libweb_rust::css::style::impact::ImpactRegions>::for_each_batch::<<libweb_rust::css::style::StyleEngineState>::take_style_transaction_with_clock<libweb_rust::css::style::bridge::style_engine_take_style_transaction::{closure#1}>::{closure#37}>
   6: <libweb_rust::css::style::StyleEngineState>::take_style_transaction_with_clock::<libweb_rust::css::style::bridge::style_engine_take_style_transaction::{closure#1}>
   7: <libweb_rust::css::style::StyleEngineState>::take_style_transaction::<libweb_rust::css::style::bridge::style_engine_take_style_transaction::{closure#1}>
   8: style_engine_take_style_transaction
   9: _ZN3Web3CSS11StyleEngine22take_style_transactionEN2AK15DistinctNumericIjNS0_17__StyleNodeID_tagEJNS2_22DistinctNumericFeature10CastToBoolENS5_16CastToUnderlyingENS5_10ComparisonEEEE
             at /home/user/workspace/ladybird/Libraries/LibWeb/CSS/StyleEngineBridge.cpp:672:68
  10: take_style_engine_transaction
             at /home/user/workspace/ladybird/Libraries/LibWeb/CSS/UpdateStyle.cpp:137:86
  11: update_style
             at /home/user/workspace/ladybird/Libraries/LibWeb/CSS/UpdateStyle.cpp:917:75
  12: update_style_for_element
             at /home/user/workspace/ladybird/Libraries/LibWeb/CSS/UpdateStyle.cpp:1247:25
  13: prepare_computed_style_and_layout_for_property
             at /home/user/workspace/ladybird/Libraries/LibWeb/CSS/CSSStyleProperties.cpp:707:61
  14: _ZNK3Web3CSS18CSSStyleProperties19get_direct_propertyERKNS0_17PropertyNameAndIDE
             at /home/user/workspace/ladybird/Libraries/LibWeb/CSS/CSSStyleProperties.cpp:781:80
  15: _ZNK3Web3CSS18CSSStyleProperties21get_property_internalERKNS0_17PropertyNameAndIDE
             at /home/user/workspace/ladybird/Libraries/LibWeb/CSS/CSSStyleProperties.cpp:628:40
  16: _ZNK3Web3CSS18CSSStyleProperties18get_property_valueERKN2AK14Utf16FlyStringE
             at /home/user/workspace/ladybird/Libraries/LibWeb/CSS/CSSStyleProperties.cpp:450:66
  17: operator()<Web::CSS::CSSStyleDeclaration>
             at /home/user/workspace/ladybird/Build/release/Libraries/LibWeb/Bindings/CSSStyleDeclaration.cpp:372:31
  18: invoke_first_available<Web::CSS::CSSStyleDeclaration, Web::Bindings::CSSStyleDeclarationPrototype::get_property_value(JS::VM&)::<lambda()>::<lambda(auto:194&)>, Web::Bindings::CSSStyleDeclarationPrototype::get_property_value(JS::VM&)::<lambda()>::<lambda(auto:195&)>, Web::Bindings::CSSStyleDeclarationPrototype::get_property_value(JS::VM&)::<lambda()>::<lambda(auto:196&)>, Web::Bindings::CSSStyleDeclarationPrototype::get_property_value(JS::VM&)::<lambda()>::<lambda(auto:197&)> >
             at /home/user/workspace/ladybird/Libraries/LibWeb/Bindings/Wrappable.h:38:41
  19: operator()
             at /home/user/workspace/ladybird/Build/release/Libraries/LibWeb/Bindings/CSSStyleDeclaration.cpp:372:31
  20: throw_dom_exception_if_needed<Web::Bindings::CSSStyleDeclarationPrototype::get_property_value(JS::VM&)::<lambda()> >
             at /home/user/workspace/ladybird/Libraries/LibWeb/WebIDL/ExceptionOrUtils.h:110:18
  21: _ZN3Web8Bindings28CSSStyleDeclarationPrototype18get_property_valueERN2JS2VME
             at /home/user/workspace/ladybird/Build/release/Libraries/LibWeb/Bindings/CSSStyleDeclaration.cpp:372:31
  22: <unknown>
             at /home/user/workspace/ladybird/Build/release/Libraries/LibJS/Interpreter/interpreter_x86_64.S:5252:0
  23: _ZN2JS2VM14run_executableERNS_16ExecutionContextERNS_8Bytecode10ExecutableEj
             at /home/user/workspace/ladybird/Libraries/LibJS/Interpreter/Interpreter.cpp:342:23
  24: _ZN2JS24ECMAScriptFunctionObject27ordinary_call_evaluate_bodyERNS_2VMERNS_16ExecutionContextE
             at /home/user/workspace/ladybird/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp:507:19
  25: _ZN2JS24ECMAScriptFunctionObject13internal_callERNS_16ExecutionContextENS_5ValueE
             at /home/user/workspace/ladybird/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp:203:46
  26: _ZN2JS9call_implERNS_2VMERNS_14FunctionObjectENS_5ValueEN2AK4SpanIKS4_EE
             at /home/user/workspace/ladybird/Libraries/LibJS/Runtime/AbstractOperations.cpp:141:34
  27: _ZN2JS4callERNS_2VMERNS_14FunctionObjectENS_5ValueEN2AK4SpanIKS4_EE
             at /home/user/workspace/ladybird/Libraries/LibJS/Runtime/AbstractOperations.h:150:21
  28: operator()
             at /home/user/workspace/ladybird/Libraries/LibWeb/Bindings/MainThreadVM.cpp:272:31
  29: call
             at /home/user/workspace/ladybird/AK/Function.h:229:30
  30: _ZNK2AK8FunctionIFN2JS17ThrowCompletionOrINS1_5ValueEEERNS1_11JobCallbackES3_NS_4SpanIKS3_EEEEclES6_S3_S9_
             at /home/user/workspace/ladybird/AK/Function.h:150:29
  31: run_reaction_job
             at /home/user/workspace/ladybird/Libraries/LibJS/Runtime/PromiseJobs.cpp:55:51
  32: operator()
             at /home/user/workspace/ladybird/Libraries/LibJS/Runtime/PromiseJobs.cpp:92:32
  33: call
             at /home/user/workspace/ladybird/AK/Function.h:229:30
  34: _ZNK2AK8FunctionIFN2JS17ThrowCompletionOrINS1_5ValueEEEvEEclEv
             at /home/user/workspace/ladybird/AK/Function.h:150:29
  35: operator()
             at /home/user/workspace/ladybird/Libraries/LibWeb/Bindings/MainThreadVM.cpp:365:42
  36: call
             at /home/user/workspace/ladybird/AK/Function.h:229:30
  37: _ZNK2AK8FunctionIFvvEEclEv
             at /home/user/workspace/ladybird/AK/Function.h:150:29
  38: _ZN3Web4HTML4Task7executeEv
             at /home/user/workspace/ladybird/Libraries/LibWeb/HTML/EventLoop/Task.cpp:54:24
  39: _ZN3Web4HTML9EventLoop30perform_a_microtask_checkpointEv
             at /home/user/workspace/ladybird/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp:893:34
  40: _ZN3Web4HTML25TemporaryExecutionContextD2Ev
             at /home/user/workspace/ladybird/Libraries/LibWeb/HTML/Scripting/TemporaryExecutionContext.cpp:28:34
  41: operator()
             at /home/user/workspace/ladybird/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.cpp:833:9
  42: call
             at /home/user/workspace/ladybird/AK/Function.h:229:30
  43: _ZNK2AK8FunctionIFvvEEclEv
             at /home/user/workspace/ladybird/AK/Function.h:150:29
  44: _ZN3Web4HTML4Task7executeEv
             at /home/user/workspace/ladybird/Libraries/LibWeb/HTML/EventLoop/Task.cpp:54:24
  45: _ZN3Web4HTML9EventLoop7processEv
             at /home/user/workspace/ladybird/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp:169:29
  46: _ZNK2AK8FunctionIFvvEEclEv
             at /home/user/workspace/ladybird/AK/Function.h:150:29
  47: operator()
             at /home/user/workspace/ladybird/Libraries/LibWeb/Platform/Timer.cpp:21:35
  48: call
             at /home/user/workspace/ladybird/AK/Function.h:229:30
  49: _ZNK2AK8FunctionIFvvEEclEv
             at /home/user/workspace/ladybird/AK/Function.h:150:29
  50: _ZN4Core5Timer11timer_eventERNS_10TimerEventE
             at /home/user/workspace/ladybird/Libraries/LibCore/Timer.cpp:94:19
  51: _ZN4Core16ThreadEventQueue7processEv
             at /home/user/workspace/ladybird/Libraries/LibCore/ThreadEventQueue.cpp:119:41
  52: _ZN4Core27EventLoopImplementationUnix4pumpENS_23EventLoopImplementation8PumpModeE
             at /home/user/workspace/ladybird/Libraries/LibCore/EventLoopImplementationUnix.cpp:231:47
  53: _ZN4Core27EventLoopImplementationUnix4execEv
             at /home/user/workspace/ladybird/Libraries/LibCore/EventLoopImplementationUnix.cpp:222:13
  54: _Z13ladybird_mainN4Main9ArgumentsE
             at /home/user/workspace/ladybird/Services/WebContent/main.cpp:271:27
  55: main
             at /home/user/workspace/ladybird/Libraries/LibMain/Main.cpp:57:6
  56: <unknown>
  57: <unknown>
  58: _start

Operating system

Linux

Steps to reproduce

  1. Go to https://de.scribd.com/document/440797852/The-Design-and-Analysis-of-Computer-Algorithms-Aho-Hopcroft-Ullman-1974-01-11-pdf
  2. Click "reject all" on the cookie banner (need to scroll right for that)
  3. Scroll around a bit, toggle the document miniature preview. It takes around 3 minutes, during which the view changes several times. (See screenshots below)

Expected behavior

  • The browser should not crash.
  • The view should stabilize relatively quickly.
  • (Unrelated, separate issue #12180: The OCR text from the PDF should not visually interfere with the actual PDF image.)
  • (Unrelated, can't give a good reproducer, won't create an issue: Rendering the rest of the PDF outside of the viewport should not slow down the UI)

Actual behavior

  • The browser eventually crashes.
  • Until then, the display of the PDF changes several times.
  • (The OCR text is drawn over the text of the PDF, making it hard to read.)
  • (While the other pages are being parsed/rendered, the UI feels laggy)

URL for a reduced test case

N/A

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

xml
N/A

Log output and (if possible) backtrace

bash
$ RUST_BACKTRACE=1 ./Meta/ladybird.py run
ninja: Entering directory `/home/user/workspace/ladybird/Build/release'
ninja: no work to do.
Ladybird PID file '/run/user/1000/Ladybird/Profiles/default/Ladybird.pid' exists with PID 2940183, but process cannot be found
Fontconfig error: Cannot load default config file: Unable to open /etc/fonts/fonts.conf
Fontconfig error: Cannot load default config file: Unable to open /etc/fonts/fonts.conf
qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: Connection already associated with an application ID")
Fontconfig error: Cannot load default config file: Unable to open /etc/fonts/fonts.conf
Fontconfig error: Cannot load default config file: Unable to open /etc/fonts/fonts.conf
523975.730 WebContent(2952922): ResourceLoader: Failed load of: "https://html-load.com/app.js", Error: Request finished with error: Unable to connect, Duration: 388ms
523975.730 WebContent(2952922): ResourceLoader: Failed load of: "https://cdn.confiant-integrations.net/U5wcFgE8Y-PAgwG3401csHbRjTE/gpt_and_prebid/config.js", Error: Request finished with error: Unable to connect, Duration: 388ms
523975.742 WebContent(2952922): ResourceLoader: Failed load of: "https://html-load.com/app.js", Error: Request finished with error: Unable to connect, Duration: 12ms
523975.742 WebContent(2952922): ResourceLoader: Failed load of: "https://www.googletagmanager.com/gtm.js?id=GTM-KXQQWDG", Error: Request finished with error: Unable to connect, Duration: 16ms
523975.762 WebContent(2952922): HTMLScriptElement: Refusing to run script because the element's result is null.
523975.766 WebContent(2952922): HTMLScriptElement: Refusing to run script because the element's result is null.
523984.034 WebContent(2952922): ResourceLoader: Failed load of: "https://cdn.confiant-integrations.net/U5wcFgE8Y-PAgwG3401csHbRjTE/gpt_and_prebid/config.js", Error: Request finished with error: Unable to connect, Duration: 52ms
523984.750 WebContent(2952922): HTMLScriptElement: Refusing to run script because the element's result is null.
Fontconfig error: Cannot load default config file: Unable to open /etc/fonts/fonts.conf
Fontconfig error: Cannot load default config file: Unable to open /etc/fonts/fonts.conf
523986.358 WebContent(2952922): FIXME: Unimplemented IDL interface: 'Location.ancestorOrigins'
523986.514 WebContent(2952922): ResourceLoader: Failed load of: "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js", Error: Request finished with error: Unable to connect, Duration: 40ms
523986.514 WebContent(2952922): ResourceLoader: Failed load of: "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js", Error: Request finished with error: Unable to connect, Duration: 40ms
523986.514 WebContent(2952922): ResourceLoader: Failed load of: "https://static.criteo.net/js/ld/publishertag.prebid.js", Error: Request finished with error: Unable to connect, Duration: 40ms
523986.514 WebContent(2952922): ResourceLoader: Failed load of: "https://id5-sync.com/api/config/prebid", Error: Request finished with error: Unable to connect, Duration: 40ms
523986.514 WebContent(2952922): ResourceLoader: Failed load of: "https://id5-sync.com/api/config/prebid", Error: Request finished with error: Unable to connect, Duration: 40ms
523987.026 WebContent(2952922): ResourceLoader: Failed load of: "https://c.amazon-adsystem.com/aax2/apstag.js", Error: Request finished with error: Unable to connect, Duration: 12ms
523987.026 WebContent(2952922): ResourceLoader: Failed load of: "https://api.receptivity.io/v1/prebid/SCRP250320/connector/rxConnector.js", Error: Request finished with error: Unable to connect, Duration: 12ms
523987.026 ImageDecoder(2952477) Pool/3(2952652): libpng error: IDAT: incorrect data check
523987.158 WebContent(2952922): ResourceLoader: Failed load of: "https://cdn.id5-sync.com/api/1.0/id5PrebidModule.js", Error: Request finished with error: Unable to connect, Duration: 144ms
523987.178 WebContent(2952922): HTMLScriptElement: Refusing to run script because the element's result is null.
523987.350 WebContent(2952922): HTMLScriptElement: Refusing to run script because the element's result is null.
523987.350 WebContent(2952922): HTMLScriptElement: Refusing to run script because the element's result is null.
523987.350 WebContent(2952922): HTMLScriptElement: Refusing to run script because the element's result is null.
523987.478 WebContent(2952922): (js warn) "Datadog Browser SDK:" "No storage available for session. We will not send any data."
523988.106 WebContent(2952922): FIXME: Stubbed ScreenOrientation::type()
523988.138 WebContent(2952922): FIXME: Stubbed ScreenOrientation::type()
523992.234 WebContent(2952922): Unhandled JavaScript exception (in promise): [TypeError] Request with 'cors' response tainting failed CORS check
523992.234 WebContent(2952922): 
523992.242 WebContent(2952922): Unhandled JavaScript exception (in promise): [TypeError] Request with 'cors' response tainting failed CORS check
523992.242 WebContent(2952922): 
523995.626 WebContent(2952922): (js log) "script - session:  setting new session depth: " 3
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7b3800002480] Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7b3800002480] Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol
523999.754 WebContent(2952922): FIXME: Unimplemented CredentialsContainer::get()
523999.762 WebContent(2952922): (js warn) "[GSI_LOGGER]: Your client application uses one of the Google One Tap prompt UI status methods that may stop functioning when FedCM becomes mandatory. Refer to the migration guide to update your code accordingly and opt-in to FedCM to test your changes. Learn more: http

Source: LadybirdBrowser/ladybird