Skip to content

[flutter_tools] Chromium crash diagnostic prints only startup output instead of the last 200 lines #195823

Closed

Description

@bkonyi

When Chrome exits unexpectedly with a non-zero exit code, Chromium logs:

Chrome process PID <pid> exited unexpectedly with code <code>.
Last 200 lines of Chrome output:
...

In ChromiumLauncher._spawnChromiumProcess, stdout and stderr listeners append to a rolling 200-line ListQueue<String> logBuffer for the lifetime of the browser process. However, as soon as "DevTools listening" is observed on stderr, _spawnChromiumProcess returns _SpawnResult(process, port, host, logBuffer.toList()).

Because logBuffer.toList() snapshots the queue at startup, Chromium._logBuffer never sees any output emitted after "DevTools listening", and crash diagnostics only print early startup messages rather than the output leading up to the crash. Passing the live Iterable<String> (logBuffer) instead of logBuffer.toList() will preserve the rolling buffer through process exit.

Activity

  1. added
    tool
    platform-web
    P2
    team-tool
    triaged-tool
    on Nov 2, 2026
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

    P2platform-webteam-tooltooltriaged-tool

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions