Menu

#14 Crash when selecting "Open file..." on versions 8.3 and higher

2.0
closed
cb4960
Crash (1)
2022-03-18
2022-03-13
Arcadius B.
No

Hi! I've been using your app on and off since 2016 or so. It's very useful for me. However, today I updated the app to the newest version (9.6) and there seems to be an issue with the app crashing when a file browser should be presented. I tried installing previous versions and the latest version where no crashing occurs is 8.2.

What I'm doing step-by-step:

  1. Install the app (version 8.3 or 9.6).
  2. Open it.
  3. Tap on the logo.
  4. Tap on "Open file...".
  5. The app closes and the OS presents a dialog box saying: "Unfortunately, OCR Manga Reader has stopped".

Some info about my device:

  • Model number: Lenovo TAB S8-50F
  • Architecture: x86_64 (I'm using the 32-bit version of the app since the 64-bit one fails to install)
  • Android version: 5.0.1
  • No SD card present, only internal memory
  • Plenty of free space (4.7 GB)

Discussion

  • cb4960

    cb4960 - 2022-03-13

    Thanks. Not sure what the exact cause of the crash is, but narrowing it down to version 8.3 certainly helps.

    You have probably already tried, but sometimes completely uninstalling and then reinstalling the app helps.

    If you know how to get a logcat of the exception, feel free to attached it. If not, no worries, it is kind of involved and probably not worth your time to learn.

    In the next future version I will place some exception handlers around the areas of code that the exception likely occurs, which may prevent the crash.

     
  • cb4960

    cb4960 - 2022-03-13
    • labels: --> Crash
    • assigned_to: cb4960
     
  • Arcadius B.

    Arcadius B. - 2022-03-17

    Hi. Yes, I did try to reinstall the app.

    I have some experience with adb, so fortunately using adb logcat wasn't too complicated. Here's the part I think is relevant (see attached text file for more):

    03-17 12:05:07.901   200   216 D VoldCmdListener: VolumeCmd::runCommand argv[1]  = mkdirs,argc = 3,argv[2] = /storage/sdcard1/Android/data/com.cb4960.ocrmr/files/, argv[3] = (null)
    03-17 12:05:07.901   200   216 E Vold    : Failed to find mounted volume for /storage/sdcard1/Android/data/com.cb4960.ocrmr/files/
    03-17 12:05:07.901   200   216 W Vold    : Returning OperationFailed - no handler for errno 0
    03-17 12:05:07.901  5753  5753 W ContextImpl: Failed to ensure directory: /storage/sdcard1/Android/data/com.cb4960.ocrmr/files
    03-17 12:05:07.901   508   552 V WindowStateAnimator: computeShownFrameLocked: WindowStateAnimator{3e7f1fb4 com.android.systemui.ImageWallpaperLockScreen} not attached, mAlpha=1.0
    03-17 12:05:07.901   508   552 V WindowStateAnimator: computeShownFrameLocked: WindowStateAnimator{dcfb178 com.android.systemui.ImageWallpaper} not attached, mAlpha=1.0
    03-17 12:05:07.901   508   552 V WindowStateAnimator: computeShownFrameLocked: Animating WindowStateAnimator{879a4d1 com.cb4960.ocrmr/net.robotmedia.acv.ui.ComicViewerActivity} mAlpha=1.0 self=null attached=null app=1.0 screen=null
    03-17 12:05:07.911  5753  5753 D AndroidRuntime: Shutting down VM
    03-17 12:05:07.911   508   552 V SurfaceTrace: setAlpha(0.17561603): OLD:Surface 28324f27 PopupWindow:3c8d15fa (0): shown=true layer=21030 alpha=0.4868242 -64.0,-64.0 520x616 crop=[0,0][520,616] opaque=false (1.0,0.0,0.0,1.0). Called by com.android.server.wm.WindowStateAnimator.prepareSurfaceLocked:1504 com.android.server.wm.WindowAnimator.animateLocked:601 com.android.server.wm.WindowAnimator.access$000:52
    03-17 12:05:07.911   508   552 V WindowStateAnimator: computeShownFrameLocked: WindowStateAnimator{3f58c743 StatusBar} not attached, mAlpha=1.0
    03-17 12:05:07.911   508   552 V WindowStateAnimator: computeShownFrameLocked: WindowStateAnimator{bb6949f NavigationBar} not attached, mAlpha=1.0
    03-17 12:05:07.911  5753  5753 E AndroidRuntime: FATAL EXCEPTION: main
    03-17 12:05:07.911  5753  5753 E AndroidRuntime: Process: com.cb4960.ocrmr, PID: 5753
    03-17 12:05:07.911  5753  5753 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cb4960.ocrmr/net.robotmedia.acv.ui.SDBrowserActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at android.app.ActivityThread.access$800(ActivityThread.java:144)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:135)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:5249)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Method.java:372)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at net.robotmedia.acv.utils.FileUtil.getRemovableStorageDir(FileUtil.java:186)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at net.robotmedia.acv.ui.SDBrowserActivity.onCreate(SDBrowserActivity.java:87)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:5933)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
    03-17 12:05:07.911  5753  5753 E AndroidRuntime:        ... 10 more
    03-17 12:05:07.911   508  1014 V WindowManager: Clear freezing of Token{2c37fc1f ActivityRecord{176593be u0 com.cb4960.ocrmr/net.robotmedia.acv.ui.SDBrowserActivity t22}}: hidden=true freezing=false
    03-17 12:05:07.911   508  1014 V WindowManager: Clear freezing of Token{2cc59f1 ActivityRecord{3ad05d98 u0 com.cb4960.ocrmr/net.robotmedia.acv.ui.ComicViewerActivity t22}}: hidden=false freezing=false
    03-17 12:05:07.911   508  1014 W ActivityManager:   Force finishing activity com.cb4960.ocrmr/net.robotmedia.acv.ui.SDBrowserActivity
    

    This was captured on version 8.3 while tapping "Open file...".

     
  • cb4960

    cb4960 - 2022-03-17

    Perfect, thanks! The issue is now fixed in version 9.7. Please let me know if you encounter any more difficulties.

     
  • Arcadius B.

    Arcadius B. - 2022-03-18

    I can confirm that the crash is fixed for me in version 9.7. Thank you as well! :)

     
  • cb4960

    cb4960 - 2022-03-18
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB