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

NPE in SAFHelper.listFilesFast #18

Closed
K1rakishou opened this issue Jun 3, 2020 · 3 comments
Closed

NPE in SAFHelper.listFilesFast #18

K1rakishou opened this issue Jun 3, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@K1rakishou
Copy link
Owner

java.lang.NullPointerException: Attempt to get length of null array
	at android.os.Parcel.createException(Parcel.java:1956)
	at android.os.Parcel.readException(Parcel.java:1918)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
	at android.content.ContentProviderProxy.query(ContentProviderNative.java:418)
	at android.content.ContentResolver.query(ContentResolver.java:803)
	at android.content.ContentResolver.query(ContentResolver.java:753)
	at android.content.ContentResolver.query(ContentResolver.java:711)
	at com.github.k1rakishou.fsaf.util.SAFHelper.listFilesFast(SAFHelper.kt:273)
	at com.github.k1rakishou.fsaf.manager.ExternalFileManager.listFiles(ExternalFileManager.kt:391)
	at com.github.k1rakishou.fsaf.FileManager.listFiles(FileManager.kt:678)
	at com.github.k1rakishou.fsaf.FileManager.traverseDirectory(FileManager.kt:532)
	at com.github.adamantcheese.chan.core.presenter.MediaSettingsControllerPresenter.moveOldFilesToTheNewDirectory(MediaSettingsControllerPresenter.kt:202)
	at com.github.adamantcheese.chan.ui.controller.settings.MediaSettingsController.lambda$askUserIfTheyWantToMoveOldSavedFilesToTheNewDirectory$16$MediaSettingsController(MediaSettingsController.java:522)
	at com.github.adamantcheese.chan.ui.controller.settings.-$$Lambda$MediaSettingsController$2MMLoOIwXgP7VNEqTFosMIebQN8.onClick(Unknown Source:6)
	at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:172)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6718)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
@K1rakishou
Copy link
Owner Author

Haven't seen this crash since the latest release (which was 5 months ago), I guess the problem was in missing synchronization.

@virtualC9
Copy link

Have you solved this problem? What is the reason. thank you

@K1rakishou
Copy link
Owner Author

I haven't seen this crash since June (in my app where this library is used) and the last thing I did was synchronizing all public methods, so I guess that was the problem.

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

2 participants