Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.io.InterruptedIOException: read interrupted #24

Open
VitaliBov opened this issue Jan 5, 2024 · 8 comments
Open

java.io.InterruptedIOException: read interrupted #24

VitaliBov opened this issue Jan 5, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@VitaliBov
Copy link

Hey, @Goddchen
Thanks for the useful plugin 🤝

I found a bug that is relevant in example. Playback steps:

  1. Open the latest (0.1.2) version of example on Android
  2. After loading the app press the system back button

Actual result:
InterruptedIOException exception is output to the log

Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Upgrading build.gradle
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:65014/1QTt2iZdrm8=/ws
3
I/flutter (18000): Test periodic print
D/EGL_emulation(18000): app_time_stats: avg=2832.25ms min=2741.55ms max=2922.95ms count=2
I/flutter (18000): Test periodic print
D/EGL_emulation(18000): app_time_stats: avg=1496.17ms min=23.39ms max=2968.96ms count=2
I/flutter (18000): Test periodic print
D/EGL_emulation(18000): app_time_stats: avg=1510.69ms min=28.57ms max=2992.82ms count=2
D/EGL_emulation(18000): app_time_stats: avg=717.46ms min=23.56ms max=1411.36ms count=2
E/AndroidRuntime(18000): FATAL EXCEPTION: Thread-4
E/AndroidRuntime(18000): Process: de.goddchen.flutter.flutter_native_logs_example, PID: 18000
E/AndroidRuntime(18000): java.io.InterruptedIOException: read interrupted
E/AndroidRuntime(18000): 	at libcore.io.Linux.readBytes(Native Method)
E/AndroidRuntime(18000): 	at libcore.io.Linux.read(Linux.java:190)
E/AndroidRuntime(18000): 	at libcore.io.ForwardingOs.read(ForwardingOs.java:613)
E/AndroidRuntime(18000): 	at libcore.io.BlockGuardOs.read(BlockGuardOs.java:325)
E/AndroidRuntime(18000): 	at libcore.io.ForwardingOs.read(ForwardingOs.java:613)
E/AndroidRuntime(18000): 	at libcore.io.IoBridge.read(IoBridge.java:604)
E/AndroidRuntime(18000): 	at java.io.FileInputStream.read(FileInputStream.java:328)
E/AndroidRuntime(18000): 	at java.io.BufferedInputStream.read1(BufferedInputStream.java:277)
E/AndroidRuntime(18000): 	at java.io.BufferedInputStream.read(BufferedInputStream.java:338)
E/AndroidRuntime(18000): 	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:291)
E/AndroidRuntime(18000): 	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:355)
E/AndroidRuntime(18000): 	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:181)
E/AndroidRuntime(18000): 	at java.io.InputStreamReader.read(InputStreamReader.java:180)
E/AndroidRuntime(18000): 	at java.io.BufferedReader.fill(BufferedReader.java:172)
E/AndroidRuntime(18000): 	at java.io.BufferedReader.readLine(BufferedReader.java:337)
E/AndroidRuntime(18000): 	at java.io.BufferedReader.readLine(BufferedReader.java:403)
E/AndroidRuntime(18000): 	at kotlin.io.LinesSequence$iterator$1.hasNext(ReadWrite.kt:80)
E/AndroidRuntime(18000): 	at de.goddchen.flutter.flutter_native_logs.FlutterNativeLogsPlugin$onAttachedToEngine$1.invoke(FlutterNativeLogsPlugin.kt:78)
E/AndroidRuntime(18000): 	at de.goddchen.flutter.flutter_native_logs.FlutterNativeLogsPlugin$onAttachedToEngine$1.invoke(FlutterNativeLogsPlugin.kt:32)
E/AndroidRuntime(18000): 	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
I/Process (18000): Sending signal. PID: 18000 SIG: 9
Lost connection to device.

Exited.

I hope you fix this quickly, thank you.

Could you also add a link to the repository in pub.dev? This would help to get to the repository and issues faster.

Example

Screenshot 2024-01-05 at 14 09 25

@Goddchen Goddchen self-assigned this Jan 5, 2024
@Goddchen Goddchen added the bug Something isn't working label Jan 5, 2024
@Goddchen
Copy link
Owner

Goddchen commented Jan 5, 2024

Thanks for reporting this. Will check it out as soon as I find the time.

Good point with the repo link on pub.dev. How could I miss that...? 🤷‍♂️

@Goddchen
Copy link
Owner

Goddchen commented Jan 5, 2024

I'm really sorry, but I am not able to reproduce this. Maybe it only occurs on a specific device model or Android version? Which did you try?

@VitaliBov
Copy link
Author

I'm using the Android 14 emulator

Example Screenshot 2024-01-06 at 13 16 44

@Goddchen
Copy link
Owner

Goddchen commented Jan 6, 2024

Just gave an API 34 emulator a try, still can't reproduce :/

You are simply starting the example app and exiting via back gesture, right?

@VitaliBov
Copy link
Author

Yeah, here's the video

Video
Untitled.mov

@Goddchen
Copy link
Owner

Goddchen commented Jan 8, 2024

I can clearly see it. But still cannot reproduce it 😢 I think you'll have to debug this one on your own.

@VitaliBov
Copy link
Author

Okay, I'll try to fix it

@ligaevelinachi
Copy link

ligaevelinachi commented Jun 11, 2024

I have also encountered this crash. Steps to reproduce this in my case are:

  1. Launch app
  2. Put app in background
  3. Change system navigation mode (does not matter which way)
  4. Resume app

This bug can be reproduced on all Android 12+ devices, (specific versions or manufacturers do not matter) by following these steps.
I was also able to reproduce this issue on a physical Pixel 6a, API 34, Android version 14.

