Skip to content

Native package test segfaults on all RIDs on current main #77

Description

@wieslawsoltes

Problem

The required native runtime package gate crashed on every packaged RID after the collapsed single-select popup was added. A packaged Code OSS 1.137.0 host reproduced the same crash on its first pointer input.

Baseline run: https://github.com/SceneTech/WebScene/actions/runs/34683830568

  • Windows x64: native engine test crashed after 2.19 seconds.
  • Linux x64: native engine test crashed after 12.85 seconds.
  • macOS arm64: native engine test crashed after 4.02 seconds.
  • The previous package revision before select-popup merge 19e3c1e passed.

Confirmed root causes

The symbolicated Code OSS macOS crash is EXC_BAD_ACCESS / KERN_INVALID_ADDRESS 0x0 in v8_dom_runtime::dispatch_input. Select-popup pointer dispatch called active_select_popup(), which queried through v8::Isolate::GetCurrentContext(), before the input owner's v8::Context::Scope had been entered.

After fixing context entry, the focused package test exposed three semantic failures:

  1. Collapsed-select layout deliberately suppressed authored option boxes and returned immediately, also skipping the private shadow popup.
  2. The popup is a native top-layer control but relied on ordinary document stacking, allowing overlapping authored content to take its pointer.
  3. Internal popup code assigned attributes["style"] directly. That changed serialized markup without updating WebScene's parsed inline declaration state, so fixed positioning, row minimum heights, padding, and display:none were absent from layout and hit testing.

The earlier media sampler warning was unrelated.

Fix

Draft PR #76, consolidated commit 41cf43cc34355f9511df94631f49baa87ff8818f:

  1. Enters the input owner's V8 context before select-popup lookup or dispatch.
  2. Keeps authored collapsed-select options suppressed while laying out the private shadow popup.
  3. Resolves the active native popup subtree before the ordinary document hit.
  4. Routes private popup styles through the native CSS parse/store/apply path.
  5. Adds webscene_native_select_popup_context, covering open, pointer selection, close/hit-test removal, reopen/outside dismissal, keyboard commit, disabled options, and Escape.
  6. Waits for synthetic clicks to be consumed so asynchronous input cannot race the assertion.

Acceptance status

  • Focused popup CTest: passed on packaged Windows x64, Linux x64, and macOS arm64.
  • Full native engine suite: passed without a crash on all three RIDs.
  • Required 150-document/514-subtest web-platform subset: passed.
  • Complete hosted CI, cross-RID evidence, release package verification, and all RID consumer installs: passed.
  • Remaining integration acceptance: rebuild the AppScene SDK with this revision and pass the packaged Code OSS editor create/type/render/undo smoke.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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