Nextcloud app is constantly crashing. The pop-ups telling me that Nextcloud crashed come up every ~2 seconds.
Now, most things I do on my phone take more than two seconds, so this is highly annoying.
Also the fact that it does not auto upload for some reason.
I can't even deactivate auto uploads within two seconds before it crashes again.
Copying this within two seconds was tricky:
************ CAUSE OF ERROR ************
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.owncloud.android.lib.common.operations.RemoteOperationResult.isCancelled()' on a null object reference
at com.owncloud.android.datamodel.UploadsStorageManager.updateDatabaseUploadResult(UploadsStorageManager.java:527)
at com.owncloud.android.files.services.FileUploader.uploadFile(FileUploader.java:630)
at com.owncloud.android.files.services.FileUploader$ServiceHandler.handleMessage(FileUploader.java:1347)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
************ APP INFORMATION ************
ID: com.nextcloud.client
Version: 30120151
Build flavor: generic
************ DEVICE INFORMATION ************
Brand: Android
Device: sargo
Model: Pixel 3a
Id: QQ3A.200605.002
Product: calyx_sargo
************ FIRMWARE ************
SDK: 29
Release: 10
Incremental: 2020.06.03.12
Couldn't find an existing issue for this.
After more than sixty tries I managed to turn off automatic upload, now it is now loger crashing... for now.
Now I can at least watch a youtube video or dial a phone number without interruptions. :joy:
Oh dear... 0_o
@tobiasKaminsky while I can't say why this might happen I think the client should handle this in a less crashing way 😁 So we might rather have to
Does not Android show a "never show again" option when an app frequently crashes? (or just allows not to restart the app?)
@rugk Nope. :/
edit: Older Android versions apparently had that, I do not have the option.
Linter shows that the logic can leave uploadResult instance uninitialized, which would cause this NPE.
Hm.
I do not see the reason :/
RemoteOperationResult uploadResult;
try {
…
…
uploadResult = mCurrentUpload.execute(mUploadClient, mStorageManager);
} catch (Exception e) {
…
uploadResult = new RemoteOperationResult(e);
} finally {
…
mUploadsStorageManager.updateDatabaseUploadResult(uploadResult, mCurrentUpload); --> might be null
}
But why?
If anything in try block fails, it will go first to catch and then finally…?
well… ,maybe if it does not fail and thus does not go into the catch block :wink: / or fail earlier
@ezaquarii do you have an idae?
Hm. I do not see the reason :/
If anything in try block fails, it will go first to catch and then finally…?
@tobiasKaminsky It catches Exception, which is a subclass of Throwable. The other Throwable we can potentially have here is something from Error hierarchy and that would not be caught.
Hard to say what could go wrong, exactly. I'd change it to Throwable.
Sorry, I accidentally edited your comment instead of quote-replying. I hope I restored it accurately. Why do I even have this superpower?
@tobiasKaminsky One more area of concern is the execute method. Does it have any code path that can lead to a null result? Looks like not, but I'm not 100% sure.
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
Most helpful comment
Oh dear... 0_o
@tobiasKaminsky while I can't say why this might happen I think the client should handle this in a less crashing way 😁 So we might rather have to