2024-06-11 14:17:34.672  1983-2006  WindowManagerShell      com.android.systemui                 V  Transition requested (#736): android.os.BinderProxy@c62635f TransitionRequestInfo { type = TO_FRONT, triggerTask = TaskInfo{userId=0 taskId=992 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x30000000 cmp=com.project.app/com.example.project.MainActivity } baseActivity=ComponentInfo{com.project.app/com.example.project.MainActivity} topActivity=ComponentInfo{com.project.app/com.example.project.MainActivity} origActivity=null realActivity=ComponentInfo{com.project.app/com.example.project.MainActivity} numActivities=1 lastActiveTime=617251235 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@aa571ac} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 132 - 0, 0) topActivityInfo=ActivityInfo{81bfe75 com.example.project.MainActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=false isVisible=false isVisibleRequested=false isSleeping=false locusId=null displayAreaFeatureId=1 isTopActivityTransparent=false appCompatTaskInfo=AppCompatTaskInfo { topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false isLetterboxDoubleTapEnabled= false topActivityEligibleForUserAspectRatioButton= false topActivityBoundsLetterboxed= false isFromLetterboxDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 isUserFullscreenOverrideEnabled=false cameraCompatControlState=hidden}}, pipTask = null, remoteTransition = RemoteTransition { remoteTransition = android.window.IRemoteTransition$Stub$Proxy@ef12e0a, appThread = android.app.IApplicationThread$Stub$Proxy@e73d67b, debugName = QuickstepLaunch }, displayChange = null, flags = 0, debugId = 736 }
2024-06-11 14:17:34.672  1983-2006  WindowManagerShell      com.android.systemui                 D  onActivityRestartAttempt: ComponentInfo{com.project.app/com.example.project.MainActivity}
2024-06-11 14:17:34.689 14008-14008 VRI[MainActivity]       com.project.app                D  applyTransactionOnDraw applyImmediately
2024-06-11 14:17:34.689 14008-14008 VRI[MainActivity]       com.project.app                D  applyTransactionOnDraw applyImmediately
2024-06-11 14:17:34.700 14008-14130 AndroidRuntime          com.project.app                E  FATAL EXCEPTION: Thread-4 (Ask Gemini)
            Process: com.project.app, PID: 14008
            java.io.InterruptedIOException: read interrupted
            at libcore.io.Linux.readBytes(Native Method)
            at libcore.io.Linux.read(Linux.java:190)
            at libcore.io.ForwardingOs.read(ForwardingOs.java:613)
            at libcore.io.BlockGuardOs.read(BlockGuardOs.java:325)
            at libcore.io.ForwardingOs.read(ForwardingOs.java:613)
            at libcore.io.IoBridge.read(IoBridge.java:604)
            at java.io.FileInputStream.read(FileInputStream.java:328)
            at java.io.BufferedInputStream.read1(BufferedInputStream.java:277)
            at java.io.BufferedInputStream.read(BufferedInputStream.java:338)
            at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:291)
            at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:355)
            at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:181)
            at java.io.InputStreamReader.read(InputStreamReader.java:180)
            at java.io.BufferedReader.fill(BufferedReader.java:172)
            at java.io.BufferedReader.readLine(BufferedReader.java:337)
            at java.io.BufferedReader.readLine(BufferedReader.java:403)
            at kotlin.io.LinesSequence$iterator$1.hasNext(ReadWrite.kt:79)
            at de.goddchen.flutter.flutter_native_logs.FlutterNativeLogsPlugin$onAttachedToEngine$1.invoke(FlutterNativeLogsPlugin.kt:78)
            at de.goddchen.flutter.flutter_native_logs.FlutterNativeLogsPlugin$onAttachedToEngine$1.invoke(FlutterNativeLogsPlugin.kt:32)
            at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
2024-06-11 14:17:34.728 14008-14184 Sensors                 com.project.app                W  Cannot get virtualdevice_native service
2024-06-11 14:17:34.736 14008-14008 WindowOnBackDispatcher  com.project.app                W  sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@b185f7c
2024-06-11 14:17:34.737  1567-2176  CoreBackPreview         system_server                        D  Window{63a4697 u0 com.project.app/com.example.project.MainActivity}: Setting back callback null
2024-06-11 14:17:34.738  1567-2176  InputManager-JNI        system_server                        W  Input channel object '63a4697 com.project.app/com.example.project.MainActivity (client)' was disposed without first being removed with the input manager!
2024-06-11 14:17:34.820 14008-14008 ContentCaptureHelper    com.project.app                I  Setting logging level to OFF
2024-06-11 14:17:34.824 14008-14182 SessionLifecycleClient  com.project.app                D  Sending lifecycle 1 to service
2024-06-11 14:17:34.824 14008-14186 SessionLifecycleService com.project.app                D  Activity foregrounding at 109579977.
2024-06-11 14:17:34.824 14008-14186 SessionLifecycleService com.project.app                D  Cold start detected.
2024-06-11 14:17:34.828 14008-14186 SessionLifecycleService com.project.app                D  Generated new session aa2d1762007a456bb41e7d976499087e
2024-06-11 14:17:34.829 14008-14186 SessionLifecycleService com.project.app                D  Broadcasting new session: SessionDetails(sessionId=aa2d1762007a456bb41e7d976499087e, firstSessionId=aa2d1762007a456bb41e7d976499087e, sessionIndex=0, sessionStartTimestampUs=1718104654827000)
2024-06-11 14:17:34.834 14008-14187 SessionFirelogPublisher com.project.app                D  Data Collection is enabled for at least one Subscriber
2024-06-11 14:17:34.845  1567-5049  CoreBackPreview         system_server                        D  Window{39af87a u0 com.project.app/com.example.project.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@5a16e21, mPriority=0, mIsAnimationCallback=false}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants