Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [native] Fix errors when hot restarted #86

Merged
merged 6 commits into from
Sep 13, 2023

Conversation

littleGnAl
Copy link
Collaborator

Fix errors when hot started

  1. Type cast error
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Pointer<NativeType>' is not a subtype of type 'Pointer<Void>' in type cast
#0      NativeIrisApiEngineBindingsDelegate.destroyNativeApiEngine (package:agora_rtc_engine/src/impl/platform/io/native_iris_api_engine_binding_delegate.dart:167:50)
#1      _HotRestartFinalizer._finalize (package:iris_method_channel/src/platform/io/iris_method_channel_internal_io.dart:152:27)
#2      _RootZone.runUnaryGuarded (dart:async/zone.dart:1586:10)
#3      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#4      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#5      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#6      _StreamController._add (dart:async/stream_controller.dart:648:7)
#7      _StreamController.add (dart:async/stream_controller.dart:596:5)
#8      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
  1. The provideIrisEvent assertion error
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:iris_method_channel/src/platform/io/iris_method_channel_internal_io.dart': Failed assertion: line 161 pos 12: 'provider.provideIrisEvent() != null': is not true.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2      _HotRestartFinalizer._finalize (package:iris_method_channel/src/platform/io/iris_method_channel_internal_io.dart:161:12)
#3      _RootZone.runUnaryGuarded (dart:async/zone.dart:1586:10)
#4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#5      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#6      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#7      _StreamController._add (dart:async/stream_controller.dart:648:7)
#8      _StreamController.add (dart:async/stream_controller.dart:596:5)
#9      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)

@littleGnAl littleGnAl merged commit ab6260e into main Sep 13, 2023
50 checks passed
@littleGnAl littleGnAl deleted the littlegnal/fix-apiengine-ptr branch September 13, 2023 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant