shagiz / AsyncFilePicker

FIlepicker allows you to simplify photo and file picking process
Apache License 2.0
26 stars 2 forks source link

Fatal Exception when open camera go back and go file more times #6

Open waar19 opened 5 years ago

waar19 commented 5 years ago

E/FragmentManager: Failure saving state: active FilePickerDialog{8b9680c (7a068992-e522-4604-9e59-b15ecaaa4c92) FilePickerDialog} was removed from the FragmentManager E/FragmentManager: Activity state: D/FragmentManager: Local Activity dbbc7ec State: mResumed=false mStopped=false mFinished=false mChangingConfigurations=false D/FragmentManager: mCurrentConfig={1.0 334mcc50mnc [es_MX,en_US] ldltr sw360dp w360dp h616dp 480dpi nrml long hdr port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1920) nonFullScreen=0 hwt:12 suim:1 s.64} mLoadersStarted=true D/FragmentManager: Active Fragments in 5695bf5: D/FragmentManager: #0: ReportFragment{c5efd8a #0 androidx.lifecycle.LifecycleDispatcher.report_fragment_tag} mFragmentId=#0 mContainerId=#0 mTag=androidx.lifecycle.LifecycleDispatcher.report_fragment_tag D/FragmentManager: mState=4 mIndex=0 mWho=android:fragment:0 mBackStackNesting=0 mAdded=true mRemoving=false mFromLayout=false mInLayout=false mHidden=false mDetached=false mMenuVisible=true mHasMenu=false mRetainInstance=false mRetaining=false mUserVisibleHint=true D/FragmentManager: mFragmentManager=FragmentManager{5695bf5 in HostCallbacks{86e2ffb}} mHost=android.app.Activity$HostCallbacks@86e2ffb Child FragmentManager{ab1818 in ReportFragment{c5efd8a}}: FragmentManager misc state: mHost=android.app.Activity$HostCallbacks@86e2ffb D/FragmentManager: mContainer=android.app.Fragment$1@4c0c271 D/FragmentManager: mParent=ReportFragment{c5efd8a #0 androidx.lifecycle.LifecycleDispatcher.report_fragment_tag} mCurState=4 mStateSaved=true mDestroyed=false Added Fragments:

