Skip to content

Fix Crash When Write Activities From Random Any File#12583

Merged
AndyScherzinger merged 3 commits into
masterfrom
bugfix/crash-on-file-detail-activies
Mar 18, 2024
Merged

Fix Crash When Write Activities From Random Any File#12583
AndyScherzinger merged 3 commits into
masterfrom
bugfix/crash-on-file-detail-activies

Conversation

@alperozturk96

@alperozturk96 alperozturk96 commented Feb 21, 2024

Copy link
Copy Markdown
Collaborator
  • Tests written, or not not needed

Crash was happening due to asynchronous code execution. In some rare scenarios ownCloud client was null. In this PR I check thread completion and ownCloud client nullability.

@alperozturk96
alperozturk96 force-pushed the bugfix/crash-on-file-detail-activies branch 2 times, most recently from 96b7c05 to 861ca60 Compare March 11, 2024 11:48
@alperozturk96
alperozturk96 force-pushed the bugfix/crash-on-file-detail-activies branch 3 times, most recently from 794c123 to 99b122f Compare March 15, 2024 13:59
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
@alperozturk96
alperozturk96 force-pushed the bugfix/crash-on-file-detail-activies branch from 99b122f to dae166f Compare March 18, 2024 12:14
@github-actions

Copy link
Copy Markdown

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12583.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions

Copy link
Copy Markdown

Codacy

Lint

TypemasterPR
Warnings7171
Errors33

SpotBugs

CategoryBaseNew
Bad practice6868
Correctness6969
Dodgy code351351
Experimental22
Internationalization77
Malicious code vulnerability22
Multithreaded correctness66
Performance5656
Security1919
Total580580

@github-actions

Copy link
Copy Markdown

@ZetaTom ZetaTom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my tests, everything worked as expected.

If the server is unavailable and one tries to comment on a file/directory, it doesn't work, which is expected. But the button still shows the ripple effect and the user is left without any feedback. I think we should address the lack of feedback at a later point in time.

@AndyScherzinger
AndyScherzinger merged commit 80e7430 into master Mar 18, 2024
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.29.0 milestone Mar 18, 2024
@delete-merged-branch
delete-merged-branch Bot deleted the bugfix/crash-on-file-detail-activies branch March 18, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

crash app when write activities from random any file Java error occurs when downloading the PDF of Nextcloud

4 participants