endmr11 / ed_screen_recorder

Screen recorder plugin for Flutter. Supports IOS and Android devices.
MIT License
26 stars 35 forks source link

iOS crash when stop recording #2

Closed Teutonic-Knight-0 closed 2 years ago

Teutonic-Knight-0 commented 2 years ago

Error:

2022-04-28 08:33:02.467842+0200 Runner[20228:84206] flutter: >>> Start Record Response Output: 2022-04-28 08:33:02.468438+0200 Runner[20228:84206] flutter: File: File: '/Users/**/Library/Developer/CoreSimulator/Devices/DA62A4C7-03B9-4678-9DAE-CA04028041D1/data/Containers/Data/Application/5753A741-3613-4225-A5BA-A15F36FA3100/Documents/snap_video_memo.mp4' 2022-04-28 08:33:02.468826+0200 Runner[20228:84206] flutter: Event Name: startRecordScreen 2022-04-28 08:33:02.469190+0200 Runner[20228:84206] flutter: Progressing: true 2022-04-28 08:33:02.469536+0200 Runner[20228:84206] flutter: Message: Started Video 2022-04-28 08:33:02.469911+0200 Runner[20228:84206] flutter: Success: false 2022-04-28 08:33:02.470280+0200 Runner[20228:84206] flutter: Video Hash: 0d67d570c6bd11eca315958b21721a32 2022-04-28 08:33:02.470634+0200 Runner[20228:84206] flutter: Start Date: 1651127582444 2022-04-28 08:33:02.470965+0200 Runner[20228:84206] flutter: End Date: 0 2022-04-28 08:33:02.471298+0200 Runner[20228:84206] flutter: Stopping recording... 2022-04-28 08:33:06.747271+0200 Runner[20228:83893] Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: ' -[AVAssetWriterInput markAsFinished] Cannot call method when status is 0' * First throw call stack: ( 0 CoreFoundation 0x0000000111891d44 exceptionPreprocess + 242 1 libobjc.A.dylib 0x000000011114fa65 objc_exception_throw + 48 2 AVFCore 0x00000001147fc934 -[AVAssetWriterInputHelper markCurrentPassAsFinished] + 0 3 AVFCore 0x00000001147f7d5d -[AVAssetWriterInput markAsFinished] + 135 4 ed_screen_recorder 0x000000010fdeb6e0 $s18ed_screen_recorder27SwiftEdScreenRecorderPluginC13stopRecordingSbyF + 528 5 ed_screen_recorder 0x000000010fde6c24 $s18ed_screen_recorder27SwiftEdScreenRecorderPluginC6handle_6resultySo17FlutterMethodCallC_yypSgctF + 8164 6 ed_screen_recorder 0x000000010fde8486 $s18ed_screen_recorder27SwiftEdScreenRecorderPluginC6handle_6resultySo17FlutterMethodCallC_yypSgctFTo + 118 7 Flutter 0x0000000115703fc1 45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 104 8 Flutter 0x0000000115141332 _ZN7flutter25PlatformMessageHandlerIos21HandlePlatformMessageENSt3110unique_ptrINS_15PlatformMessageENS1_14default_deleteIS3_EEEE_block_invoke + 86 9 libdispatch.dylib 0x0000000112240816 _dispatch_call_block_and_release + 12 10 libdispatch.dylib 0x0000000112241a5b _dispatch_client_callout + 8 11 libdispatch.dylib 0x0000000112250325 _dispatch_main_queue_drain + 1169 12 libdispatch.dylib 0x000000011224fe86 _dispatch_main_queue_callback_4CF + 31 13 CoreFoundation 0x00000001117fe261 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 14 CoreFoundation 0x00000001117f8a56 __CFRunLoopRun + 2761 15 CoreFoundation 0x00000001117f7a90 CFRunLoopRunSpecific + 562 16 GraphicsServices 0x0000000114e40c8e GSEventRunModal + 139 17 UIKitCore 0x0000000127fac90e -[UIApplication _run] + 928 18 UIKitCore 0x0000000127fb1569 UIApplicationMain + 101 19 Runner 0x0000000100ce90ef main + 63 20 dyld 0x000000010b39af21 start_sim + 10 21 ??? 0x0000000202cf551e 0x0 + 8637076766 22 ??? 0x0000000000000003 0x0 + 3 ) libc++abi: terminating with uncaught exception of type NSException dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/**/Library/Developer/Xcode/DerivedData/Runner-edrxhytrxvwzgscvhedcdziofrqp/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMTLCapture.dylib DYLD_FRAMEWORK_PATH=/Users/***/Library/Developer/Xcode/DerivedData/Runner-edrxhytrxvwzgscvhedcdziofrqp/Build/Products/Debug-iphonesimulator Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: ' -[AVAssetWriterInput markAsFinished] Cannot call method when status is 0' terminating with uncaught exception of type NSException CoreSimulator 802.6 - Device: iPad Pro (12.9-inch) (5th generation) (DA62A4C7-03B9-4678-9DAE-CA04028041D1) - Runtime: iOS 15.4 (19E240) - DeviceType: iPad Pro (12.9-inch) (5th generation)

Flutter Doctor:

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel master, 2.13.0-0.0.pre.792, on macOS 12.3.1 21E258 darwin-arm, locale en-ZA) [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 13.3.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.1) [✓] Android Studio (version 2021.1) [✓] IntelliJ IDEA Ultimate Edition (version 2022.1) [✓] IntelliJ IDEA Ultimate Edition (version 2022.1) [✓] IntelliJ IDEA Ultimate Edition (version 2021.3.3) [✓] Connected device (2 available) [✓] HTTP Host Availability

• No issues found!

endmr11 commented 2 years ago

Is the tested device real or emulator?

Teutonic-Knight-0 commented 2 years ago

@endmr11 iOS simulator.

endmr11 commented 2 years ago

@Teutonic-Knight-0 Sorry, IOS operating system does not support emulator.

Teutonic-Knight-0 commented 2 years ago

Tested on real iOS device and it works.

endmr11 commented 2 years ago

@Teutonic-Knight-0 Can you tell me the model you tested? Let me add list of tested devices. Thx.

Teutonic-Knight-0 commented 2 years ago

@endmr11 iPhone 11 Pro Max