Re: [android-developers] Activity Back Stack and OutOfMemoryError
On Friday, May 9, 2014 1:23:12 AM UTC+4, Daniel Rindt wrote: > > 2014-05-08 17:52 GMT+02:00 Krishna Mahadik > >: > > > Increase memory allocated to process bitmap. > > > > Chunk of code will be more helpful to understand what problem exactly > you > > are facing. > > Thanks for your reply, have a look where the error is happen: > java.lang.RuntimeException: Unable to start activity > ComponentInfo{android/com.android.internal.app.ChooserActivity}: > android.view.InflateException: Binary XML file line #26: Error > inflating class > > This is not my code. It seems the process from the app consumes much > memory and by invoking the chooser its not able to inflate the layout. > The resulting question is what can i do to prevent such errors? > Are you absolutely sure that your code does not leak memory? Have you tried using Eclipse MAT and putting the app through the usual paces, like rotating the screen, pausing / restarting, etc.? You'd mentioned the app being heavy on image processing -- is your memory allocation strategy based on how much memory your app's process gets? You can use ActivityManager#getMemoryClass for that. It's too bad that your log does not have any memory allocation data. I'd consider implementing a crash handler that logs to a file, recording things like: Debug.getNativeHeapAllocatedSize() Debug.getNativeHeapFreeSize() Runtime.getRuntime().maxMemory() Runtime.getRuntime().totalMemory() Runtime.getRuntime().freeMemory() ActivityManager.getMemoryClass() -- K -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Activity Back Stack and OutOfMemoryError
2014-05-08 17:52 GMT+02:00 Krishna Mahadik : > Increase memory allocated to process bitmap. > > Chunk of code will be more helpful to understand what problem exactly you > are facing. Thanks for your reply, have a look where the error is happen: java.lang.RuntimeException: Unable to start activity ComponentInfo{android/com.android.internal.app.ChooserActivity}: android.view.InflateException: Binary XML file line #26: Error inflating class This is not my code. It seems the process from the app consumes much memory and by invoking the chooser its not able to inflate the layout. The resulting question is what can i do to prevent such errors? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Error ERROR_COULD_NOT_MOUNT with unencrypted obb on some devices
We have recently converted our app to using a mounted obb file. In the past the obb was just a zip file and we unzipped it for use. Since the obb is large (300 MB to 1.2 GB depending on app version) we decided to create it using using JOBB and mount it. This is working very well on most platforms, but there are a few where the obb can't be mounted. I have seen many reports of this problem with an encrypted obb, but ours is not. The obb was created on a Mac using the command: jobb -d LiteOBB -o main.400.com.simulationcurriculum.skysafari4.obb -pn com.simulationcurriculum.skysafari4 -pv 400 This obb is then uploaded to Google Play to be downloaded by the customer as part of the APK Expansion mechanism One the majority of platforms this has worked well for us. The obb can be successfully mounted and accessed. However, on a few, we always get the error ERROR_COULD_NOT_MOUNT coming back from the OnObbStateChangeListener. Platforms with the problem are: Droid Maxx running Android 4.4.x (works fine on 4.1) Asus Memo 7 running Android 4.2 Some other devices running custom KitKat ROMs With the custom ROMs, the error the user sees is generally "Unfortunately, Package Acces helper has stopped". I'm not 100% sure it is the same problem, but it is an issue mounting the obb I've been pulling my hair out over this. Customers are yelling at us. Why can't the obbs be mounted on the above platforms? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Activity Back Stack and OutOfMemoryError
Increase memory allocated to process bitmap. Chunk of code will be more helpful to understand what problem exactly you are facing. Regards, Krishna On 8 May 2014 20:21, "Daniel Rindt" wrote: > Hello, > > in the application we open a chooser for selecting photos. I got > frequently crashes mostly from sony by doing this which says: > OutOfMemoryError which raises by showing the bitmaps. The stacktrace which > the > system creates doesn't mention a class of our code which confuses me a bit. > My assumption is that our app can open lots of activities and by opening > the image choose there is not much space left and the crash happen. So far > i read i shouldn't care about do finish(); and activity they > can remain in the activity backstack. It would be great to get a bit more > clued. > Here is the stacktrace i got: > > Package: com.viselabs.aquariummanager > Version Code: 34 > Version Name: 0.16.34.g3cc9d12 > Android: 4.3 > Manufacturer: samsung > Model: SPH-L710 > Date: Thu May 08 09:13:04 EDT 2014 > > java.lang.RuntimeException: Unable to start activity > ComponentInfo{android/com.android.internal.app.ChooserActivity}: > android.view.InflateException: Binary XML file line #26: Error inflating > class > at > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305) > at > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359) > at android.app.ActivityThread.access$700(ActivityThread.java:165) > at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1326) > at android.os.Handler.dispatchMessage(Handler.java:99) > at android.os.Looper.loop(Looper.java:137) > at android.app.ActivityThread.main(ActivityThread.java:5455) > at java.lang.reflect.Method.invokeNative(Native Method) > at java.lang.reflect.Method.invoke(Method.java:525) > at > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187) > at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) > at dalvik.system.NativeStart.main(Native Method) > Caused by: android.view.InflateException: Binary XML file line #26: Error > inflating class > at android.view.LayoutInflater.createView(LayoutInflater.java:626) > at > com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) > at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675) > at > android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700) > at android.view.LayoutInflater.rInflate(LayoutInflater.java:761) > at android.view.LayoutInflater.rInflate(LayoutInflater.java:769) > at android.view.LayoutInflater.inflate(LayoutInflater.java:498) > at android.view.LayoutInflater.inflate(LayoutInflater.java:398) > at android.view.LayoutInflater.inflate(LayoutInflater.java:354) > at > com.android.internal.app.ResolverActivity.onCreate(ResolverActivity.java:210) > at > com.android.internal.app.ChooserActivity.onCreate(ChooserActivity.java:69) > at android.app.Activity.performCreate(Activity.java:5372) > at > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) > at > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267) > ... 11 more > Caused by: java.lang.reflect.InvocationTargetException > at java.lang.reflect.Constructor.constructNative(Native Method) > at java.lang.reflect.Constructor.newInstance(Constructor.java:417) > at android.view.LayoutInflater.createView(LayoutInflater.java:600) > ... 24 more > Caused by: java.lang.OutOfMemoryError > at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) > at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596) > at > android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444) > at > android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:832) > at android.content.res.Resources.loadDrawable(Resources.java:2988) > at android.content.res.Resources.getDrawable(Resources.java:1558) > at android.widget.EdgeEffect.(EdgeEffect.java:148) > at android.widget.AbsListView.setOverScrollMode(AbsListView.java:1220) > at android.view.View.(View.java:3458) > at android.view.View.(View.java:3528) > at android.view.ViewGroup.(ViewGroup.java:475) > at android.widget.AdapterView.(AdapterView.java:236) > at android.widget.AbsListView.(AbsListView.java:1105) > at android.widget.GridView.(GridView.java:110) > at android.widget.GridView.(GridView.java:106) > ... 27 more > It would be nice to get some information about what are you think about. > Thank you for your attention and support. > Daniel > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-devel
[android-developers] Activity Back Stack and OutOfMemoryError
Hello, in the application we open a chooser for selecting photos. I got frequently crashes mostly from sony by doing this which says: OutOfMemoryError which raises by showing the bitmaps. The stacktrace which the system creates doesn't mention a class of our code which confuses me a bit. My assumption is that our app can open lots of activities and by opening the image choose there is not much space left and the crash happen. So far i read i shouldn't care about do finish(); and activity they can remain in the activity backstack. It would be great to get a bit more clued. Here is the stacktrace i got: Package: com.viselabs.aquariummanager Version Code: 34 Version Name: 0.16.34.g3cc9d12 Android: 4.3 Manufacturer: samsung Model: SPH-L710 Date: Thu May 08 09:13:04 EDT 2014 java.lang.RuntimeException: Unable to start activity ComponentInfo{android/com.android.internal.app.ChooserActivity}: android.view.InflateException: Binary XML file line #26: Error inflating class at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359) at android.app.ActivityThread.access$700(ActivityThread.java:165) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1326) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5455) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #26: Error inflating class at android.view.LayoutInflater.createView(LayoutInflater.java:626) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700) at android.view.LayoutInflater.rInflate(LayoutInflater.java:761) at android.view.LayoutInflater.rInflate(LayoutInflater.java:769) at android.view.LayoutInflater.inflate(LayoutInflater.java:498) at android.view.LayoutInflater.inflate(LayoutInflater.java:398) at android.view.LayoutInflater.inflate(LayoutInflater.java:354) at com.android.internal.app.ResolverActivity.onCreate(ResolverActivity.java:210) at com.android.internal.app.ChooserActivity.onCreate(ChooserActivity.java:69) at android.app.Activity.performCreate(Activity.java:5372) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267) ... 11 more Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:417) at android.view.LayoutInflater.createView(LayoutInflater.java:600) ... 24 more Caused by: java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:832) at android.content.res.Resources.loadDrawable(Resources.java:2988) at android.content.res.Resources.getDrawable(Resources.java:1558) at android.widget.EdgeEffect.(EdgeEffect.java:148) at android.widget.AbsListView.setOverScrollMode(AbsListView.java:1220) at android.view.View.(View.java:3458) at android.view.View.(View.java:3528) at android.view.ViewGroup.(ViewGroup.java:475) at android.widget.AdapterView.(AdapterView.java:236) at android.widget.AbsListView.(AbsListView.java:1105) at android.widget.GridView.(GridView.java:110) at android.widget.GridView.(GridView.java:106) ... 27 more It would be nice to get some information about what are you think about. Thank you for your attention and support. Daniel -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google G