Как обработать "Полилинию карты, пытающуюся выбросить OutOfMemoryError" - PullRequest
0 голосов
/ 19 июня 2019

Карты Android - рисуйте polyLine при перемещении пользователя. Когда точки данных достигли 15 тысяч точек, приложение будет аварийно завершено из-за «OutOfMemoryError, брошенного при попытке выбросить OutOfMemoryError»

 java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack trace available

 Process: com.bosch.baronav, PID: 26384
    java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack trace available
2019-05-13 15:23:46.953 26384-26424/com.bosch.baronav E/Crash: Crashed@!#
2019-05-13 15:23:50.606 26384-26542/com.bosch.baronav E/JavaBinder: *** Uncaught remote exception!  (Exceptions are not yet supported across processes.)
    java.lang.OutOfMemoryError: Failed to allocate a 88 byte allocation with 8 free bytes and 8B until OOM, max allowed footprint 536870912, growth limit 536870912
        at android.location.Location$2.createFromParcel(Location.java:1083)
        at android.location.Location$2.createFromParcel(Location.java:1079)
        at android.location.ILocationListener$Stub.onTransact(ILocationListener.java:54)
        at android.os.Binder.execTransact(Binder.java:731)
2019-05-13 15:23:50.607 26384-26542/com.bosch.baronav E/AndroidRuntime: FATAL EXCEPTION: Binder:26384_6
    Process: com.bosch.baronav, PID: 26384
    java.lang.OutOfMemoryError: Failed to allocate a 88 byte allocation with 8 free bytes and 8B until OOM, max allowed footprint 536870912, growth limit 536870912
        at android.location.Location$2.createFromParcel(Location.java:1083)
        at android.location.Location$2.createFromParcel(Location.java:1079)
        at android.location.ILocationListener$Stub.onTransact(ILocationListener.java:54)
        at android.os.Binder.execTransact(Binder.java:731)
...