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

The app throws NullPointerException and crashes when clicking "import from Archive" #878

Closed
androidAppGuard opened this issue May 13, 2022 · 1 comment

Comments

@androidAppGuard
Copy link

the environment is as follows:

App version: v5.2.2
Android version: 6.0
Device: Nexux_5X

The steps to reproduce:
12_BookCatalogue_IllegalStateException.gif
The exception log is as follows:

05-13 04:43:22.294 8181-8512/com.eleybourn.bookcatalogue E/BC Logger: An Exception Occured @ 2022-05-13 04:43:22
    In Phone Android SDK built for x86_64 (23) 
    Error running task
    java.lang.NullPointerException: Attempt to invoke interface method 'com.eleybourn.bookcatalogue.backup.ReaderEntity$BackupEntityType com.eleybourn.bookcatalogue.backup.ReaderEntity.getType()' on a null object reference
        at com.eleybourn.bookcatalogue.backup.tar.TarBackupReader.<init>(TarBackupReader.java:65)
        at com.eleybourn.bookcatalogue.backup.tar.TarBackupContainer.isValid(TarBackupContainer.java:107)
        at com.eleybourn.bookcatalogue.backup.BackupManager.readBackup(BackupManager.java:64)
        at com.eleybourn.bookcatalogue.filechooser.BackupLister.processList(BackupLister.java:62)
        at com.eleybourn.bookcatalogue.filechooser.FileLister.run(FileLister.java:53)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueueProgressFragment$FragmentTaskWrapper.run(SimpleTaskQueueProgressFragment.java:275)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueue.handleRequest(SimpleTaskQueue.java:364)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueue.access$800(SimpleTaskQueue.java:56)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueue$SimpleTaskQueueThread.run(SimpleTaskQueue.java:500)
05-13 04:43:22.327 8181-8199/com.eleybourn.bookcatalogue D/EGL_emulation: eglMakeCurrent: 0x7f1d32f8c7c0: ver 2 0 (tinfo 0x7f1d34785f40)
05-13 04:43:22.331 8181-8181/com.eleybourn.bookcatalogue E/BC Logger: An Exception Occured @ 2022-05-13 04:43:22
    In Phone Android SDK built for x86_64 (23) 
    
    java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
        at android.widget.ArrayAdapter.getCount(ArrayAdapter.java:337)
        at android.widget.ListView.setAdapter(ListView.java:491)
        at com.eleybourn.bookcatalogue.filechooser.FileChooserFragment.onGotFileList(FileChooserFragment.java:243)
        at com.eleybourn.bookcatalogue.filechooser.FileChooser.onGotFileList(FileChooser.java:199)
        at com.eleybourn.bookcatalogue.filechooser.FileLister.onFinish(FileLister.java:63)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueueProgressFragment$TaskFinishedMessage.deliver(SimpleTaskQueueProgressFragment.java:119)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueueProgressFragment.deliverMessages(SimpleTaskQueueProgressFragment.java:194)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueueProgressFragment.queueMessage(SimpleTaskQueueProgressFragment.java:161)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueueProgressFragment.queueTaskFinished(SimpleTaskQueueProgressFragment.java:168)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueueProgressFragment.access$300(SimpleTaskQueueProgressFragment.java:47)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueueProgressFragment$FragmentTaskWrapper.onFinish(SimpleTaskQueueProgressFragment.java:284)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueue.processResults(SimpleTaskQueue.java:431)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueue.access$300(SimpleTaskQueue.java:56)
        at com.eleybourn.bookcatalogue.utils.SimpleTaskQueue$1.run(SimpleTaskQueue.java:341)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5417)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
@xzz-x
Copy link

xzz-x commented Jun 19, 2022

Well, I reproduce these events in the picture and the app throws NullPointException because the hierarchy of the list components is not maintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants