WhirlyGlobe icon indicating copy to clipboard operation
WhirlyGlobe copied to clipboard

[Android] Executing the method animatePositionGeo(point.getX(), point.getY(), 0.0175) per second,ANRs one hour later

Open lzx1 opened this issue 1 year ago • 6 comments

lzx1 avatar Jun 19 '23 02:06 lzx1

I guess the question is all in the title, huh.

Well, I'm not sure what to tell you. Could be losing track of memory somewhere.
If this is version 2, my standard suggestion is to upgrade to version 3. We put a lot of work into memory for that one.

sjg-wdw avatar Jun 21 '23 18:06 sjg-wdw

Thanks for your reply. I have upgraded WhirlyGlobe to 3.4 this week,but the problem still exists.

I Draw one segment of track per second by WideVectors,and animatePositionGeo rotate to the new point,4 hours later,WhirlyGlobe cant work.

this is logs:

SIGSEGV(SEGV_MAPERR)

#00 pc 0000000035022078 /data/app/com.xxx.xxx-sJDiKuH12nPA1KHzw07ZIQ==/base.apk

#01 pc 0000000035022010 /data/app/com.xxx.xxx-sJDiKuH12nPA1KHzw07ZIQ==/base.apk

#02 pc 000000003521ad30 /data/app/com.xxx.xxx-sJDiKuH12nPA1KHzw07ZIQ==/base.apk

#03 pc 00000000355da9e8 /data/app/com.xxx.xxx-sJDiKuH12nPA1KHzw07ZIQ==/base.apk

#04 pc 00000000355da8bc /data/app/com.xxx.xxx-sJDiKuH12nPA1KHzw07ZIQ==/base.apk

#05 pc 00000000355d9464 /data/app/com.xxx.xxx-sJDiKuH12nPA1KHzw07ZIQ==/base.apk (_ZNSt6__ndk16vectorIyNS_9allocatorIyEEEC2INS_21__tree_const_iteratorIyPNS_11__tree_nodeIyPvEElEEEET_NS_9enable_ifIXaasr21__is_forward_iteratorISB_EE5valuesr16is_constructibleIyNS_15iterator_traitsISB_E9referenceEEE5valueESB_E4typeE+120) 7 #06 pc 00000000355d9310 /data/app/com.xxx.xxx-sJDiKuH12nPA1KHzw07ZIQ==/base.apk (Java_com_mousebird_maply_ComponentObject_getSelectIDs+164)

lzx1 avatar Jun 30 '23 06:06 lzx1

I presume you're deleting the old section of track?

sjg-wdw avatar Jun 30 '23 20:06 sjg-wdw

Yes,there is an operation to delete old tracks in the code:removeObject(gpsComponent, GlobeController.ThreadMode.ThreadCurrent).

lzx1 avatar Jul 03 '23 01:07 lzx1

By running my project using source code, I obtained some logs: 2023-07-03 18:08:33.551 21794-22360/com.xxx.xxx E/Maply: GL Error: 0x505 - Texture::createInGL() glTexImage2D() (ctx: 48e54000) 2023-07-03 18:08:33.553 21794-22360/com.xxx.xxx E/Adreno-GSL: <gsl_memory_alloc_pure:2354>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2023-07-03 18:08:33.554 21794-22360/com.xxx.xxx E/Adreno-GSL: <gsl_memory_alloc_pure:2354>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2023-07-03 18:08:33.555 21794-22360/com.xxx.xxx E/Adreno-GSL: <gsl_memory_alloc_pure:2354>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2023-07-03 18:08:33.556 21794-22360/com.xxx.xxx E/Adreno-GSL: <gsl_memory_alloc_pure:2354>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2023-07-03 18:08:33.556 21794-22360/com.xxx.xxx E/Adreno-GSL: <gsl_memory_alloc_pure:2354>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2023-07-03 18:08:33.556 21794-22360/com.xxx.xxx E/Maply: GL Error: 0x505 - Texture::createInGL() glTexImage2D() (ctx: 48e54000) 2023-07-03 18:08:33.558 21794-22360/com.xxx.xxx E/Adreno-GSL: <gsl_memory_alloc_pure:2354>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2023-07-03 18:08:33.559 21794-22360/com.xxx.xxx E/Adreno-GSL: <gsl_memory_alloc_pure:2354>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2023-07-03 18:08:33.560 21794-22360/com.xxx.xxx E/Adreno-GSL: <gsl_memory_alloc_pure:2354>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2023-07-03 18:08:33.561 21794-22360/com.xxx.xxx E/Adreno-GSL: <gsl_memory_alloc_pure:2354>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2023-07-03 18:08:33.561 21794-22360/com.xxx.xxx E/Adreno-GSL: <gsl_memory_alloc_pure:2354>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2023-07-03 18:08:33.562 21794-22360/com.xxx.xxx E/Maply: GL Error: 0x505 - Texture::createInGL() glTexImage2D() (ctx: 48e54000)

