Skip to content

Bug | SendWebMessage from WindowCreated handler raises a System.AccessViolationException #293

@AnnaSasDev

Description

@AnnaSasDev

Severity

Critical (crash, data loss)

Describe the bug

SendWebMessage is guarded during shutdown; readiness ordering for very-early lifecycle events still needs explicit documented contract + tests.

Steps to reproduce

  1. Start from an existing InfiniFrame example or unit-test scaffold for the same feature area.
  2. Reproduce the backlog scenario exactly as described in the linked Photino issue.
  3. Capture runtime logs and any native stack traces.
  4. Record platform + engine (WebView2/WebKit2GTK/WKWebView) used for reproduction.

Expected behavior

Define explicit API/behavior for this migration item, implement in managed + native layers where needed, and add focused tests/documentation.

Actual behavior

Pending InfiniFrame-specific reproduction details.

Logs / Error Output

Attach managed log output and native crash/diagnostic data collected during reproduction.

Minimal reproduction

// Very-early SendWebMessage lifecycle repro
using InfiniFrame;

var builder = InfiniFrameWindowBuilder.Create()
    .SetStartString("<html><body>WindowCreated message test</body></html>");

builder.RegisterWindowCreatedHandler(window => {
    // Historically risky timing area in Photino
    window.SendWebMessage("created:hello");
});

var window = builder.Build();
window.WaitForClose();

.NET Version

.NET 10.0 (or exact runtime used in reproduction)

Project Version / Commit

Current main commit at filing time

Operating System

Fill from reproduction environment(s)

Checklist

  • I searched existing issues
  • I can reproduce this consistently
  • I included logs and/or a reproduction

Metadata

Metadata

Assignees

No one assigned

    Labels

    Photino BacklogItems that are hold overs from Photino that they either never resolved or implementedbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions