Closed WeJeson closed 2 years ago
Apart from this specific crash, it would be great if the plugin would catch unexpected exceptions, pass them to dart and throw them as dart exceptions, so we can catch them (e.g. as PluginException)
It happens for me as well. I can reproduce it if i try to compress an image which is not a valid jpeg file.
I have created that fixes the crashes on iOS for my app. Feel free to check it out: https://github.com/fluttercandies/flutter_image_compress/pull/220
我现在使用的是1.1.3版本,在iphone6s iOS13.6上,多次对图片压缩就会出现崩溃 2023-02-16 17:05:49.876407+0800 Runner[1540:122140] Assertion failure in -[FlutterStandardTypedData initWithData:type:], FlutterStandardCodec.mm:175 2023-02-16 17:05:49.878501+0800 Runner[1540:122140] Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Data cannot be nil' First throw call stack: (0x1a539c654 0x1a50bebcc 0x1a529f6ec 0x1a56e516c 0x10d2a2d2c 0x10d2a2fe4 0x10c94f684 0x10c950894 0x10d492338 0x10d493730 0x10d495e88 0x10d4a4d74 0x10d4a5698 0x1a50b3b38 0x1a50b6740) libc++abi.dylib: terminating with uncaught exception of type NSException Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Data cannot be nil' terminating with uncaught exception of type NSException 非常希望能尽快解决此问题
Assertion failure in -[FlutterStandardTypedData initWithData:type:], FlutterStandardCodec.mm:175 Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Data cannot be nil' *** First throw call stack: (0x193a1dd78 0x1ac682734 0x1952a31f0 0x10d006560 0x10d006818 0x108ea3bec 0x108ea57b0 0x193682e68 0x193684a2c 0x193687b44 0x193696164 0x19369696c 0x2049a2080 0x2049a1e5c) libc++abi: terminating with uncaught exception of type NSException
__pthread_kill + 8 libsystem_kernel.dylib
__pthread_kill: -> 0x1cb38cb78 <+8>: b.lo 0x1cb38cb98 ; <+40> 0x1cb38cb7c <+12>: pacibsp 0x1cb38cb80 <+16>: stp x29, x30, [sp, #-0x10]! 0x1cb38cb84 <+20>: mov x29, sp Target 0: (Runner) stopped.