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

[Gutenberg] Crash in image upload reattach #9268

Closed
mzorz opened this issue Feb 18, 2019 · 0 comments
Closed

[Gutenberg] Crash in image upload reattach #9268

mzorz opened this issue Feb 18, 2019 · 0 comments
Assignees
Milestone

Comments

@mzorz
Copy link
Contributor

mzorz commented Feb 18, 2019

A reproduceable crash happens in current develop after the introduction of 0e2237f in #9030 and media upload progress reattach

2019-02-18 15:08:11.402 32225-32225/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.wordpress.android, PID: 32225
    java.lang.IllegalStateException: Fragment has not been attached yet.
        at android.support.v4.app.Fragment.instantiateChildFragmentManager(Fragment.java:2300)
        at android.support.v4.app.Fragment.getChildFragmentManager(Fragment.java:763)
        at org.wordpress.android.editor.GutenbergEditorFragment.getGutenbergContainerFragment(GutenbergEditorFragment.java:91)
        at org.wordpress.android.editor.GutenbergEditorFragment.onMediaUploadReattached(GutenbergEditorFragment.java:572)
        at org.wordpress.android.ui.posts.EditPostActivity.reattachUploadingMedia(EditPostActivity.java:730)
        at org.wordpress.android.ui.posts.EditPostActivity.access$4100(EditPostActivity.java:192)
        at org.wordpress.android.ui.posts.EditPostActivity$SectionsPagerAdapter.instantiateItem(EditPostActivity.java:2209)
        at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:1004)
        at android.support.v4.view.ViewPager.populate(ViewPager.java:1152)
        at android.support.v4.view.ViewPager.populate(ViewPager.java:1086)
        at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1616)
        at android.view.View.measure(View.java:22071)
        at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
        at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
        at android.view.View.measure(View.java:22071)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6602)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
        at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:141)
        at android.view.View.measure(View.java:22071)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6602)
        at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:400)
        at android.view.View.measure(View.java:22071)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6602)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
        at android.view.View.measure(View.java:22071)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6602)
        at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1514)
        at android.widget.LinearLayout.measureVertical(LinearLayout.java:806)
        at android.widget.LinearLayout.onMeasure(LinearLayout.java:685)
        at android.view.View.measure(View.java:22071)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6602)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
        at com.android.internal.policy.DecorView.onMeasure(DecorView.java:724)
        at android.view.View.measure(View.java:22071)
        at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2422)
        at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1504)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1761)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1392)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6752)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
        at android.view.Choreographer.doCallbacks(Choreographer.java:723)
        at android.view.Choreographer.doFrame(Choreographer.java:658)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
2019-02-18 15:08:11.409 1088-23124/? W/ActivityManager:   Force finishing activity org.wordpress.android/.ui.posts.EditPostActivity

Steps to reproduce the behavior

Follow steps described in #9129

  1. start a new draft
  2. insert an image
  3. once it starts uploading, exit the editor
  4. while still uploading, open the Post in the editor again
  5. observe crash
Tested on [Pixel 2], Android [8.1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant