Drewk02 / anymemo

Automatically exported from code.google.com/p/anymemo
GNU General Public License v2.0
0 stars 0 forks source link

AnyMemo crashes after multi-task resuming if it was killed by OOM #295

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Run AnyMemo and press "HOME" to switch to other apps. If system runs out of 
memory, AnyMemo will be killed by OOM killer. When switching back to AnyMemo, 
the Android system should re-create the Activity. AnyMemo crashes when 
re-creating the Activity.

Trace:

E/AndroidRuntime( 2198): Process: org.liberty.android.fantastischmemo, PID: 2198
E/AndroidRuntime( 2198): java.lang.RuntimeException: Unable to start activity 
ComponentInfo{org.liberty.android.fantastischmemo/org.liberty.android.fantastisc
hmemo.ui.StudyActivity}: java.lang.ClassCastException: java.lang.Object[] 
cannot be cast to org.liberty.android.fantastischmemo.ui.CardFragment$Builder[]
E/AndroidRuntime( 2198):    at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176)
E/AndroidRuntime( 2198):    at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 2198):    at 
android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 2198):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 2198):    at 
android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 2198):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2198):    at 
android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 2198):    at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime( 2198):    at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 2198):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 2198):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 2198):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 2198): Caused by: java.lang.ClassCastException: 
java.lang.Object[] cannot be cast to 
org.liberty.android.fantastischmemo.ui.CardFragment$Builder[]
E/AndroidRuntime( 2198):    at 
org.liberty.android.fantastischmemo.ui.TwoFieldsCardFragment.onCreate(TwoFieldsC
ardFragment.java:97)
E/AndroidRuntime( 2198):    at 
android.support.v4.app.Fragment.performCreate(Fragment.java:1477)
E/AndroidRuntime( 2198):    at 
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:893)
E/AndroidRuntime( 2198):    at 
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104
)
E/AndroidRuntime( 2198):    at 
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1086
)
E/AndroidRuntime( 2198):    at 
android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:1
879)
E/AndroidRuntime( 2198):    at 
android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:215)
E/AndroidRuntime( 2198):    at 
android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:97)
E/AndroidRuntime( 2198):    at 
org.liberty.android.fantastischmemo.RoboActionBarActivity.onCreate(RoboActionBar
Activity.java:57)
E/AndroidRuntime( 2198):    at 
org.liberty.android.fantastischmemo.AMActivity.onCreate(AMActivity.java:47)
E/AndroidRuntime( 2198):    at 
org.liberty.android.fantastischmemo.ui.QACardActivity.onCreate(QACardActivity.ja
va:141)
E/AndroidRuntime( 2198):    at 
org.liberty.android.fantastischmemo.ui.StudyActivity.onCreate(StudyActivity.java
:119)
E/AndroidRuntime( 2198):    at 
android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 2198):    at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 2198):    at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 2198):    ... 11 more
W/ActivityManager( 1158):   Force finishing activity 
org.liberty.android.fantastischmemo/.ui.StudyActivity

Original issue reported on code.google.com by mrlhwlib...@gmail.com on 11 Jan 2014 at 12:13

GoogleCodeExporter commented 8 years ago

Original comment by mrlhwlib...@gmail.com on 11 Jan 2014 at 12:16

GoogleCodeExporter commented 8 years ago
Okay I just installed the drivers for my device. Though, do you still need the 
adb logcat from me or are you fine

Original comment by Neofireb...@gmail.com on 11 Jan 2014 at 12:34

GoogleCodeExporter commented 8 years ago
The issue should be fixed by now. I made a stupid mistake there. Thank you  
Neofireblaze for reporting the bug and providing useful informations. Please 
let me know if it is fixed in tomorrow's build (will be #85)

Change:
http://code.google.com/p/anymemo/source/detail?r=b59f0b7e3464632c8a2584d48852ade
6f8250e0e

Original comment by mrlhwlib...@gmail.com on 11 Jan 2014 at 1:15

GoogleCodeExporter commented 8 years ago
I seem to have encoutered similar crashes. It goes like this: study mode in 
landscape, when swiching to another app and change the layout to portrait, 
anymemo crashes after you switch back.

Original comment by zongb...@gmail.com on 11 Jan 2014 at 3:06

GoogleCodeExporter commented 8 years ago
will keep an eye on build 85 to see if it's fixed.

Original comment by zongb...@gmail.com on 11 Jan 2014 at 3:07

GoogleCodeExporter commented 8 years ago
zongbinw, the fix I mentioned should also fix this case too.

Original comment by mrlhwlib...@gmail.com on 11 Jan 2014 at 6:31

GoogleCodeExporter commented 8 years ago
I can confirm that build 85 resolves issue

Original comment by Neofireb...@gmail.com on 12 Jan 2014 at 10:25

GoogleCodeExporter commented 8 years ago
Great! Closing this issue now.

Original comment by mrlhwlib...@gmail.com on 12 Jan 2014 at 11:32