Skip to content

App crashes on stop(), dispose(), or hot restart. #53

Description

@knttnk

Which API doesn't behave as documented, and how does it misbehave?
stop(), dispose() and hot restart.

Minimal reproduction project
https://github.com/knttnk/just_audio_windows_test

The only difference from the "empty application" template is main.dart.

To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:

  1. Run the app.
  2. Perform one of the following actions:
    • Click stop()
    • Click dispose()
    • Perform a hot restart
  3. The app crashes.
Launching lib\main.dart on Windows in debug mode...
√ Built build\windows\x64\runner\Debug\just_audio_test.exe
Connecting to VM Service at ws://127.0.0.1:60477/lqudCL-Oj30=/ws
Connected to the VM Service.
[just_audio_windows] Called setVolume
[just_audio_windows] Called setSpeed
[just_audio_windows] Called setPitch
[just_audio_windows] Called setSkipSilence
[just_audio_windows] Called setLoopMode
[just_audio_windows] Called setShuffleMode
[just_audio_windows] Called load
[ERROR:flutter/shell/common/shell.cc(1178)] The 'com.ryanheise.just_audio.events.370b91a7-de60-4837-86c0-e491823a10fe' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
[ERROR:flutter/shell/common/shell.cc(1178)] The 'com.ryanheise.just_audio.data.370b91a7-de60-4837-86c0-e491823a10fe' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
[just_audio_windows]: Broadcast playback event error: Error accessing BufferingProgress. Using default value of 1.
[just_audio_windows] Broadcast event error: 操作は中断されました
Lost connection to device.

Exited.

"操作は中断されました" means "operation is stopped".

Expected behavior
Not crash.

Screenshots
none

Flutter SDK version

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.38.3, on Microsoft Windows [Version 10.0.26200.7171], locale ja-JP)
[√] Windows Version (11 Education 64-bit, 25H2, 2009)
[!] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
    X cmdline-tools component is missing.
      Try installing or updating Android Studio.
      Alternatively, download the tools from https://developer.android.com/studio#command-line-tools-only and make
      sure to set the ANDROID_HOME environment variable.
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/windows-android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.14.20)
[√] Connected device (3 available)
[√] Network resources

Additional context
none

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingr: fixed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions