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

new bug on nextAnim #19

Closed
jjhesk opened this Issue Apr 22, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@jjhesk
Contributor

jjhesk commented Apr 22, 2016

This is found from the MotoG3 machine

DEVICE
MotoG3
DEVICE
Portrait
ORIENTATION
Off
PROXIMITY
N/A
BATTERY
OPERATING SYSTEM
6.0
ANDROID VERSION
No
ROOTED
Portrait
UI ORIENTATION

@DMCApps

Fatal Exception: java.lang.NullPointerException: Attempt to write to field 'int android.support.v4.app.Fragment.mNextAnim' on a null object reference
       at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:726)
       at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
       at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
       at android.os.Handler.handleCallback(Handler.java:746)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:5443)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
@DMCApps

This comment has been minimized.

Show comment
Hide comment
@DMCApps

DMCApps Apr 24, 2016

Owner

Hey @jjhesk,

Sorry about the issue and thank you for the continued support.

I've had this a few times. It seems to depend on the timing of when you call present or dismiss (e.g. calling it in say onCreate vs onResume, not that I have had this as a crash in that base but just as an example). I can't nail down exactly what it is, but it seems that there is something in the android system itself that when calling present or dismiss isn't set.

Basically if you try and do the present at a later time in the code it should be a work around for this issue, again I'm not certain the nature of the issue but it has to do with the point at which you are presenting and dismissing (basically adding/removing fragments from the FragmentManager.

Owner

DMCApps commented Apr 24, 2016

Hey @jjhesk,

Sorry about the issue and thank you for the continued support.

I've had this a few times. It seems to depend on the timing of when you call present or dismiss (e.g. calling it in say onCreate vs onResume, not that I have had this as a crash in that base but just as an example). I can't nail down exactly what it is, but it seems that there is something in the android system itself that when calling present or dismiss isn't set.

Basically if you try and do the present at a later time in the code it should be a work around for this issue, again I'm not certain the nature of the issue but it has to do with the point at which you are presenting and dismissing (basically adding/removing fragments from the FragmentManager.

@jjhesk

This comment has been minimized.

Show comment
Hide comment
@jjhesk

jjhesk May 11, 2016

Contributor

@DMCApps
I have found another error from the restart of the activity. I want to know if there has anything to deal with your update on com.dmcapps:navigation-fragment:0.2.0.2

FATAL EXCEPTION: main
Process: cy.mh520, PID: 5686
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1493)
at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1511)
at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:638)
at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:617)
at com.dmcapps.navigationfragment.manager.micromanagers.stack.StackManager.popFragment(StackManager.java:46)
at com.dmcapps.navigationfragment.manager.NavigationManagerFragment.popFragment(NavigationManagerFragment.java:156)
at com.dmcapps.navigationfragment.manager.NavigationManagerFragment.popFragment(NavigationManagerFragment.java:143)
at com.dmcapps.navigationfragment.fragments.NavigationFragment.dismissFragment(NavigationFragment.java:62)

and this is another bug from using this implementation

Process: n18.a0.x5.debug.debug, PID: 23701
java.lang.RuntimeException: Unable to start activity ComponentInfo{n18.a0.x5.debug.debug/hx520.hxhx.main.MainTabNew}: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.dmcapps.navigationfragment.manager.SingleStackNavigationManagerFragment: make sure class name exists, is public, and has an empty constructor that is public
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.dmcapps.navigationfragment.manager.SingleStackNavigationManagerFragment: make sure class name exists, is public, and has an empty constructor that is public
at android.support.v4.app.Fragment.instantiate(Fragment.java:431)
at android.support.v4.app.FragmentState.instantiate(Fragment.java:102)
at android.support.v4.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1952)
at android.support.v4.app.FragmentController.restoreAllState(FragmentController.java:144)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:306)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:85)
at hx520.hxhx.main.navBase.onCreate(navBase.java:63)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
at android.app.ActivityThread.access$800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5254) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
Caused by: java.lang.InstantiationException: class com.dmcapps.navigationfragment.manager.SingleStackNavigationManagerFragment has no zero argument constructor

Contributor

jjhesk commented May 11, 2016

@DMCApps
I have found another error from the restart of the activity. I want to know if there has anything to deal with your update on com.dmcapps:navigation-fragment:0.2.0.2

FATAL EXCEPTION: main
Process: cy.mh520, PID: 5686
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1493)
at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1511)
at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:638)
at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:617)
at com.dmcapps.navigationfragment.manager.micromanagers.stack.StackManager.popFragment(StackManager.java:46)
at com.dmcapps.navigationfragment.manager.NavigationManagerFragment.popFragment(NavigationManagerFragment.java:156)
at com.dmcapps.navigationfragment.manager.NavigationManagerFragment.popFragment(NavigationManagerFragment.java:143)
at com.dmcapps.navigationfragment.fragments.NavigationFragment.dismissFragment(NavigationFragment.java:62)

and this is another bug from using this implementation

Process: n18.a0.x5.debug.debug, PID: 23701
java.lang.RuntimeException: Unable to start activity ComponentInfo{n18.a0.x5.debug.debug/hx520.hxhx.main.MainTabNew}: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.dmcapps.navigationfragment.manager.SingleStackNavigationManagerFragment: make sure class name exists, is public, and has an empty constructor that is public
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.dmcapps.navigationfragment.manager.SingleStackNavigationManagerFragment: make sure class name exists, is public, and has an empty constructor that is public
at android.support.v4.app.Fragment.instantiate(Fragment.java:431)
at android.support.v4.app.FragmentState.instantiate(Fragment.java:102)
at android.support.v4.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1952)
at android.support.v4.app.FragmentController.restoreAllState(FragmentController.java:144)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:306)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:85)
at hx520.hxhx.main.navBase.onCreate(navBase.java:63)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
at android.app.ActivityThread.access$800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5254) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
Caused by: java.lang.InstantiationException: class com.dmcapps.navigationfragment.manager.SingleStackNavigationManagerFragment has no zero argument constructor

@DMCApps

This comment has been minimized.

Show comment
Hide comment
@DMCApps

DMCApps May 12, 2016

Owner

Does it possibly have anything to do with this?

http://stackoverflow.com/a/14222708/845038

There was a very very small change from 0.2.0.1 to 0.2.0.2 ... Can you revert to 0.2.0.1 and see if the crash still happens? If that seems to fix it by reverting to 0.2.0.1 then I can remove the line causing the issue. Based on the stack trace though it doesn't look like the code that I added would be causing the issue.

Let me know the results of the above items to try.

Owner

DMCApps commented May 12, 2016

Does it possibly have anything to do with this?

http://stackoverflow.com/a/14222708/845038

There was a very very small change from 0.2.0.1 to 0.2.0.2 ... Can you revert to 0.2.0.1 and see if the crash still happens? If that seems to fix it by reverting to 0.2.0.1 then I can remove the line causing the issue. Based on the stack trace though it doesn't look like the code that I added would be causing the issue.

Let me know the results of the above items to try.

@jjhesk

This comment has been minimized.

Show comment
Hide comment
@jjhesk

jjhesk May 19, 2016

Contributor

I will try to test it on different versions in android.

Also there was bugs causing from using app Android API 4.4.2.. something related to fragment instance didnt clear or leak. would you cover that form my snipplet?

Contributor

jjhesk commented May 19, 2016

I will try to test it on different versions in android.

Also there was bugs causing from using app Android API 4.4.2.. something related to fragment instance didnt clear or leak. would you cover that form my snipplet?

@jjhesk jjhesk closed this Jul 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment