FishBun
FishBun copied to clipboard
[BUG] handleWindowVisibility: no activity for token android.os.BinderProxy@22067a8 When no albumn
Describe the bug Cannot click to capture image/open camera When No Ablumn Found
W/ActivityThread(13055): handleWindowVisibility: no activity for token android.os.BinderProxy@22067a8 E/RecyclerView(13055): No adapter attached; skipping layout D/EGL_emulation(13055): eglMakeCurrent: 0xe32055a0: ver 3 0 (tinfo 0xe32037c0) W/System.err(13055): java.io.IOException: No such file or directory W/System.err(13055): at java.io.UnixFileSystem.createFileExclusively0(Native Method) W/System.err(13055): at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:281) W/System.err(13055): at java.io.File.createTempFile(File.java:2018) W/System.err(13055): at com.sangcomz.fishbun.util.CameraUtil.createImageFile(CameraUtil.java:58) W/System.err(13055): at com.sangcomz.fishbun.util.CameraUtil.takePicture(CameraUtil.java:31) W/System.err(13055): at com.sangcomz.fishbun.ui.album.AlbumController.takePicture(AlbumController.java:132) W/System.err(13055): at com.sangcomz.fishbun.ui.album.AlbumActivity$1.onClick(AlbumActivity.java:96) W/System.err(13055): at android.view.View.performClick(View.java:6597) W/System.err(13055): at android.view.View.performClickInternal(View.java:6574) W/System.err(13055): at android.view.View.access$3100(View.java:778) W/System.err(13055): at android.view.View$PerformClick.run(View.java:25885) W/System.err(13055): at android.os.Handler.handleCallback(Handler.java:873) W/System.err(13055): at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err(13055): at android.os.Looper.loop(Looper.java:193) W/System.err(13055): at android.app.ActivityThread.main(ActivityThread.java:6669) W/System.err(13055): at java.lang.reflect.Method.invoke(Native Method) W/System.err(13055): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) W/System.err(13055): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
To Reproduce Steps to reproduce the behavior:
- Click on the pick image button
- Open picker screen (No Album), return message: There is no albumn. Take A Picture!
- Click on "Take A Picture!" button
- Return Error exception in the console as BUG description above
Expected behavior It is expected to open Camera and take a photo.
Screenshots

Additional context
<!-- run `flutter doctor` and paste the output here: -->
[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Mac OS X 10.14.6 18G95, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 10.3) [✓] iOS tools - develop for iOS devices [✓] Android Studio (version 3.5) [✓] VS Code (version 1.37.1) [✓] Connected device (4 available)
• No issues found!
I found a similar issue when I tried to reproduce this issue. Context is always null in onCreatView function of SubFragment class. Thus NPE always is occurred.
The step to reproduce is
- Run the application in an emulator.
- Click on Fragment in startActivityForResult
- Then you can see the error reported