-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolec: fatal crashCrashes that terminate the processCrashes that terminate the processcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.e: OS-version specificAffects only some versions of the relevant operating systemAffects only some versions of the relevant operating systemfound in release: 3.1Found to occur in 3.1Found to occur in 3.1has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specifically
Description
Steps to Reproduce
- Bump compileSdkVersion & targetSdkVersion to 33
- Run
cameraplugin example app on a device or emulator with Android 13 - Get a crash when initializing camera (as soon as Camera permissions are accepted)
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.media.EncoderProfiles$VideoProfile.getWidth()' on a null object reference
Reproducible with the plugin example app, here is a fork of the plugin repository with a single commit, that just bumps compileSdkVersion & targetSdkVersion to 33
Expected results:
No crash & camera preview
Actual results:
Crash
Code sample
Reproducible with the plugin example app, here is a fork of the plugin repository with a single commit, that just bumps compileSdkVersion & targetSdkVersion to 33
https://github.com/shliama/plugins/commit/b9fa432b7c60cb021c28002673d55838d6377506
Logs
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
Debug service listening on ws://127.0.0.1:50570/QMiwEXsdw3Y=/ws
Syncing files to device Pixel 4a 5G...
E/SurfaceSyncer( 7292): Failed to find sync for id=0
W/Parcel ( 7292): Expecting binder but got null!
D/CompatibilityChangeReporter( 7292): Compat change id reported: 78294732; UID 10048; state: ENABLED
D/CompatibilityChangeReporter( 7292): Compat change id reported: 206033068; UID 10048; state: ENABLED
D/AndroidRuntime( 7292): Shutting down VM
E/AndroidRuntime( 7292): FATAL EXCEPTION: main
E/AndroidRuntime( 7292): Process: io.flutter.plugins.cameraexample, PID: 7292
E/AndroidRuntime( 7292): java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=9796, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {io.flutter.plugins.cameraexample/io.flutter.embedding.android.FlutterActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.media.EncoderProfiles$VideoProfile.getWidth()' on a null object reference
E/AndroidRuntime( 7292): at android.app.ActivityThread.deliverResults(ActivityThread.java:5347)
E/AndroidRuntime( 7292): at android.app.ActivityThread.handleSendResult(ActivityThread.java:5386)
E/AndroidRuntime( 7292): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
E/AndroidRuntime( 7292): at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
E/AndroidRuntime( 7292): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime( 7292): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime( 7292): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
E/AndroidRuntime( 7292): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 7292): at android.os.Looper.loopOnce(Looper.java:201)
E/AndroidRuntime( 7292): at android.os.Looper.loop(Looper.java:288)
E/AndroidRuntime( 7292): at android.app.ActivityThread.main(ActivityThread.java:7898)
E/AndroidRuntime( 7292): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 7292): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/AndroidRuntime( 7292): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
E/AndroidRuntime( 7292): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.media.EncoderProfiles$VideoProfile.getWidth()' on a null object reference
E/AndroidRuntime( 7292): at io.flutter.plugins.camera.features.resolution.ResolutionFeature.configureResolution(ResolutionFeature.java:244)
E/AndroidRuntime( 7292): at io.flutter.plugins.camera.features.resolution.ResolutionFeature.<init>(ResolutionFeature.java:50)
E/AndroidRuntime( 7292): at io.flutter.plugins.camera.features.CameraFeatureFactoryImpl.createResolutionFeature(CameraFeatureFactoryImpl.java:58)
E/AndroidRuntime( 7292): at io.flutter.plugins.camera.features.CameraFeatures.init(CameraFeatures.java:71)
E/AndroidRuntime( 7292): at io.flutter.plugins.camera.Camera.<init>(Camera.java:217)
E/AndroidRuntime( 7292): at io.flutter.plugins.camera.MethodCallHandlerImpl.instantiateCamera(MethodCallHandlerImpl.java:386)
E/AndroidRuntime( 7292): at io.flutter.plugins.camera.MethodCallHandlerImpl.lambda$onMethodCall$0$MethodCallHandlerImpl(MethodCallHandlerImpl.java:81)
E/AndroidRuntime( 7292): at io.flutter.plugins.camera.-$$Lambda$MethodCallHandlerImpl$OMU5dV7VCKXKBT37_ThIybqlHuo.onResult(Unknown Source:6)
E/AndroidRuntime( 7292): at io.flutter.plugins.camera.CameraPermissions.lambda$requestPermissions$0$CameraPermissions(CameraPermissions.java:58)
E/AndroidRuntime( 7292): at io.flutter.plugins.camera.-$$Lambda$CameraPermissions$5yqyw-OpZZu-E824jQ34RA2nmFk.onResult(Unknown Source:4)
E/AndroidRuntime( 7292): at io.flutter.plugins.camera.CameraPermissions$CameraRequestPermissionsListener.onRequestPermissionsResult(CameraPermissions.java:113)
E/AndroidRuntime( 7292): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onRequestPermissionsResult(FlutterEngineConnectionRegistry.java:777)
E/AndroidRuntime( 7292): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onRequestPermissionsResult(FlutterEngineConnectionRegistry.java:409)
E/AndroidRuntime( 7292): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onRequestPermissionsResult(FlutterActivityAndFragmentDelegate.java:752)
E/AndroidRuntime( 7292): at io.flutter.embedding.android.FlutterActivity.onRequestPermissionsResult(FlutterActivity.java:748)
E/AndroidRuntime( 7292): at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:8759)
E/AndroidRuntime( 7292): at android.app.Activity.dispatchActivityResult(Activity.java:8617)
E/AndroidRuntime( 7292): at android.app.ActivityThread.deliverResults(ActivityThread.java:5340)
E/AndroidRuntime( 7292): ... 13 more
I/Process ( 7292): Sending signal. PID: 7292 SIG: 9
Lost connection to device.
HE-LU, acoutts, PerLycke, SunlightBro, matthewrice345 and 131 morefauzipadlaw, gabotechs, HE-LU, gatherKnowledge, BAndonovski and 15 morefauzipadlaw, gabotechs, LuisMiguelSS, HE-LU, LucioBevilacqua and 18 more
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolec: fatal crashCrashes that terminate the processCrashes that terminate the processcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.e: OS-version specificAffects only some versions of the relevant operating systemAffects only some versions of the relevant operating systemfound in release: 3.1Found to occur in 3.1Found to occur in 3.1has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specifically