and

2023-07-04 08:40:11.807 2949-3630/com.xxx.xxx E/Maply: GL Error: 0x502 - OpenGLMemManager::getBufferID() glGenBuffers (ctx: 461cf180) 2023-07-04 08:40:11.807 2949-3630/com.xxx.xxx E/Maply: GL Error: 0x502 - OpenGLMemManager::getBufferID() glBufferData (ctx: 461cf180) 2023-07-04 08:40:11.807 2949-3630/com.xxx.xxx E/Maply: Empty buffer in BasicDrawable::setupGL() (requested 236) 2023-07-04 08:40:12.806 2949-3752/com.xxx.xxx E/Maply: GL Error: 0x502 - OpenGLMemManager::getBufferID() glGenBuffers (ctx: 491fe180) 2023-07-04 08:40:12.806 2949-3752/com.xxx.xxx E/Maply: GL Error: 0x502 - OpenGLMemManager::getBufferID() glBufferData (ctx: 491fe180) 2023-07-04 08:40:12.806 2949-3752/com.xxx.xxx E/Maply: Empty buffer in BasicDrawable::setupGL() (requested 22628) 2023-07-04 08:40:12.813 2949-3752/com.xxx.xxx E/Maply: GL Error: 0x502 - OpenGLMemManager::getBufferID() glGenBuffers (ctx: 461cf180) 2023-07-04 08:40:12.813 2949-3752/com.xxx.xxx E/Maply: GL Error: 0x502 - OpenGLMemManager::getBufferID() glBufferData (ctx: 461cf180) 2023-07-04 08:40:12.813 2949-3752/com.xxx.xxx E/Maply: Empty buffer in BasicDrawable::setupGL() (requested 236)

and

SIGABRT

libsystem_kernel.dylib ___pthread_kill + 8

libsystem_pthread.dylib _pthread_kill + 268

libsystem_c.dylib _abort + 180

libGFXShared.dylib _gfxFreeTextureLevel

GLEngine _glTexImage2D_Exec + 1120

OpenGLES _glTexImage2D + 84

WhirlyGlobeMaplyComponent WhirlyKit::Texture::createInGL(WhirlyKit::OpenGLMemManager*) + 552

WhirlyGlobeMaplyComponent WhirlyKit::AddTextureReq::execute(WhirlyKit::Scene*, WhirlyKitSceneRendererES*, WhirlyKitView*) + 84

WhirlyGlobeMaplyComponent WhirlyKit::Scene::processChanges(WhirlyKitView*, WhirlyKitSceneRendererES*, double) + 692

WhirlyGlobeMaplyComponent -[WhirlyKitSceneRendererES2 renderAsync] + 4432

WhirlyGlobeMaplyComponent -[WhirlyKitSceneRendererES2 render:] + 376

WhirlyGlobeMaplyComponent -[WhirlyKitEAGLView drawView:] + 160

WhirlyGlobeMaplyComponent -[WhirlyKitEAGLView drawView:] + 80

QuartzCore CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 820

QuartzCore display_timer_callback(__CFMachPort*, void*, long, void*) + 372

CoreFoundation ___CFMachPortPerform + 176

CoreFoundation _CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 60

CoreFoundation ___CFRunLoopDoSource1 + 520

CoreFoundation ___CFRunLoopRun + 2264

CoreFoundation _CFRunLoopRunSpecific + 612

GraphicsServices _GSEventRunModal + 164

lzx1 avatar Jul 04 '23 09:07 lzx1

Oh, does it create a texture each time? My recommendation would be to create the texture once and keep the MaplyTexture around to reuse.

sjg-wdw avatar Jul 13 '23 15:07 sjg-wdw