我有一个非常愚蠢的问题。 App有很多儿童片段成基片段。当您以横向模式锁定屏幕时,等待~5-6秒并打开屏幕,应用程序会出现"递归进入以执行取消交易"。并且只有这种情况才会重复。当用户在纵向模式下旋转屏幕或锁定屏幕时,它不会重复。我认为这个问题出现了,因为当您在横向模式下锁定屏幕并打开它后,应用程序会以纵向模式显示在< ~1秒内并立即尝试旋转。有任何想法吗?
完全例外:
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.customertrax/com.customertrax.activities.entities.CustomEntityActivityExt}: java.lang.IllegalStateException: Recursive entry to executePendingTransactions
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1957)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1982)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3390)
at android.app.ActivityThread.access$700(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1152)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4463)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:762)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:529)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: Recursive entry to executePendingTransactions
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1461)
at android.support.v4.app.Fragment.performStart(Fragment.java:1807)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:977)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1108)
at android.support.v4.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:1922)
at android.support.v4.app.Fragment.performStart(Fragment.java:1816)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:977)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1108)
at android.support.v4.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:1922)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:565)
at com.customertrax.activities.BaseActivity.onStart(BaseActivity.java:78)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1133)
at android.app.Activity.performStart(Activity.java:4475)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1930)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1982)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3390)
at android.app.ActivityThread.access$700(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1152)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4463)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:762)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:529)
at dalvik.system.NativeStart.main(Native Method)
BaseActivity的代码。没什么特别的。它从ActionBarActivity扩展:
@Override
protected void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}