Crashes

BpmDj is fairly robust. However sometimes we get automated bug reports in. Below we describe some common problems why BpmDj crashes.

Out of memory

By far the most common problem of running BpmDj is either a lack of java heap space or a lack of graphical heap space. The typical errors we receive are as follows

Phone model: GT-I9505
Android version: 4.4.2
Package name: org.yellowcouch.bpmdj.mixedit.beta
Alpha: v4.5.6-demo
java.lang.OutOfMemoryError
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:903)
at android.graphics.Bitmap.createBitmap(Bitmap.java:880)
at android.graphics.Bitmap.createBitmap(Bitmap.java:847)
at org.yellowcouch.bpmdj.mixedit.widgets.VolumeBar.d
at org.yellowcouch.bpmdj.mixedit.widgets.VolumeBar.a
at org.yellowcouch.bpmdj.mixedit.widgets.VolumeBar.onSizeChanged
at android.view.View.sizeChange(View.java:15770)
at android.view.View.setFrame(View.java:15743)
at android.view.View.layout(View.java:15651)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1666)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1442)
at android.view.View.layout(View.java:15655)
at android.view.ViewGroup.layout(ViewGroup.java:4856)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1440)
at android.view.View.layout(View.java:15655)
at android.view.ViewGroup.layout(ViewGroup.java:4856)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:15655)
at android.view.ViewGroup.layout(ViewGroup.java:4856)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1440)
at android.view.View.layout(View.java:15655)
at android.view.ViewGroup.layout(ViewGroup.java:4856)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:15655)
at android.view.ViewGroup.layout(ViewGroup.java:4856)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2284)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2004)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1236)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6471)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803)
at android.view.Choreographer.doCallbacks(Choreographer.java:603)
at android.view.Choreographer.doFrame(Choreographer.java:573)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5356)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
or
Phone model: ICE 401e
Android version: 2.3.5
Package name: org.yellowcouch.bpmdj.mixedit.beta
Alpha: v4.5.6-demo
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:477)
at android.graphics.Bitmap.createBitmap(Bitmap.java:444)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:349)
at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:498)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:473)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
at android.content.res.Resources.loadDrawable(Resources.java:1709)
at android.content.res.Resources.getDrawable(Resources.java:581)
at android.view.View.setBackgroundResource(View.java:7533)
at org.yellowcouch.bpmdj.mixedit.widgets.u.init
at org.yellowcouch.bpmdj.mixedit.activities.cd.init
at org.yellowcouch.bpmdj.mixedit.activities.SequencerActivity.w
at org.yellowcouch.bpmdj.mixedit.activities.SequencerActivity.onCreate
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1630)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1682)
at android.app.ActivityThread.access$1500(ActivityThread.java:121)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:940)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3714)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:853)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
at dalvik.system.NativeStart.main(Native Method)

It is with pain in the heart that I have to say that there is nothing I can do about this. Google has some seriously fucked views on how memory should be managed. It already took weeks to get some grasp on the reference counting of the various image-objects (yes we already do a lot of our own memory management because google ain't); and this is not made lighter by the various changes that appear from android version to android version.

In particular; if you have a large screen with a high density, chances are that upscaling of the beatgraphs to the size of the screen simply crashes the app. On other ocasions, we cannot allocate the audio buffers to implement a delay line. At other occasions mp3 decoder buffers cannot be allocated.

Really: there is nothing I can do about it. Depsite the fact that your phone might have 1G of memory, an android app only has access to about 16-32 Mb. In that space it has to do everything.

Reporting bugs

If you think you found a problem that is not due to an out-of-memory error, please feel free to contact us. You could also check the bugtracker at our bugzilla installation.

Prev