0: ReportFragment{c5efd8a #0 androidx.lifecycle.LifecycleDispatcher.report_fragment_tag}

    FragmentManager misc state:
      mHost=android.app.Activity$HostCallbacks@86e2ffb

D/FragmentManager: mContainer=android.app.Activity$HostCallbacks@86e2ffb mCurState=4 mStateSaved=true mDestroyed=false ViewRoot: mAdded=true mRemoved=false mConsumeBatchedInputScheduled=false mConsumeBatchedInputImmediatelyScheduled=false mPendingInputEventCount=0 D/FragmentManager: mProcessInputEventsScheduled=false mTraversalScheduled=false mIsAmbientMode=false android.view.ViewRootImpl$NativePreImeInputStage: mQueueLength=0 android.view.ViewRootImpl$ImeInputStage: mQueueLength=0 android.view.ViewRootImpl$NativePostImeInputStage: mQueueLength=0 Choreographer: mFrameScheduled=false D/FragmentManager: mLastFrameTime=31717123 (308 ms ago) View Hierarchy: DecorView@5b76856[ProfileActivity] android.widget.LinearLayout{965d0d7 V.E...... .......D 0,0-1080,1920} D/FragmentManager: android.view.ViewStub{3459dc4 G.E...... ......I. 0,0-0,0 #1020192 android:id/action_mode_bar_stub} D/FragmentManager: android.widget.FrameLayout{44e14ad V.E...... .......D 0,0-1080,1920} androidx.appcompat.widget.FitWindowsLinearLayout{a59b3e2 V.E...... .......D 0,0-1080,1920 #7f0a0033 app:id/action_bar_root} androidx.appcompat.widget.ViewStubCompat{fcca373 G.E...... ......I. 0,0-0,0 #7f0a003e app:id/action_mode_bar_stub} androidx.appcompat.widget.ContentFrameLayout{1e0d230 V.E...... .......D 0,0-1080,1920 #1020002 android:id/content} androidx.coordinatorlayout.widget.CoordinatorLayout{de44ea9 V.ED..... .......D 0,0-1080,1920 #7f0a01f6 app:id/main_content} com.google.android.material.appbar.AppBarLayout{f228e8b V.E...... ......ID 0,0-1080,600 #7f0a0053 app:id/app_bar} D/FragmentManager: com.google.android.material.appbar.CollapsingToolbarLayout{9e32c2e V.ED..... ......ID 0,0-1080,600 #7f0a03a9 app:id/toolbar_layout} androidx.appcompat.widget.AppCompatImageView{a544fdc V.ED..... ......ID 0,0-1080,600 #7f0a0076 app:id/bgheader} D/FragmentManager: android.widget.LinearLayout{66338e5 V.E...... .......D 0,72-1080,672} androidx.appcompat.widget.Toolbar{9b32fba V.E...... ......ID 0,0-1080,168 #7f0a03a7 app:id/toolbar} androidx.appcompat.widget.AppCompatTextView{c48dc8 V.ED..... ........ 216,43-668,124} androidx.appcompat.widget.AppCompatImageButton{7937e61 VFED..C.. ......ID 0,0-168,168} D/FragmentManager: androidx.appcompat.widget.ActionMenuView{a548d86 V.E...... ........ 1080,0-1080,168} android.widget.ProgressBar{6c403cf G.ED..... ......ID 0,0-0,0 #7f0a025a app:id/progressBarUpdateProfile} de.hdodenhof.circleimageview.CircleImageView{9275f25 VFED..C.. ......ID 360,168-720,528 #7f0a0182 app:id/imageViewProfile} D/FragmentManager: androidx.appcompat.widget.AppCompatTextView{db22e6b V.ED..... ........ 228,528-851,600 #7f0a0360 app:id/textViewNameLastname} com.google.android.material.floatingactionbutton.FloatingActionButton{3a73b68 GFED..C.. ......I. 0,0-0,0 #7f0a004c app:id/add_image} androidx.core.widget.NestedScrollView{cbe2b81 VFED..... .......D 0,600-1080,2448 #7f0a0047 app:id/activity_profile} android.widget.LinearLayout{bb8e15c V.E...... .......D 48,48-1032,846} android.widget.LinearLayout{a0fad52 V.E...... ........ 0,0-984,132} D/FragmentManager: com.iarcuschin.simpleratingbar.SimpleRatingBar{2b7f37f V..D..... ........ 274,0-709,75 #7f0a02ab app:id/simpleRatingBarMessenger} D/FragmentManager: androidx.appcompat.widget.AppCompatTextView{7bd8f4c V.ED..... ........ 311,75-673,132 #7f0a0392 app:id/textViewTotalReviews} android.widget.RelativeLayout{ee7f823 V.E...... ........ 0,180-984,237} androidx.appcompat.widget.AppCompatTextView{e275b95 V.ED..... ........ 0,0-289,57 #7f0a0319 app:id/textView55} androidx.appcompat.widget.AppCompatTextView{ee794aa V.ED..... ........ 902,0-984,57 #7f0a035e app:id/textViewMessengerType} android.widget.RelativeLayout{4718120 V.E...... .......D 0,237-984,357} androidx.appcompat.widget.AppCompatTextView{d62489b V.ED..... ........ 0,31-289,88 #7f0a0311 app:id/textView50} androidx.appcompat.widget.AppCompatEditText{7da5438 VFED..CL. .F....ID 720,0-984,120 #7f0a00fb app:id/editTextCellPhoneNumber} D/FragmentManager: android.widget.RelativeLayout{b8a2c65 G.E...... ......I. 0,0-0,0 #7f0a0009 app:id/RelativeLayoutPlate} androidx.appcompat.widget.AppCompatTextView{e79dd3a V.ED..... ......ID 0,0-0,0 #7f0a02e5 app:id/textView1} androidx.appcompat.widget.AppCompatTextView{270deb V.ED..... ......ID 0,0-0,0 #7f0a036d app:id/textViewPlate} android.widget.RelativeLayout{86bead9 V.E...... .......D 0,357-984,501} androidx.appcompat.widget.AppCompatTextView{8ef1c11 V.ED..... ........ 0,43-131,100 #7f0a038c app:id/textViewTermsConditions} D/FragmentManager: androidx.appcompat.widget.AppCompatSpinner{e825176 VFED..CL. ......ID 588,0-984,144 #7f0a02b6 app:id/spinnerCity} androidx.appcompat.widget.AppCompatTextView{5a0b748 V.ED..... ........ 0,28-252,115} android.widget.LinearLayout{4574c9e V.E...... .......D 0,501-984,798} android.widget.LinearLayout{992d377 V.E...... .......D -68,0-450,297} com.google.android.material.floatingactionbutton.FloatingActionButton{398684d VFED..C.. ......ID 175,72-343,240 #7f0a009d app:id/buttonSave} androidx.appcompat.widget.AppCompatTextView{3a0f02 V.ED..... ........ 182,240-335,297 #7f0a037b app:id/textViewSavedText} android.widget.LinearLayout{4fc7be4 V.E...... .......D 450,0-1052,297} D/FragmentManager: com.google.android.material.floatingactionbutton.FloatingActionButton{6d73013 VFED..C.. ......ID 217,72-385,240 #7f0a008b app:id/buttonChangePassword} androidx.appcompat.widget.AppCompatTextView{bf77250 V.ED..... ........ 106,240-495,297 #7f0a0369 app:id/textViewPasswordText} Looper (main, tid 1) {6f629e1} Message 0: { when=-30ms what=140 arg1=20 target=android.app.ActivityThread$H } Message 1: { when=+171ms callback=androidx.lifecycle.ProcessLifecycleOwner$1 target=android.os.Handler } D/FragmentManager: Message 2: { when=+470ms callback=com.google.firebase.inappmessaging.internal.ForegroundNotifier$$Lambda$1 target=android.os.Handler } Message 3: { when=+4s499ms callback=com.google.android.gms.measurement.internal.zzac target=com.google.android.gms.internal.measurement.zzk } (Total messages: 4, polling=false, quitting=false) Local FragmentActivity dbbc7ec State: mCreated=true mResumed=false mStopped=false Active Fragments in c989306: D/FragmentManager: FilePickerDialog{8b9680c (7a068992-e522-4604-9e59-b15ecaaa4c92) FilePickerDialog} mFragmentId=#0 mContainerId=#0 mTag=FilePickerDialog mState=0 mWho=7a068992-e522-4604-9e59-b15ecaaa4c92 mBackStackNesting=0 mAdded=false mRemoving=true mFromLayout=false mInLayout=false mHidden=false mDetached=false mMenuVisible=true mHasMenu=false D/FragmentManager: mRetainInstance=true mUserVisibleHint=true D/FragmentManager: mSavedViewState={2131362080=android.view.AbsSavedState$1@6669dc7, 2131362084=android.view.AbsSavedState$1@6669dc7, 2131362085=android.view.AbsSavedState$1@6669dc7} D/FragmentManager: FilePickerDialog{fcbff34 (1e876b74-e831-4a2b-bfeb-217305cfa178) FilePickerDialog} mFragmentId=#0 mContainerId=#0 mTag=FilePickerDialog mState=3 mWho=1e876b74-e831-4a2b-bfeb-217305cfa178 mBackStackNesting=0 D/FragmentManager: mAdded=true mRemoving=false mFromLayout=false mInLayout=false D/FragmentManager: mHidden=false mDetached=false mMenuVisible=true mHasMenu=false mRetainInstance=true mUserVisibleHint=true mFragmentManager=FragmentManager{c989306 in HostCallbacks{cadfff4}} mHost=androidx.fragment.app.FragmentActivity$HostCallbacks@cadfff4 mView=android.widget.LinearLayout{4ca831d V.E...... .......D 0,0-1080,288} D/FragmentManager: mInnerView=android.widget.LinearLayout{4ca831d V.E...... .......D 0,0-1080,288} FilePickerFragment{ee3ffe3 (6527a6ed-9d2f-4159-87e0-d0f1e53c735b) FilePickerFragment} mFragmentId=#0 mContainerId=#0 mTag=FilePickerFragment mState=3 mWho=6527a6ed-9d2f-4159-87e0-d0f1e53c735b mBackStackNesting=0 mAdded=true mRemoving=false mFromLayout=false mInLayout=false mHidden=false mDetached=false mMenuVisible=true mHasMenu=false mRetainInstance=true mUserVisibleHint=true D/FragmentManager: mFragmentManager=FragmentManager{c989306 in HostCallbacks{cadfff4}} D/FragmentManager: mHost=androidx.fragment.app.FragmentActivity$HostCallbacks@cadfff4 mArguments=Bundle[{use_cache=true}] Child FragmentManager{39ad992 in FilePickerFragment{ee3ffe3}}: FragmentManager misc state: mHost=androidx.fragment.app.FragmentActivity$HostCallbacks@cadfff4 mContainer=androidx.fragment.app.Fragment$3@254f63 mParent=FilePickerFragment{ee3ffe3 (6527a6ed-9d2f-4159-87e0-d0f1e53c735b) FilePickerFragment} mCurState=3 mStateSaved=false mStopped=false mDestroyed=false Added Fragments:

0: FilePickerFragment{ee3ffe3 (6527a6ed-9d2f-4159-87e0-d0f1e53c735b) FilePickerFragment}

    #1: FilePickerDialog{fcbff34 (1e876b74-e831-4a2b-bfeb-217305cfa178) FilePickerDialog}
  FragmentManager misc state:
    mHost=androidx.fragment.app.FragmentActivity$HostCallbacks@cadfff4
    mContainer=androidx.fragment.app.FragmentActivity$HostCallbacks@cadfff4

D/FragmentManager: mCurState=3 mStateSaved=true mStopped=false mDestroyed=false D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.iamstudio.mensajeria, PID: 28608 java.lang.IllegalStateException: Failure saving state: active FilePickerDialog{8b9680c (7a068992-e522-4604-9e59-b15ecaaa4c92) FilePickerDialog} was removed from the FragmentManager at androidx.fragment.app.FragmentManagerImpl.saveAllState(FragmentManagerImpl.java:2315) at androidx.fragment.app.FragmentController.saveAllState(FragmentController.java:150) at androidx.fragment.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java:496) at androidx.appcompat.app.AppCompatActivity.onSaveInstanceState(AppCompatActivity.java:511) at android.app.Activity.performSaveInstanceState(Activity.java:1615) at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1398) at android.app.ActivityThread.callCallActivityOnSaveInstanceState(ActivityThread.java:5390) at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4686) at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4749) at android.app.ActivityThread.-wrap25(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1925) at android.os.Handler.dispatchMessage(Handler.java:108) at android.os.Looper.loop(Looper.java:166) at android.app.ActivityThread.main(ActivityThread.java:7425) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)

RubenPatino commented 5 years ago

val pickerFragment = FilePickerFragment.getFragment(supportFragmentManager) pickerFragment.retainInstance=false