GetStream / stream-video-flutter

Flutter Video SDK - Build your own video app experience using Dart, Flutter and the Stream Video Messaging API.
https://getstream.io/video/docs/flutter/
Other
37 stars 11 forks source link

Error when adding subscription to disposed CallSession #618

Open Brazol opened 1 month ago

Brazol commented 1 month ago

Reported by customer:

I am on the most recent version of StreamVideo on Github master and via Crashlytics I got notifications of two of my users having the following error (in total this error occured 4 times)

Fatal Exception: FlutterError Bad state: Cannot add new events after calling close

Fatal Exception: FlutterError
0  ???                            0x0 _BroadcastStreamController.add (dart:async)
1  ???                            0x0 Subject._add + 151 (subject.dart:151)
2  ???                            0x0 Subject.add + 141 (subject.dart:141)
3  ???                            0x0 DebounceBuffer.post + 37 (debounce_buffer.dart:37)
4  ???                            0x0 CallSession.updateSubscription + 660 (call_session.dart:660)
5  ???                            0x0 Call.removeSubscription + 1672 (call.dart:1672)
6  ???                            0x0 StreamVideoRenderer._onSizeChanged + 137 (video_renderer.dart:137)
7  ???                            0x0 StreamVideoRenderer._onVisibilityChanged + 113 (video_renderer.dart:113)
8  ???                            0x0 RenderVisibilityDetectorBase._fireCallback + 87 (render_visibility_detector.dart:87)
9  ???                            0x0 RenderVisibilityDetectorBase._scheduleUpdate.<fn> + 150 (render_visibility_detector.dart:150)
10 ???                            0x0 RenderVisibilityDetectorBase._processCallbacks + 62 (render_visibility_detector.dart:62)
11 ???                            0x0 _TaskEntry.run + 91 (binding.dart:91)
12 ???                            0x0 SchedulerBinding.handleEventLoopCallback + 529 (binding.dart:529)
13 ???                            0x0 SchedulerBinding._runTasks + 504 (binding.dart:504)
deven98 commented 1 month ago

@Brazol please add more details as to when and why this is used. Also, any code snippet you know of that is specifically causing this issue.

Brazol commented 1 month ago

@deven98 It was reported by a customer, spotted on Crashlytics. We don't have any more context. I updated the description.