[BUG]:
Flutter Sound Version :
-
FULL or LITE flavor ?
-
Important: Result of the command :
flutter pub deps | grep flutter_sound|-- flutter_sound 9.26.0 | |-- flutter_sound_platform_interface 9.26.0 | | |-- flutter... | | |-- logger... | | '-- plugin_platform_interface... | |-- flutter_sound_web 9.26.0 | | |-- flutter... | | |-- flutter_sound_platform_interface... | | |-- flutter_web_plugins... | | |-- logger... | | '-- web... | |-- logger 2.5.0 | |-- flutter... | |-- path... | |-- path_provider... | '-- synchronized...
Severity
app crashed
Platforms you faced the error
- Android 10
Describe the bug The first execution of startPlayerFromStream resulted in a crash
Logs!!!!
await _recorder.openRecorder(isBGService: true);
await _mPlayer.openPlayer(isBGService: true);
await _mPlayer.startPlayerFromStream(
codec: Codec.pcmFloat32,
interleaved: true,
sampleRate: 16000,
numChannels: 2,
bufferSize: 4096,
);
Connecting to VM Service at ws://127.0.0.1:52361/ihtj_VAcucw=/ws
I/flutter (20001): [2025/03/20 17:40:43]app version:1.0.39
D/permissions_handler(20001): No permissions found in manifest for: []4
I/flutter (20001): [2025/03/20 17:40:43]app build number:1
I/flutter (20001): [2025/03/20 17:40:43]app name:Aivo
I/flutter (20001): [2025/03/20 17:40:43]app package name:com.person.test
I/flutter (20001): [2025/03/20 17:40:43]app env:LOCAL
I/flutter (20001): [2025/03/20 17:40:43]app Permission storage: PermissionStatus.granted
I/flutter (20001): [2025/03/20 17:40:43]app Permission location: PermissionStatus.granted
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 new FlutterSoundRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:231:13)
I/flutter (20001): │ #1 new RealTimeVoiceHelper._internal (package:test/util/real_time_voice_helper.dart:40:42)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 ctor: FlutterSoundRecorder()
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 new FlutterSoundPlayer (package:flutter_sound/public/flutter_sound_player.dart:199:13)
I/flutter (20001): │ #1 new RealTimeVoiceHelper._internal (package:test/util/real_time_voice_helper.dart:45:39)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 ctor: FlutterSoundPlayer()
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundRecorder.openRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:477:13)
I/flutter (20001): │ #1 <asynchronous suspension>
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 FS:---> openRecorder
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundRecorder._openAudioSession (package:flutter_sound/public/flutter_sound_recorder.dart:486:13)
I/flutter (20001): │ #1 FlutterSoundRecorder.openRecorder.<anonymous closure> (package:flutter_sound/public/flutter_sound_recorder.dart:479:11)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 ---> _openAudioSession
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundRecorder._openAudioSession (package:flutter_sound/public/flutter_sound_recorder.dart:510:17)
I/flutter (20001): │ #1 FlutterSoundRecorder.openRecorder.<anonymous closure> (package:flutter_sound/public/flutter_sound_recorder.dart:479:11)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 Resetting flutter_sound Recorder Plugin
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundRecorder.openRecorder (package:flutter_sound/public/flutter_sound_recorder.dart:481:13)
I/flutter (20001): │ #1 <asynchronous suspension>
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 FS:<--- openAudioSession
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): [2025/03/20 17:40:43]app Permission bluetooth: PermissionStatus.granted
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundRecorder._openAudioSession (package:flutter_sound/public/flutter_sound_recorder.dart:526:13)
I/flutter (20001): │ #1 <asynchronous suspension>
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 <--- _openAudioSession
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundRecorder.openRecorderCompleted (package:flutter_sound/public/flutter_sound_recorder.dart:278:13)
I/flutter (20001): │ #1 MethodChannelFlutterSoundRecorder.channelMethodCallHandler.<anonymous closure> (package:flutter_sound_platform_interface/method_channel_flutter_sound_recorder.dart:155:24)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 ---> openRecorderCompleted: true
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundRecorder.openRecorderCompleted (package:flutter_sound/public/flutter_sound_recorder.dart:289:13)
I/flutter (20001): │ #1 MethodChannelFlutterSoundRecorder.channelMethodCallHandler.<anonymous closure> (package:flutter_sound_platform_interface/method_channel_flutter_sound_recorder.dart:155:24)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 <--- openRecorderCompleted: true
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundPlayer._openPlayer (package:flutter_sound/public/flutter_sound_player.dart:728:13)
I/flutter (20001): │ #1 FlutterSoundPlayer.openPlayer.<anonymous closure> (package:flutter_sound/public/flutter_sound_player.dart:722:11)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 FS:---> _openPlayer
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundPlayer._openPlayer (package:flutter_sound/public/flutter_sound_player.dart:741:15)
I/flutter (20001): │ #1 FlutterSoundPlayer.openPlayer.<anonymous closure> (package:flutter_sound/public/flutter_sound_player.dart:722:11)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 Resetting flutter_sound Player Plugin
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): [2025/03/20 17:40:43]app Permission bluetoothScan: PermissionStatus.granted
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundPlayer._openPlayer (package:flutter_sound/public/flutter_sound_player.dart:761:13)
I/flutter (20001): │ #1 <asynchronous suspension>
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 FS:<--- _openPlayer
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundPlayer.openPlayerCompleted (package:flutter_sound/public/flutter_sound_player.dart:282:13)
I/flutter (20001): │ #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler.<anonymous closure> (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:84:21)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 ---> openPlayerCompleted: true
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundPlayer.openPlayerCompleted (package:flutter_sound/public/flutter_sound_player.dart:297:13)
I/flutter (20001): │ #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler.<anonymous closure> (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:84:21)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 <--- openPlayerCompleted: true
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundPlayer._startPlayerFromStream (package:flutter_sound/public/flutter_sound_player.dart:1281:13)
I/flutter (20001): │ #1 FlutterSoundPlayer.startPlayerFromStream.<anonymous closure> (package:flutter_sound/public/flutter_sound_player.dart:1262:13)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 FS:---> startPlayerFromStream
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundPlayer._stop (package:flutter_sound/public/flutter_sound_player.dart:1772:13)
I/flutter (20001): │ #1 FlutterSoundPlayer._startPlayerFromStream (package:flutter_sound/public/flutter_sound_player.dart:1292:11)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 FS:---> _stop
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundPlayer._stop (package:flutter_sound/public/flutter_sound_player.dart:1836:13)
I/flutter (20001): │ #1 <asynchronous suspension>
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 FS:<--- _stop
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundPlayer.stopPlayerCompleted (package:flutter_sound/public/flutter_sound_player.dart:361:13)
I/flutter (20001): │ #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler.<anonymous closure> (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:98:21)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 ---> stopPlayerCompleted: true
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): │ #0 FlutterSoundPlayer.stopPlayerCompleted (package:flutter_sound/public/flutter_sound_player.dart:376:13)
I/flutter (20001): │ #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler.<anonymous closure> (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:98:21)
I/flutter (20001): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20001): │ 🐛 <--- stopPlayerCompleted: true
I/flutter (20001): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20001): [2025/03/20 17:40:43]app Permission bluetoothAdvertise: PermissionStatus.granted
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): Failed to handle method call
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): java.lang.NullPointerException: Attempt to invoke virtual method 'int android.media.AudioTrack.getPlayState()' on a null object reference
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at xyz.canardoux.TauEngine.FlautoPlayerEngine._isPlaying(FlautoPlayerEngine.java:255)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at xyz.canardoux.TauEngine.FlautoPlayer.getPlayerState(FlautoPlayer.java:138)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at xyz.canardoux.fluttersound.FlutterSoundPlayer.getPlayerState(FlutterSoundPlayer.java:154)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at xyz.canardoux.fluttersound.FlutterSoundPlayer.getStatus(FlutterSoundPlayer.java:119)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at xyz.canardoux.fluttersound.FlutterSoundSession.log(FlutterSoundSession.java:124)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at xyz.canardoux.fluttersound.FlutterSoundPlayer.startPlayer(FlutterSoundPlayer.java:225)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at xyz.canardoux.fluttersound.FlutterSoundPlayerManager.onMethodCall(FlutterSoundPlayerManager.java:120)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at android.os.Handler.handleCallback(Handler.java:883)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at android.os.Handler.dispatchMessage(Handler.java:100)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at android.os.Looper.loop(Looper.java:224)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at android.app.ActivityThread.main(ActivityThread.java:7562)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
E/MethodChannel#xyz.canardoux.flutter_sound_player(20001): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
D/ProfileInstaller(20001): Installing profile for com.person.test
I/mart_multi_aiv(20001): ProcessProfilingInfo new_methods=1595 is saved saved_to_disk=1 resolve_classes_delay=8000
Application finished.
Exited (-1).
This is bad 👎 . I am going to look to your issue. A crash is really bad news !
@zhuwei : I fixed your issue in the future Flutter Sound v10.0. I will release it very soon. Perhaps even today or tomorrow. But I am not sure that you will not get another crash a little bit later. You will tell me ...
@zhuwei : I fixed your issue in the future Flutter Sound v10.0. I will release it very soon. Perhaps even today or tomorrow. But I am not sure that you will not get another crash a little bit later. You will tell me ...
May I ask how it was modified? I would like to try it out locally
There was a bug in the Exception Handling. During the Exception, I called getState() on a null object.
I fixed this bug, but you probably have to understand why you have an exception in startPlayer().
Unfortunately, the errors handling is not very good and you will probably only get "Exception in the Android plugin".
Not very clear for you to understand the reason of the exception!
@zhuwei:我在未来的 Flutter Sound v10.0 中修复了您的问题。我很快就会发布它。也许今天或明天。但我不确定你稍后不会再遇到崩溃。你会告诉我的……
请问修改得怎么样?我想在本地试用一下
How did you solve it?
It doesn't seem to be resolved in Flutter Sound v10.0 (Taudio) either
I have found the reason. It does not support android10, but only supports android12 and above. In the _startPlayer method of FlautoPlayerEngine.java
@zhuwei:我在未来的 Flutter Sound v10.0 中修复了您的问题。我很快就会发布它。也许今天或明天。但我不确定你稍后不会再遇到崩溃。你会告诉我的……
请问修改得怎么样?我想在本地试用一下
How did you solve it?
我调试看了,Android12以下不支持,FlautoPlayerEngine.java第244行
I have found the reason. It does not support android10, but only supports android12 and above. In the _startPlayer method of FlautoPlayerEngine.java
@yfhy I'm facing the same issue on an Android device running Android 10. Could you let me know if you found a solution?
I have found the reason. It does not support android10, but only supports android12 and above. In the _startPlayer method of FlautoPlayerEngine.java
@yfhy I'm facing the same issue on an Android device running Android 10. Could you let me know if you found a solution?
Check the git commit records. The restrictions above android12 were added on March 1st. Just download the version before March 1st (v9.23.1 or below). Because of the conflict between dart sdk and other plug-ins, the version I can use is v9.6.0.
Duplicate #1178. Please refer to #1178 for advance in this issue.
This is from #1178 :
I released Taudio 10.3.7. I check now that SDK >= 29 instead of 31. The problem is that I don't remember why the check was SDK 31. Probably it was necessary because I use feature only present in SDK 31. Please check Taudio 10.3.7 and tell me if OK. If not OK, please send logs.
Note : it is really simple to upgrade to 10.3.7. Just 5 minutes. You can read this small notice
Changelog
10.3.7
- Android : Flauto Player Engine : check if SDK >= 29 instead of 31. (fs #1178)