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

App Crashed #4412

Closed
zwwko opened this issue Aug 24, 2019 · 2 comments
Closed

App Crashed #4412

zwwko opened this issue Aug 24, 2019 · 2 comments

Comments

@zwwko
Copy link

zwwko commented Aug 24, 2019

************ CAUSE OF ERROR ************

java.lang.IllegalStateException: Fragment PreviewMediaFragment{cea372e} not attached to a context.
at androidx.fragment.app.Fragment.requireContext(Fragment.java:696)
at androidx.fragment.app.Fragment.getResources(Fragment.java:760)
at androidx.fragment.app.Fragment.getString(Fragment.java:782)
at com.owncloud.android.ui.preview.PreviewMediaFragment$LoadStreamUrl.onPostExecute(PreviewMediaFragment.java:564)
at com.owncloud.android.ui.preview.PreviewMediaFragment$LoadStreamUrl.onPostExecute(PreviewMediaFragment.java:531)
at android.os.AsyncTask.finish(AsyncTask.java:660)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:677)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1534)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1424)

************ APP INFORMATION ************
ID: com.nextcloud.android.beta
Version: 20190810
Build flavor: versionDev

************ DEVICE INFORMATION ************
Brand: samsung
Device: zerofltectc
Model: SM-G9209
Id: NRD90M
Product: zerofltectc

************ FIRMWARE ************
SDK: 24
Release: 7.0
Incremental: G9209KEU2ERI2

@zwwko zwwko added the bug label Aug 24, 2019
@tobiasKaminsky
Copy link
Member

hu, strange I've never saw this.
It seems like a race condition, e.g. opening up media/video, waiting to get an url in background, but in foreground the app was already closed/navigated to something else.

Can this be the cause?

ezaquarii added a commit that referenced this issue Sep 22, 2019
Fixes #3061
Fixes #4412

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
@ezaquarii
Copy link
Collaborator

@tobiasKaminsky This is most likely the problem. This is fixed in #4208 where such operations are no longer running in the UI.

ezaquarii added a commit that referenced this issue Sep 26, 2019
Fixes #3061
Fixes #4412

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
ezaquarii added a commit that referenced this issue Sep 28, 2019
Fragment can be detached when async task finishes.
Detached fragment has no context and getString() fails with NPE.

Fixes #4412

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
ezaquarii added a commit that referenced this issue Sep 28, 2019
Fragment can be detached before async task finishes.
Detached fragment has no context and getString() fails with NPE.

Fixes #4412

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
ezaquarii added a commit that referenced this issue Sep 28, 2019
Fragment can be detached before async task finishes.
Detached fragment has no context and getString() fails with NPE.

Fixes #4412

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.9.0 milestone Oct 1, 2019
backportbot-nextcloud bot pushed a commit that referenced this issue Oct 2, 2019
Fragment can be detached before async task finishes.
Detached fragment has no context and getString() fails with NPE.

Fixes #4412

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
tobiasKaminsky pushed a commit that referenced this issue Oct 2, 2019
Fragment can be detached before async task finishes.
Detached fragment has no context and getString() fails with NPE.

Fixes #4412

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants