Skip to content

Windows: WebContent crashes on every page load — VERIFY(target_entry->document_state()->ever_populated()) in LocalTraversableNavigable.cpp:756 #11485

Description

@novaxertz

Windows: WebContent crashes on every page load — VERIFY(target_entry->document_state()->ever_populated()) in LocalTraversableNavigable.cpp:756

Summary

On a native Windows build (clang-cl), the WebContent process crashes immediately on any page load, including about:blank. The browser window opens, but WebContent dies and is respawned in a loop, so no content is ever rendered.

The failure is a spec assertion in the "traverse" branch of LocalTraversableNavigable:

VERIFICATION FAILED: target_entry->document_state()->ever_populated()
  at Libraries/LibWeb/HTML/LocalTraversableNavigable.cpp:756

The same commit builds and runs correctly on Linux, so this appears specific to the Windows port.

Environment

Commit 561d89e787 (LibWeb: Drop subtree paint captures when a box becomes scrollable)
OS Windows 11 Home Single Language, build 26200
Compiler clang-cl 19.1.5 (bundled with VS 2022 Community)
MSVC toolset 14.44.35207
Windows SDK 10.0.26100.0
Qt 6.10.0 (vcpkg, x64-windows)
Skia 148, features core,direct3d,freetype,harfbuzz,icu
Build preset Release, via py Meta\ladybird.py build
CPU / GPU i7-12650H / RTX 4060 Laptop + Intel UHD

The build itself completed with zero errors.

Steps to reproduce

.\Ladybird.exe --headless=text about:blank

Or simply launch Ladybird.exe normally — the same crash loop occurs with the GUI.

Expected

about:blank loads. On Linux, this command exits 0 and prints no assertion.

Actual

WebContent aborts on the assertion and is respawned repeatedly:

Ladybird(23028): WebContent process crashed! Last page loaded: about:blank
Ladybird(23028): Consider raising an issue at https://github.com/LadybirdBrowser/ladybird/issues/new/choose

~12 crash/respawn cycles in 40 seconds. Windows Error Reporting records an identical fault every time:

Faulting application: WebContent.exe
Faulting module:      lagom-web.dll
Exception code:       0xc0000005   (access violation)
Fault offset:         0x0000000001ba2ac3

The fault bucket is identical across all occurrences, so this is deterministic rather than a race.

Stack trace

VERIFICATION FAILED: target_entry->document_state()->ever_populated() at Libraries\LibWeb\HTML\LocalTraversableNavigable.cpp:756
Stack trace (most recent call first):
#0  AK::Function<void ()>::CallableWrapper<`lambda at Libraries\LibWeb\HTML\LocalTraversableNavigable.cpp:678:105'>::call() at AK\Function.h:224
#1  Web::HTML::Task::execute() at Libraries\LibWeb\HTML\EventLoop\Task.cpp:54
#2  Web::HTML::EventLoop::process() at Libraries\LibWeb\HTML\EventLoop\EventLoop.cpp:158
#3  AK::Function<void ()>::CallableWrapper<`lambda at Libraries\LibWeb\Platform\Timer.cpp:19:27'>::call() at AK\Function.h:224
#4  Core::Timer::timer_event() at Libraries\LibCore\Timer.cpp:94
#5  Core::ThreadEventQueue::process() at Libraries\LibCore\ThreadEventQueue.cpp:113
#6  Core::EventLoopImplementationWindows::pump(Core::EventLoopImplementation::PumpMode) at Libraries\LibCore\EventLoopImplementationWindows.cpp:365
#7  Core::EventLoopImplementationWindows::exec() at Libraries\LibCore\EventLoopImplementationWindows.cpp:270
#8  ladybird_main(Main::Arguments) at Services\WebContent\main.cpp:277
#9  main(int, char**) at Libraries\LibMain\Main.cpp:46
#10 __scrt_common_main_seh() at exe_common.inl:288
#11 BaseThreadInitThunk
#12 RtlUserThreadStart

Cross-platform comparison

Same command on Ubuntu 26.04 (gcc 15.2, system Qt 6.10.2) under WSL2:

$ ./Build/release/bin/Ladybird --headless=text about:blank
EXIT=0
ever_populated assertions:  0
VERIFICATION FAILED count:  0

Linux passes cleanly; Windows fails deterministically.

Note on commits: the Windows crash is confirmed at 561d89e787 (current master at time of filing) and was originally found at 3f3bf5c7c1. The Linux control run above was performed at 3f3bf5c7c1. git diff 3f3bf5c7c1..561d89e787 shows no changes to Libraries/LibWeb/HTML/LocalTraversableNavigable.cpp, to any ever_populated logic, or to Libraries/LibCore/EventLoopImplementationWindows.cpp, so the comparison should still hold — but I have not re-run the Linux control at 561d89e787.

Additional observations

  • Not rendering-related. --force-cpu-painting produces the identical crash (21 crashes observed), so the Direct3D/Skia backend is not implicated. The process never reaches renderer initialization.
  • No web content requiredabout:blank is sufficient.
  • The crash arrives via EventLoopImplementationWindows::pump(), i.e. the Windows-specific event loop, and the failing task is the queue_apply_history_step_task continuation lambda from LocalTraversableNavigable.cpp:678.

Possible direction (speculative)

I have not root-caused this, and the following is a hypothesis only.

The assertion at line 756 is the spec assertion for navigationType == "traverse":

case Bindings::NavigationType::Traverse:
    // - "traverse": Assert: targetEntry's document state's ever populated is true.
    VERIFY(target_entry->document_state()->ever_populated());
    break;

Reaching it during initial about:blank startup suggests a traversal is being applied against a session history entry whose document state was never populated. Given that the only platform-specific frame in the stack is EventLoopImplementationWindows, a difference in task scheduling or ordering between the Windows event loop and the POSIX one seems a plausible place to look — e.g. the history-step task running before the initial document has been populated.

Related

  • Windows support #38 — Windows support (tracking)
  • WebContent crash in TraversableNavigable #6840WebContent crash in TraversableNavigable. Different branch of the same switch: that issue concerns adding the FIXME assertions for Replace/Push and finding ever_populated is true where the spec expects false. This report is the inverse case in the existing Traverse assertion (false where the spec requires true), which may indicate the same underlying bookkeeping problem.

Happy to test patches or gather more diagnostics; I have working builds of this commit on both Windows and Linux for comparison.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions