wang-bin / fvp

Flutter video player plugin for all desktop+mobile platforms. download prebuilt examples from github actions. https://pub.dev/packages/fvp
BSD 3-Clause "New" or "Revised" License
197 stars 31 forks source link

runtime error after upgrade to Flutter 3.16.0 #51

Closed Nicoeevee closed 1 year ago

Nicoeevee commented 1 year ago

Describe the bug runtime error after upgrade to Flutter 3.16.0

Expected behavior play video as usually

Log Add

import 'package:logging/logging.dart';
import 'package:intl/intl.dart';

add the following lines before registerWith()

  Logger.root.level = Level.ALL;
  final df = DateFormat("HH:mm:ss.SSS");
  Logger.root.onRecord.listen((record) {
    print('${record.loggerName}.${record.level.name}: ${df.format(record.time)}: ${record.message}');
  });

and flutter doctor

[✓] Flutter (Channel stable, 3.16.0, on macOS 14.1.1 23B81 darwin-arm64, locale
    zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
[✓] VS Code (version 1.83.1)
[✓] Connected device (4 available)
[✓] Network resources

Log iOS

flutter: runZonedGuarded
flutter: mdk.INFO: 2023-11-16 11:47:35.551349: 0.23.0 (git 9270859) - Multimedia Development Kit. Copyright (c) 2016-2023 WangBin(QtAV author) <wbsecg1 at gmail.com>
Build for: iOS80000/17.1.1 ARMv8 AArch64; AppleClang14.0.3 (clang-1403.0.22.14.1)GCC4.2.1; libc++15006; 12:19:08 Nov  5 2023
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'dart:core-patch/finalizer_patch.dart': Failed assertion: line 41 pos 12: '<optimized out>': The token should not be the value being attached
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2      _FinalizerImpl.attach (dart:core-patch/finalizer_patch.dart:41:12)
#3      new Player (package:fvp/src/player.dart:27:9)
#4      new MdkVideoPlayer (package:fvp/src/video_player_mdk.dart:30:22)
#5      MdkVideoPlayerPlatform.create (package:fvp/src/video_player_mdk.dart:195:20)
#6      VideoPlayerController.initialize (package:video_player/video_player.dart:438:46)
#7      _ChewieDemoState.initializePlayer (package:cam/features/replay_video/presentation/pages/app.dart:101:31)
#8      _ChewieDemoState.initState (package:cam/features/replay_video/presentation/pages/app.dart:77:5)
#9      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5602:55)
#10     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
#11     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
#12     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
#13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#14     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#15     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:5)
#16     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
#17     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
#18     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
#19     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#20     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#21     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#22     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:5)
#23     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5625:11)
#24     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
#25     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
#26     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
#27     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#28     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#29     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:5)
#30     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
#31     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
#32     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
#33     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#34     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#35     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:5)
#36     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
#37     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
#38     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
#39     _RawViewElement._updateChild (package:flutter/src/widgets/view.dart:289:16)
#40     _RawViewElement.mount (package:flutter/src/widgets/view.dart:312:5)
#41     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
#42     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
#43     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#44     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#45     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:5)
#46     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
#47     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
#48     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
#49     RootElement._rebuild (package:flutter/src/widgets/binding.dart:1334:16)
#50     RootElement.mount (package:flutter/src/widgets/binding.dart:1303:5)
#51     RootWidget.attach.<anonymous closure> (package:flutter/src/widgets/binding.dart:1256:18)
#52     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2835:19)
#53     RootWidget.attach (package:flutter/src/widgets/binding.dart:1255:13)
#54     WidgetsBinding.attachToBuildOwner (package:flutter/src/widgets/binding.dart:1083:27)
#55     WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:1065:5)
#56     WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:1051:7)
#57     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
#58     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
#59     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
#60     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
flutter: mdk.INFO: 2023-11-16 11:47:35.897310: default0x103b3dd20 new FrameReader...
flutter: mdk.INFO: 2023-11-16 11:47:35.897394: Registered audio backends: AudioQueue OpenAL null
flutter: mdk.INFO: 2023-11-16 11:47:35.897438: default0x103b12240 new FrameReader...
flutter: mdk.INFO: 2023-11-16 11:47:35.897473: Registered audio backends: AudioQueue OpenAL null
flutter: mdk.INFO: 2023-11-16 11:47:35.897504: 0x103b50450mdk::Player::Player()
flutter: mdk.INFO: 2023-11-16 11:47:35.897536: default0x103c2c4f0 new FrameReader...
flutter: mdk.INFO: 2023-11-16 11:47:35.897565: Registered audio backends: AudioQueue OpenAL null
flutter: mdk.INFO: 2023-11-16 11:47:35.897593: default0x103c35880 new FrameReader...
flutter: mdk.INFO: 2023-11-16 11:47:35.897620: Registered audio backends: AudioQueue OpenAL null
flutter: mdk.INFO: 2023-11-16 11:47:35.897649: 0x103c433e0mdk::Player::Player()

Android

I/flutter (23986): runZonedGuarded
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:23.855790: 0.23.0 (git 1b6b064) - Multimedia Development Kit. Copyright (c) 2016-2023 WangBin(QtAV author) <wbsecg1 at gmail.com>
I/flutter (23986): Build for: Android21/34.0.0 ARMv8 AArch64; Clang17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)GCC4.2.1; libc++170000; 16:37:29 Nov  6 2023
W/libOpenSLES(23986): Leaving Object::GetInterface (SL_RESULT_FEATURE_UNSUPPORTED)
W/libOpenSLES(23986): Leaving Object::GetInterface (SL_RESULT_FEATURE_UNSUPPORTED)
W/libOpenSLES(23986): Leaving Object::GetInterface (SL_RESULT_FEATURE_UNSUPPORTED)
W/libOpenSLES(23986): Leaving Object::GetInterface (SL_RESULT_FEATURE_UNSUPPORTED)
E/flutter (23986): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'dart:core-patch/finalizer_patch.dart': Failed assertion: line 41 pos 12: '<optimized out>': The token should not be the value being attached
E/flutter (23986): #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter (23986): #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
E/flutter (23986): #2      _FinalizerImpl.attach (dart:core-patch/finalizer_patch.dart:41:12)
E/flutter (23986): #3      new Player (package:fvp/src/player.dart:27:9)
E/flutter (23986): #4      new MdkVideoPlayer (package:fvp/src/video_player_mdk.dart:30:22)
E/flutter (23986): #5      MdkVideoPlayerPlatform.create (package:fvp/src/video_player_mdk.dart:195:20)
E/flutter (23986): #6      VideoPlayerController.initialize (package:video_player/video_player.dart:438:46)
E/flutter (23986): #7      _ChewieDemoState.initializePlayer (package:cam/features/replay_video/presentation/pages/app.dart:101:31)
E/flutter (23986): #8      _ChewieDemoState.initState (package:cam/features/replay_video/presentation/pages/app.dart:77:5)
E/flutter (23986): #9      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5602:55)
E/flutter (23986): #10     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
E/flutter (23986): #11     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
E/flutter (23986): #12     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
E/flutter (23986): #13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
E/flutter (23986): #14     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
E/flutter (23986): #15     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:5)
E/flutter (23986): #16     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
E/flutter (23986): #17     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
E/flutter (23986): #18     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
E/flutter (23986): #19     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
E/flutter (23986): #20     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
E/flutter (23986): #21     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
E/flutter (23986): #22     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:5)
E/flutter (23986): #23     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5625:11)
E/flutter (23986): #24     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
E/flutter (23986): #25     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
E/flutter (23986): #26     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
E/flutter (23986): #27     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
E/flutter (23986): #28     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
E/flutter (23986): #29     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:5)
E/flutter (23986): #30     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
E/flutter (23986): #31     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
E/flutter (23986): #32     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
E/flutter (23986): #33     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
E/flutter (23986): #34     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
E/flutter (23986): #35     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:5)
E/flutter (23986): #36     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
E/flutter (23986): #37     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
E/flutter (23986): #38     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
E/flutter (23986): #39     _RawViewElement._updateChild (package:flutter/src/widgets/view.dart:289:16)
E/flutter (23986): #40     _RawViewElement.mount (package:flutter/src/widgets/view.dart:312:5)
E/flutter (23986): #41     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
E/flutter (23986): #42     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
E/flutter (23986): #43     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
E/flutter (23986): #44     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
E/flutter (23986): #45     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:5)
E/flutter (23986): #46     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
E/flutter (23986): #47     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
E/flutter (23986): #48     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
E/flutter (23986): #49     RootElement._rebuild (package:flutter/src/widgets/binding.dart:1334:16)
E/flutter (23986): #50     RootElement.mount (package:flutter/src/widgets/binding.dart:1303:5)
E/flutter (23986): #51     RootWidget.attach.<anonymous closure> (package:flutter/src/widgets/binding.dart:1256:18)
E/flutter (23986): #52     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2835:19)
E/flutter (23986): #53     RootWidget.attach (package:flutter/src/widgets/binding.dart:1255:13)
E/flutter (23986): #54     WidgetsBinding.attachToBuildOwner (package:flutter/src/widgets/binding.dart:1083:27)
E/flutter (23986): #55     WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:1065:5)
E/flutter (23986): #56     WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:1051:7)
E/flutter (23986): #57     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
E/flutter (23986): #58     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
E/flutter (23986): #59     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
E/flutter (23986): #60     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
E/flutter (23986): 
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.856502: default0xb40000743cbac630 new FrameReader...
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.856765: Registered audio backends: OpenSL AudioTrack null 
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.856962: OpenSL extensions: ANDROID_SDK_LEVEL_34
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.857156: default0xb40000743cba3670 new FrameReader...
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.857296: Registered audio backends: OpenSL AudioTrack null 
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.857412: OpenSL extensions: ANDROID_SDK_LEVEL_34
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.857543: 0xb40000739cbafea0mdk::Player::Player()
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.857723: default0xb40000743cba9430 new FrameReader...
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.857868: Registered audio backends: OpenSL AudioTrack null 
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.857989: OpenSL extensions: ANDROID_SDK_LEVEL_34
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.858186: default0xb40000743cba7e50 new FrameReader...
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.858320: Registered audio backends: OpenSL AudioTrack null 
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.858474: OpenSL extensions: ANDROID_SDK_LEVEL_34
I/flutter (23986): mdk.INFO: 2023-11-16 11:59:24.858606: 0xb40000739cbb9be0mdk::Player::Player()
wang-bin commented 1 year ago

try the latest git version

Nicoeevee commented 1 year ago

try the latest git version

Worked perfect, thanks for your help <3