Open cybrox opened 1 year ago
Hi @cybrox, Thanks for filing the issue. I am able to reproduce the issue on the latest stable channel but not on the master channel. So I believe this is fixed on the master channel. You can verify this by switching to the master channel by running
flutter channel master
flutter upgrade
output from master
Hi @maheshmnj, thanks for the reply! I tried running it using Flutter from the master channel and the error builder is shown correctly. However, I still get an uncaught exception.
When I originally got this, I did not worry about it too much, as in all of our tests, it seemed like the application would recover from it. However, we have been getting feedback from users and crash reports from production via crashlytics now.
I tested with the following setup:
Flutter 3.1.0-0.0.pre.1630 • channel master • https://github.com/flutter/flutter.git
Framework • revision 803ef6a456 (2 hours ago) • 2022-07-13 11:07:59 +0200
Engine • revision 20038216ac
Tools • Dart 2.18.0 (build 2.18.0-272.0.dev) • DevTools 2.15.0
Thanks for the confirmation @cybrox I do get the error in the console too and the error Widget is shown as expected. Code sample https://github.com/flutter/flutter/issues/107416#issuecomment-1181384556
Any update? Thanks
I found a temporary solution
Just filter manualy in FlutterError.onError
FlutterError.onError = (FlutterErrorDetails details) {
if (details.library == 'image resource service') {
return;
}
FirebaseCrashlytics.instance.recordFlutterFatalError(details);
};
Anyone who uses Bugsnag for error reporting might be experiencing this error without realizing it, because certain variations of the errors from Image lead to the Bugsnag library itself throwing an unrelated StateError. Here's the issue tracking that for Bugsnag https://github.com/bugsnag/bugsnag-flutter/issues/186.
A workaround for Bugsnag is adding filtering to bugsnag.start
await bugsnag.start(
onError: [
(BugsnagEvent event) {
event.errors.removeWhere(
(BugsnagError error) {
if (error.errorClass == 'HttpException' || error.errorClass == 'SocketException') {
return error.stacktrace.isEmpty;
}
return false;
},
);
return event.errors.isNotEmpty;
},
],
Can we please get a fix where the error isn't uncaught? That's literally what the ErrorBuilder is for (or can we at least have the fix on stable if this already exists in master)
I've been facing this issue for about a year now, and it hasn't been solved yet. It is still throwing an uncaught exception, even though I'm using the imageErrorBuilder.
Getting this error too whenever the URI does not exist, with or without errorBuilder
.
Same goes if you try to load an image with an invalid extension. EXCEPTION UNCAUGHT
Widget build(BuildContext context) {
try {
return CachedNetworkImage(
fit: BoxFit.fitHeight,
imageUrl: imageUrl!,
imageBuilder: (context, imageProvider) {
return Container(
width: 40.0,
height: 40.0,
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(image: imageProvider),
),
);
},
placeholder: (context, url) => const CircularProgressIndicator(),
errorWidget: (context, url, error) => const Icon(Icons.error),
);
} on Error catch (e) {
return const Icon(PhosphorIcons.alien_bold);
} catch (e) {
if (e is ArgumentError &&
e.toString().contains('No host specified in URI')) {
print('Invalid image URL: ${imageUrl}');
return const Icon(PhosphorIcons.x_circle_bold);
} else {
print('Error loading image: $e');
return const Icon(PhosphorIcons.x_bold);
}
}
}
I made a patch to flutter stable
branch, to prevent throwing errors for debug mode. To use it:
where flutter
- navigate theregit apply stop_images_throwing.patch
its actually simple change in two files:
Seriously, how is it acceptable to just throw errors that are already known/handled and not fix it for over year?
Still facing this issue in stable version 3.10.6.
Facing this issue as well on channel stable 3.13.2. Trying to load an image without an internet connection on the device throws an uncaught exception even with errorBuilder.
Edit: Everything works fine on channel master 3.14.0-14.0.pre.116
Facing this issue as well on channel stable 3.13.2. Trying to load an image without an internet connection on the device throws an uncaught exception even with errorBuilder.
Edit: Everything works fine on channel master 3.14.0-14.0.pre.116
Can confirm that beta channel does not have the issue for me either.
Any information on when this is going to land in stable channel?
Changes that have landed in beta will show up in next stable release of flutter for more details see flutter build release channels
Changes that have landed in beta will show up in next stable release of flutter for more details see flutter build release channels
Doesn't this means that it should be available on latest stable (3.16.x)? If so, is this issue solved?
guys, any progress?
Still running into this:
try {
image = Image.network(
'${Config.imageAPI.url}/v1/image/$imageID?type=profile',
errorBuilder: (c, o, s) {
return Images.noImage;
}).image;
} catch (e) {
image = Images.noImage.image;
}
our image-api returns a 4xx error but it's not catched neither by errorBuilder nor using the try catch block around
══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════
Error: HTTP request failed, statusCode: 400,
<invalid image url>
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:3 throw_
packages/flutter/src/painting/_network_image_web.dart 146:11 <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 574:37 _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 579:39 dcall
The following ProgressEvent$ object was thrown resolving an image codec:
[object ProgressEvent]
When the exception was thrown, this was the stack
Image provider:
NetworkImage("<invalid image url>",
scale: 1.0)
Image key:
NetworkImage("<invalid image url>",
scale: 1.0)
════════════════════════════════════════════════════════════════════════════════════════════════════
Also still have the same issue on Flutter (Channel stable, 3.19.0) ... any way to catch this error?
Also still have the same issue on Flutter (Channel stable, 3.19.0) ... any way to catch this error?
The workaround we currently use (which is quite heavy and ugly) is to encapsulate the image in a FutureBuilder making a normal http.get request against the image and catching the error in the http request and on success let Image.network do it's job.
Feels ugly since for every image we need to do the get request, also caching behavior may change, but at least it does not throw random errors that may stop the app from working.
@maheshmnj what release version is expected to contain a valid fix?
I'm sure this problem is still there. I'm using 3.19.6, even I have errorBuilder in my Image.network widget, it will still throw the exception.
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: SocketException: Connection timed out (OS Error: Connection timed out, errno = 110), address = MYADDRESS, port = 42108. Error thrown resolving an image codec.
same here still got the same problem... only sometimes the image load correctly..
Steps to Reproduce
main.dart
Expected results: The image should not load (as the image data is invalid) and the
errorBuilder
should be called instead.Actual results: App crashes with uncaught exception
_Exception (Exception: Invalid image data)
Code sample
See gist linked above. Minimal usage is: ```dart Image( image: invalidJpgImageData, width: 640, height: 480, gaplessPlayback: true ) ``` For obtaining an invalid JPEG, use the bytes in the gist or open a JPEG in a hex editor and keep changing bytes until a viewer can no longer open it properly.Logs
``` [ +49 ms] executing: uname -m [ +21 ms] Exit code 0 from: uname -m [ ] x86_64 [ +4 ms] executing: [/home/sgehring/.asdf/installs/flutter/3.0.1-stable/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +2 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] fb57da5f945d02ef4f98dfd9409a72b7cce74268 [ ] executing: [/home/sgehring/.asdf/installs/flutter/3.0.1-stable/] git tag --points-at fb57da5f945d02ef4f98dfd9409a72b7cce74268 [ +7 ms] Exit code 0 from: git tag --points-at fb57da5f945d02ef4f98dfd9409a72b7cce74268 [ ] 3.0.1 [ +5 ms] executing: [/home/sgehring/.asdf/installs/flutter/3.0.1-stable/] git rev-parse --abbrev-ref --symbolic @{u} [ +2 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/stable [ ] executing: [/home/sgehring/.asdf/installs/flutter/3.0.1-stable/] git ls-remote --get-url origin [ +1 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +55 ms] executing: [/home/sgehring/.asdf/installs/flutter/3.0.1-stable/] git rev-parse --abbrev-ref HEAD [ +2 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] stable [ +35 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +42 ms] executing: /home/sgehring/Android/Sdk/platform-tools/adb devices -l [ +23 ms] List of devices attached 802d5cf6 device usb:1-4 product:beryllium model:POCOPHONE_F1 device:beryllium transport_id:2 [ +4 ms] /home/sgehring/Android/Sdk/platform-tools/adb -s 802d5cf6 shell getprop [ +91 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +82 ms] Skipping pub get: version match. [ +44 ms] Generating /home/sgehring/development/img_crash/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java [ +43 ms] ro.hardware = qcom [ +29 ms] Initializing file store [ +7 ms] Skipping target: gen_localizations [ +4 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /home/sgehring/development/img_crash/.dart_tool/package_config_subset} [ +16 ms] gen_dart_plugin_registrant: Complete [ ] Skipping target: _composite [ +1 ms] complete [ +4 ms] Launching lib/main.dart on POCOPHONE F1 in debug mode... [ +3 ms] /home/sgehring/.asdf/installs/flutter/3.0.1-stable/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/sgehring/.asdf/installs/flutter/3.0.1-stable/bin/cache/dart-sdk/bin/snapshots/frontend_server.dart.snapshot --sdk-root /home/sgehring/.asdf/installs/flutter/3.0.1-stable/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill /tmp/flutter_tools.OMYSCH/flutter_tool.RGHECU/app.dill --packages /home/sgehring/development/img_crash/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build/c075001b96339384a97db4862b8ab8db.cache.dill.track.dill --enable-experiment=alternative-invalidation-strategy [ +4 ms] executing: /home/sgehring/Android/Sdk/build-tools/32.0.0/aapt dump xmltree /home/sgehring/development/img_crash/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml [ +2 ms] Exit code 0 from: /home/sgehring/Android/Sdk/build-tools/32.0.0/aapt dump xmltree /home/sgehring/development/img_crash/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml [ ] N: android=http://schemas.android.com/apk/res/android E: manifest (line=2) A: android:versionCode(0x0101021b)=(type 0x10)0x1 A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0") A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1f A: android:compileSdkVersionCodename(0x01010573)="12" (Raw: "12") A: package="com.example.img_crash" (Raw: "com.example.img_crash") A: platformBuildVersionCode=(type 0x10)0x1f A: platformBuildVersionName=(type 0x10)0xc E: uses-sdk (line=7) A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1f E: uses-permission (line=15) A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET") E: application (line=17) A: android:label(0x01010001)="img_crash" (Raw: "img_crash") A: android:icon(0x01010002)=@0x7f080000 A: android:name(0x01010003)="android.app.Application" (Raw: "android.app.Application") A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory") E: activity (line=23) A: android:theme(0x01010000)=@0x7f0a0000 A: android:name(0x01010003)="com.example.img_crash.MainActivity" (Raw: "com.example.img_crash.MainActivity") A: android:exported(0x01010010)=(type 0x12)0xffffffff A: android:launchMode(0x0101001d)=(type 0x10)0x1 A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4 A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10 A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff E: meta-data (line=38) A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme") A: android:resource(0x01010025)=@0x7f0a0001 E: intent-filter (line=42) E: action (line=43) A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN") E: category (line=45) A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER") E: meta-data (line=52) A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding") A: android:value(0x01010024)=(type 0x10)0x2 E: uses-library (line=56) A: android:name(0x01010003)="androidx.window.extensions" (Raw: "androidx.window.extensions") A: android:required(0x0101028e)=(type 0x12)0x0 E: uses-library (line=59) A: android:name(0x01010003)="androidx.window.sidecar" (Raw: "androidx.window.sidecar") A: android:required(0x0101028e)=(type 0x12)0x0 [ +4 ms] executing: /home/sgehring/Android/Sdk/platform-tools/adb -s 802d5cf6 shell -x logcat -v time -t 1 [ +9 ms] <- compile package:img_crash/main.dart [ +115 ms] --------- beginning of main 07-11 18:12:29.456 E/libc ( 886): Access denied finding property "ro.hardware.fp.sideCap" [ +5 ms] executing: /home/sgehring/Android/Sdk/platform-tools/adb version [ +2 ms] Android Debug Bridge version 1.0.41 Version 31.0.3-7562133 Installed as /home/sgehring/Android/Sdk/platform-tools/adb [ +1 ms] executing: /home/sgehring/Android/Sdk/platform-tools/adb start-server [ +2 ms] Building APK [ +10 ms] Running Gradle task 'assembleDebug'... [ +1 ms] Using gradle from /home/sgehring/development/img_crash/android/gradlew. [ +11 ms] executing: /opt/android-studio/jre/bin/java -version [ +84 ms] Exit code 0 from: /opt/android-studio/jre/bin/java -version [ ] openjdk version "11.0.12" 2021-07-20 OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) OpenJDK 64-Bit Server VM (build 11.0.12+0-b1504.28-7817840, mixed mode) [ ] executing: /opt/android-studio/jre/bin/java -version [ +83 ms] Exit code 0 from: /opt/android-studio/jre/bin/java -version [ ] openjdk version "11.0.12" 2021-07-20 OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) OpenJDK 64-Bit Server VM (build 11.0.12+0-b1504.28-7817840, mixed mode) [ +1 ms] executing: [/home/sgehring/development/img_crash/android/] /home/sgehring/development/img_crash/android/gradlew -Pverbose=true -Ptarget-platform=android-arm64 -Ptarget=/home/sgehring/development/img_crash/lib/main.dart -Pbase-application-name=android.app.Application -Pdart-defines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ== -Pdart-obfuscation=false -Ptrack-widget-creation=true -Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleDebug [ +696 ms] > Task :app:preBuild UP-TO-DATE [ ] > Task :app:preDebugBuild UP-TO-DATE [ ] > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE [ +94 ms] > Task :app:compileFlutterBuildDebug UP-TO-DATE [ ] > Task :app:packLibsflutterBuildDebug UP-TO-DATE [ ] > Task :app:compileDebugAidl NO-SOURCE [ ] > Task :app:compileDebugRenderscript NO-SOURCE [ ] > Task :app:generateDebugBuildConfig UP-TO-DATE [ ] > Task :app:checkDebugAarMetadata UP-TO-DATE [ ] > Task :app:cleanMergeDebugAssets [ ] > Task :app:mergeDebugShaders UP-TO-DATE [ ] > Task :app:compileDebugShaders NO-SOURCE [ ] > Task :app:generateDebugAssets UP-TO-DATE [ ] > Task :app:mergeDebugAssets [ +198 ms] > Task :app:copyFlutterAssetsDebug [ ] > Task :app:generateDebugResValues UP-TO-DATE [ ] > Task :app:generateDebugResources UP-TO-DATE [ ] > Task :app:mergeDebugResources UP-TO-DATE [ ] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE [ ] > Task :app:extractDeepLinksDebug UP-TO-DATE [ ] > Task :app:processDebugMainManifest UP-TO-DATE [ ] > Task :app:processDebugManifest UP-TO-DATE [ ] > Task :app:processDebugManifestForPackage UP-TO-DATE [ ] > Task :app:processDebugResources UP-TO-DATE [ ] > Task :app:compileDebugKotlin UP-TO-DATE [ ] > Task :app:javaPreCompileDebug UP-TO-DATE [ ] > Task :app:compileDebugJavaWithJavac UP-TO-DATE [ ] > Task :app:processDebugJavaRes NO-SOURCE [ +98 ms] > Task :app:mergeDebugJavaResource UP-TO-DATE [ ] > Task :app:checkDebugDuplicateClasses UP-TO-DATE [ ] > Task :app:dexBuilderDebug UP-TO-DATE [ ] > Task :app:desugarDebugFileDependencies UP-TO-DATE [ ] > Task :app:mergeExtDexDebug UP-TO-DATE [ ] > Task :app:mergeDexDebug UP-TO-DATE [ ] > Task :app:mergeDebugJniLibFolders UP-TO-DATE [ ] > Task :app:mergeDebugNativeLibs UP-TO-DATE [ ] > Task :app:stripDebugDebugSymbols UP-TO-DATE [ ] > Task :app:validateSigningDebug UP-TO-DATE [ ] > Task :app:writeDebugAppMetadata UP-TO-DATE [ ] > Task :app:writeDebugSigningConfigVersions UP-TO-DATE [ +398 ms] > Task :app:compressDebugAssets [ ] Execution optimizations have been disabled for task ':app:compressDebugAssets' to ensure correctness due to the following reasons: [ ] - Gradle detected a problem with the following location: '/home/sgehring/development/img_crash/build/app/intermediates/assets/debug/mergeDebugAssets'. Reason: Task ':app:compressDebugAssets' uses this output of task ':app:copyFlutterAssetsDebug' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#implicit_dependency for more details about this problem. [ ] > Task :app:packageDebug UP-TO-DATE [ ] > Task :app:createDebugApkListingFileRedirect UP-TO-DATE [ +226 ms] > Task :app:assembleDebug [ ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. [ ] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. [ ] See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings [ ] Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness. [ ] Please consult deprecation warnings for more details. [ ] BUILD SUCCESSFUL in 1s [ ] 35 actionable tasks: 5 executed, 30 up-to-date [ +322 ms] Running Gradle task 'assembleDebug'... (completed in 2,220ms) [ +241 ms] calculateSha: LocalDirectory: '/home/sgehring/development/img_crash/build/app/outputs/flutter-apk'/app.apk [ +797 ms] ✓ Built build/app/outputs/flutter-apk/app-debug.apk. [ +1 ms] executing: /home/sgehring/Android/Sdk/build-tools/32.0.0/aapt dump xmltree /home/sgehring/development/img_crash/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml [ +4 ms] Exit code 0 from: /home/sgehring/Android/Sdk/build-tools/32.0.0/aapt dump xmltree /home/sgehring/development/img_crash/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml [ ] N: android=http://schemas.android.com/apk/res/android E: manifest (line=2) A: android:versionCode(0x0101021b)=(type 0x10)0x1 A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0") A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1f A: android:compileSdkVersionCodename(0x01010573)="12" (Raw: "12") A: package="com.example.img_crash" (Raw: "com.example.img_crash") A: platformBuildVersionCode=(type 0x10)0x1f A: platformBuildVersionName=(type 0x10)0xc E: uses-sdk (line=7) A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1f E: uses-permission (line=15) A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET") E: application (line=17) A: android:label(0x01010001)="img_crash" (Raw: "img_crash") A: android:icon(0x01010002)=@0x7f080000 A: android:name(0x01010003)="android.app.Application" (Raw: "android.app.Application") A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory") E: activity (line=23) A: android:theme(0x01010000)=@0x7f0a0000 A: android:name(0x01010003)="com.example.img_crash.MainActivity" (Raw: "com.example.img_crash.MainActivity") A: android:exported(0x01010010)=(type 0x12)0xffffffff A: android:launchMode(0x0101001d)=(type 0x10)0x1 A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4 A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10 A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff E: meta-data (line=38) A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme") A: android:resource(0x01010025)=@0x7f0a0001 E: intent-filter (line=42) E: action (line=43) A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN") E: category (line=45) A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER") E: meta-data (line=52) A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding") A: android:value(0x01010024)=(type 0x10)0x2 E: uses-library (line=56) A: android:name(0x01010003)="androidx.window.extensions" (Raw: "androidx.window.extensions") A: android:required(0x0101028e)=(type 0x12)0x0 E: uses-library (line=59) A: android:name(0x01010003)="androidx.window.sidecar" (Raw: "androidx.window.sidecar") A: android:required(0x0101028e)=(type 0x12)0x0 [ +1 ms] Stopping app 'app.apk' on POCOPHONE F1. [ ] executing: /home/sgehring/Android/Sdk/platform-tools/adb -s 802d5cf6 shell am force-stop com.example.img_crash [ +141 ms] executing: /home/sgehring/Android/Sdk/platform-tools/adb -s 802d5cf6 shell pm list packages com.example.img_crash [ +53 ms] package:com.example.img_crash [ +1 ms] executing: /home/sgehring/Android/Sdk/platform-tools/adb -s 802d5cf6 shell cat /data/local/tmp/sky.com.example.img_crash.sha1 [ +23 ms] 16d353da7378d840781083f4c42d771bb650501a [ ] Latest build already installed. [ ] executing: /home/sgehring/Android/Sdk/platform-tools/adb -s 802d5cf6 shell -x logcat -v time -t 1 [ +58 ms] --------- beginning of main 07-11 18:12:34.791 E/libc ( 886): Access denied finding property "ro.hardware.fp.sideCap" [ +5 ms] executing: /home/sgehring/Android/Sdk/platform-tools/adb -s 802d5cf6 shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true com.example.img_crash/com.example.img_crash.MainActivity [ +39 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.img_crash/.MainActivity (has extras) } [ ] Waiting for observatory port to be available... [ +304 ms] Observatory URL on device: http://127.0.0.1:37563/uysnDNSNtz0=/ [ ] executing: /home/sgehring/Android/Sdk/platform-tools/adb -s 802d5cf6 forward tcp:0 tcp:37563 [ +4 ms] 40351 [ ] Forwarded host port 40351 to device port 37563 for Observatory [ +3 ms] Caching compiled dill [ +93 ms] Connecting to service protocol: http://127.0.0.1:40351/uysnDNSNtz0=/ [ +188 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:40351/uysnDNSNtz0=/. [ +206 ms] DDS is listening at http://127.0.0.1:42901/urd1gqU3ucg=/. [ +38 ms] Successfully connected to service protocol: http://127.0.0.1:40351/uysnDNSNtz0=/ [ +55 ms] DevFS: Creating new filesystem on the device (null) [ +66 ms] DevFS: Created new filesystem on the device (file:///data/user/0/com.example.img_crash/code_cache/img_crashSIMNBV/img_crash/) [ +1 ms] Updating assets [ +45 ms] Syncing files to device POCOPHONE F1... [ ] <- reset [ ] Compiling dart to kernel with 0 updated files [ ] Processing bundle. [ ] <- recompile package:img_crash/main.dart 484060f0-4e1a-4bec-89d8-53221a5adbf7 [ ] <- 484060f0-4e1a-4bec-89d8-53221a5adbf7 [ ] Bundle processing done. [ +45 ms] Updating files. [ ] DevFS: Sync finished [ ] Syncing files to device POCOPHONE F1... (completed in 48ms) [ ] Synced 0.0MB. [ +1 ms] <- accept [ +2 ms] Connected to _flutterView/0x75873e5620. [ +1 ms] Flutter run key commands. [ ] r Hot reload. 🔥🔥🔥 [ ] R Hot restart. [ ] h List all available interactive commands. [ ] d Detach (terminate "flutter run" but leave application running). [ ] c Clear the screen [ ] q Quit (terminate the application on the device). [ ] 💪 Running with sound null safety 💪 [ ] An Observatory debugger and profiler on POCOPHONE F1 is available at: http://127.0.0.1:42901/urd1gqU3ucg=/ [ +342 ms] D/skia (28012): libjpeg error 68Why is this an issue? We use
Image
for displaying (M)JPEG streams fetched from cameras. Due to network issues or encoding errors in cheap devices, the app sometimes receives invalid JPEG frames that we would like to discard safely.Thank you for maintaining Flutter. I searched for this in the open issues but could not find anything that looks like the same issue.