Hi;
Environment: SMP 3.0 SP5, Android Agentry client SP09 PL01, Android OS: 4.0.4, Device: Samsung Galaxy Ta 2.0
I am working on a custom application that contains an implementation of attachments and the locations tab as per the standard SAP Work Manager 6.2. The client crashes after capturing lots of pictures on the device, not only does it crash but also the speed/perfomance reduces with time as more pictures are captured, navigating through the application becomes slower to be more specific. Eventually the Agentry client crashes with the message "Agentry client is not responding". When I debug the device using DDMS, I get the below error.
My thoughts are that the Agentry client seems to be struggling with garbage collection, it seems to be holding on to memory and as long as there is no sync done or the application hasn't been closed and reopened, the memory piles up, up to a point where it exhausts the memory on the device. Not sure what your guys' take is on this?
07-23 14:33:52.960: D/AndroidRuntime(2372): Shutting down VM
07-23 14:33:52.960: W/dalvikvm(2372): threadid=1: thread exiting with uncaught exception (group=0x40bee1f8)
07-23 14:33:52.960: E/AndroidRuntime(2372): FATAL EXCEPTION: main
07-23 14:33:52.960: E/AndroidRuntime(2372): java.lang.OutOfMemoryError: java.lang.OutOfMemoryError
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:513)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:530)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.client.android.ui.helpers.AgentryImageBitmap.getBitmap2(AgentryImageBitmap.java:203)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.client.android.ui.helpers.AgentryImageBitmap.getBitmap(AgentryImageBitmap.java:157)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.client.android.ui.helpers.AgentryImageBitmap.getBitmap(AgentryImageBitmap.java:122)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.client.android.ui.helpers.AgentryImageDrawable.<init>(AgentryImageDrawable.java:139)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.client.android.ui.helpers.GriddedAgentryImageDrawable.<init>(GriddedAgentryImageDrawable.java:105)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.client.android.ui.helpers.LargeImageHelper.createDrawable(LargeImageHelper.java:494)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.client.android.ui.helpers.LargeImageHelper.create(LargeImageHelper.java:436)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.client.android.ui.screensets.widgets.EmbeddedImageWidget.createContentView(EmbeddedImageWidget.java:147)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.client.android.ui.screensets.widgets.Widget.initialize(Widget.java:338)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.core.mvc.screensets.widgets.WidgetInterop.initialize(WidgetInterop.java:63)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.core.mvc.ModelControllerInterop.onUIInitialized(Native Method)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.core.mvc.ModelControllerInterop.onUIInitialized(ModelControllerInterop.java:67)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.client.android.ui.AgentryActivityWithModelController.onPostCreate(AgentryActivityWithModelController.java:521)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1116)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1953)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.ActivityThread.access$600(ActivityThread.java:128)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.os.Handler.dispatchMessage(Handler.java:99)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.os.Looper.loop(Looper.java:137)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.ActivityThread.main(ActivityThread.java:4514)
07-23 14:33:52.960: E/AndroidRuntime(2372): at java.lang.reflect.Method.invokeNative(Native Method)
07-23 14:33:52.960: E/AndroidRuntime(2372): at java.lang.reflect.Method.invoke(Method.java:511)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
07-23 14:33:52.960: E/AndroidRuntime(2372): at dalvik.system.NativeStart.main(Native Method)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.core.mvc.ModelControllerInterop.onUIInitialized(Native Method)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.core.mvc.ModelControllerInterop.onUIInitialized(ModelControllerInterop.java:67)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.syclo.agentry.client.android.ui.AgentryActivityWithModelController.onPostCreate(AgentryActivityWithModelController.java:521)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1116)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1953)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.ActivityThread.access$600(ActivityThread.java:128)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.os.Handler.dispatchMessage(Handler.java:99)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.os.Looper.loop(Looper.java:137)
07-23 14:33:52.960: E/AndroidRuntime(2372): at android.app.ActivityThread.main(ActivityThread.java:4514)
07-23 14:33:52.960: E/AndroidRuntime(2372): at java.lang.reflect.Method.invokeNative(Native Method)
07-23 14:33:52.960: E/AndroidRuntime(2372): at java.lang.reflect.Method.invoke(Method.java:511)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
07-23 14:33:52.960: E/AndroidRuntime(2372): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
07-23 14:33:52.960: E/AndroidRuntime(2372): at dalvik.system.NativeStart.main(Native Method)
07-23 14:33:52.992: W/ActivityManager(215): Force finishing activity com.coct.inspections62.client.android/com.syclo.agentry.client.android.ui.screensets.WizardScreenSetActivity
07-23 14:33:53.031: E/android.os.Debug(215): !@Dumpstate > dumpstate -k -t -n -z -d -o /data/log/dumpstate_app_error
It looks like there is a memory leak, is there a possible solution to this?
Thanks and Regards;
Sizo