Android Question Out of memory

yfleury

Active Member
Licensed User
Longtime User
I have this error
B4X:
java.lang.OutOfMemoryError: Failed to allocate a 4579 byte allocation with 25149440 free bytes and 125MB until OOM, max allowed footprint 162042800, growth limit 268435456; failed due to fragmentation (largest possible contiguous allocation 3872 bytes)
    at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
    at java.nio.DirectByteBuffer$MemoryRef.<init>(DirectByteBuffer.java:71)
    at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:240)
    at com.google.maps.api.android.lib6.gmm6.vector.gl.l.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040304-245988633):11)
    at com.google.maps.api.android.lib6.gmm6.vector.gl.buffer.m.e(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040304-245988633):78)
    at com.google.maps.api.android.lib6.gmm6.vector.gl.buffer.m.d(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040304-245988633):70)
    at com.google.maps.api.android.lib6.gmm6.vector.s.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040304-245988633):28)
    at com.google.maps.api.android.lib6.gmm6.api.t.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040304-245988633):121)
    at com.google.maps.api.android.lib6.gmm6.api.o.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040304-245988633):54)
    at com.google.maps.api.android.lib6.gmm6.vector.bz.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040304-245988633):378)
    at com.google.maps.api.android.lib6.gmm6.vector.bg.run(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040304-245988633):85)
** Activity (main) Pause, UserClosed = true **
** Service (httputils2service) Destroy **
** Service (starter) Destroy (ignored)**

Can I know how memory my apps consume ?
 

yfleury

Active Member
Licensed User
Longtime User
For now, I have a 30 address and for each I showing a (AddMarker2) at same time. I showing the way with polypoint for all address. Google direction limit waypoint to 23 than I have many polypoint (10-20 waypoint)

I want to optimize the better way for my delevery app. For one day, I have more 200 address to optimse for delevery

For testing my app with 30 address, google map was fluid for 5-6 minutes. After that my app slow down than crash.

GPS1.Start(0, 0) is it the time is too short?
 
Upvote 0

yfleury

Active Member
Licensed User
Longtime User
Why do you need it with Google Maps?
To follow my position in real time. And I will make an apps for client to follow the delevery truck in real time on google map (update every 5 minutes)

The markers was not a problem. I run 30 markers over 4 hours without issues. My app going slowdown only when I show polypoints.
 
Upvote 0
Top