Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why I get the Activity pause timeout exception when my data is large?

I am using a collection of my object in my activity. I pass this collection from Activity ActDocumentDetails to ActProductsGallery. When my collection is not so large, I have no problem but when the size of collection is large enough I get this execption:

Activity pause timeout for ActivityRecord{40af3ef8 org.mabna.order/.ui.ActProductsGallery}

How can I resolve this timeout problem?

Thanks in advance,

11-23 09:44:21.930: I/ActivityManager(134): No longer want com.asus.weather (pid 664): hidden #16
11-23 09:44:59.990: I/ActivityManager(134): No longer want com.android.email (pid 1259): hidden #16
11-23 09:44:59.990: I/ActivityManager(134): No longer want com.asus.DLNA (pid 1251): hidden #17
11-23 09:45:00.010: W/ActivityManager(134): Scheduling restart of crashed service com.asus.DLNA/com.asus.DMS.DLNAServerService in 5000ms
11-23 09:45:00.010: W/ActivityManager(134): Scheduling restart of crashed service com.asus.DLNA/.MusicPlaybackService in 15000ms
11-23 09:45:00.020: W/ActivityManager(134): Scheduling restart of crashed service com.asus.emailwidget/.UpdateService in 24997ms
11-23 09:45:05.020: I/ActivityManager(134): Start proc com.asus.DLNA for service com.asus.DLNA/com.asus.DMS.DLNAServerService: pid=1521 uid=10055 gids={3003, 1015}
11-23 09:45:05.060: I/DMS(1521):   ===========================>   onCreate()
11-23 09:45:10.210: W/ActivityManager(134): Activity pause timeout for ActivityRecord{40af3ef8 org.mabna.order/.ui.ActProductsGallery}
11-23 09:45:10.230: W/dalvikvm(1474): threadid=1: thread exiting with uncaught exception (group=0x4028c760)
11-23 09:45:10.230: E/AndroidRuntime(1474): FATAL EXCEPTION: main
11-23 09:45:10.230: E/AndroidRuntime(1474): java.lang.NullPointerException
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.app.ActivityThread.handleStopActivity(ActivityThread.java:2686)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.app.ActivityThread.access$800(ActivityThread.java:122)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.os.Looper.loop(Looper.java:132)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.app.ActivityThread.main(ActivityThread.java:4123)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at java.lang.reflect.Method.invokeNative(Native Method)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at java.lang.reflect.Method.invoke(Method.java:491)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at dalvik.system.NativeStart.main(Native Method)
11-23 09:45:10.240: W/ActivityManager(134):   Force finishing activity org.mabna.order/.ui.ActProductsGallery
11-23 09:45:10.270: W/ActivityManager(134):   Force finishing activity org.mabna.order/.ui.ActDocumentDetails
11-23 09:45:10.280: W/ActivityManager(134): Scheduling restart of crashed service org.mabna.order/.services.SrvSmsListener in 24735ms
11-23 09:45:10.280: E/InputDispatcher(134): channel '40f237e8 org.mabna.order/org.mabna.order.ui.ActDocumentDetails (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
11-23 09:45:10.280: E/InputDispatcher(134): channel '40f237e8 org.mabna.order/org.mabna.order.ui.ActDocumentDetails (server)' ~ Channel is unrecoverably broken and will be disposed!
11-23 09:45:10.280: W/ActivityManager(134): Scheduling restart of crashed service org.mabna.order/.services.SrvDataExchange in 34735ms
like image 257
Bobs Avatar asked Oct 09 '22 10:10

Bobs


1 Answers

Perhaps it's because you're putting too much into your Intent. Consider having a static field, for example, within your Application object for passing large amounts of data between activities. Or even better a WeakHashMap.

like image 76
Alexander Kulyakhtin Avatar answered Oct 19 '22 11:10

Alexander Kulyakhtin