Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Exception: java.lang.OutOfMemoryError with the TelemetryClient #467

Closed
adavis opened this issue May 26, 2017 · 4 comments
Closed

Fatal Exception: java.lang.OutOfMemoryError with the TelemetryClient #467

adavis opened this issue May 26, 2017 · 4 comments
Assignees
Milestone

Comments

@adavis
Copy link

adavis commented May 26, 2017

Seeing random crashes in my application.

Platform: Android 6.0 and 6.01
Mapbox Services version: 5.0.2

Expected behavior

No crash

Actual behavior

Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 662262 byte allocation with 652224 free bytes and 636KB until OOM
       at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:95)
       at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:133)
       at java.lang.StringBuilder.append(StringBuilder.java:124)
       at org.json.JSONStringer.string(JSONStringer.java:344)
       at org.json.JSONStringer.key(JSONStringer.java:375)
       at org.json.JSONObject.writeTo(JSONObject.java:720)
       at org.json.JSONStringer.value(JSONStringer.java:237)
       at org.json.JSONArray.writeTo(JSONArray.java:613)
       at org.json.JSONArray.toString(JSONArray.java:585)
       at com.mapbox.services.android.telemetry.http.TelemetryClient.sendEventsWrapped(TelemetryClient.java:202)
       at com.mapbox.services.android.telemetry.http.TelemetryClient.sendEvents(TelemetryClient.java:117)
       at com.mapbox.services.android.telemetry.MapboxTelemetry.flushEventsQueueImmediately(MapboxTelemetry.java:516)
       at com.mapbox.services.android.telemetry.MapboxTelemetry.putEventOnQueue(MapboxTelemetry.java:402)
       at com.mapbox.services.android.telemetry.MapboxTelemetry.addLocationEvent(MapboxTelemetry.java:444)
       at com.mapbox.services.android.telemetry.TelemetryLocationReceiver.onReceive(TelemetryLocationReceiver.java:27)
       at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297)
       at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46)
       at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:7406)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
@zugaldia zugaldia self-assigned this May 26, 2017
@zugaldia zugaldia added this to the v2.2.0 milestone May 26, 2017
@zugaldia
Copy link
Member

Thanks for the report @adavis, I'll look into this. I believe we tackled this OOM error with #390 but I need to double check that the fix was in the release mentioned above.

@zugaldia
Copy link
Member

@adavis Looks like the fix for this issue didn't make it to the Maps SDK until version 5.1.0 (mapbox/mapbox-gl-native@a96c6ee) which is currently on beta. Let's keep the issue open until we have a final release, please let me know if you still the issue once you upgrade.

@adavis
Copy link
Author

adavis commented May 30, 2017

ok, thanks for the update 👍🏽

@cammace
Copy link
Contributor

cammace commented Jul 18, 2017

Looks like the fix made it into the final 5.1.0 release. Closing but if the issue still occurs I can reopen.

@cammace cammace closed this as completed Jul 18, 2017
@cammace cammace mentioned this issue Jul 20, 2017
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants