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

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

Open
lzx1 opened this issue Jun 19, 2023 · 6 comments

Comments

@lzx1
Copy link

lzx1 commented Jun 19, 2023

No description provided.

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Jun 21, 2023

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.

@lzx1
Copy link
Author

lzx1 commented Jun 30, 2023

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

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

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

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

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

#5 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
#6 pc 00000000355d9310 /data/app/com.xxx.xxx-sJDiKuH12nPA1KHzw07ZIQ==/base.apk (Java_com_mousebird_maply_ComponentObject_getSelectIDs+164)

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Jun 30, 2023

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

@lzx1
Copy link
Author

lzx1 commented Jul 3, 2023

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

@lzx1
Copy link
Author

lzx1 commented Jul 4, 2023

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

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Jul 13, 2023

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

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

2 participants