CartoDB / mobile-sdk

CARTO Mobile SDK core project
https://carto.com/docs/carto-engine/mobile-sdk/
BSD 3-Clause "New" or "Revised" License
187 stars 68 forks source link

Torque dark shade on some devices (Mali-450 MP GPU) #61

Open jaakla opened 7 years ago

jaakla commented 7 years ago

Device: ALE-L21 (Huawei P8 lite), device OS: 5.0.1 or 6.0 SDK 4.0.0-rc.3: Build: android-176|(HEAD detached at f6de9b3)|release/v4.0.0-rc.2-27-gf6de9b3 , time: Dec 19 2016 22:14:15 screenshot_2016-12-25-17-17-06

mtehver commented 7 years ago

Found workaround for similar issue on some other Mali GPU devices (driver bug), fixed that in RC3. Need actual device to reproduce the issue. It is possible that no sensible workaround exists.

jaakla commented 7 years ago

Problematic device opengl report:

ARM
Mali-450 MP
OpenGL ES 2.0

GL_EXT_debug_marker GL_OES_texture_npot GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture GL_EXT_compressed_ETC1_RGB8_sub_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_OES_vertex_half_float GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_ARM_mali_program_binary GL_EXT_shader_texture_lod GL_EXT_robustness GL_OES_depth_texture_cube_map GL_KHR_debug GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_mapbuffer
jaakla commented 7 years ago

Log from another device (Philips Android TV) with same issue. It seems to have same Mali-450 MP GPU,.

01-01 14:36:50.208 13129-13129/? I/art: Late-enabling -Xcheck:jni
01-01 14:36:51.036 13129-13129/com.carto.cartomap I/InstantRun: Instant Run Runtime started. Android package is com.carto.cartomap, real application class is com.carto.cartomap.MapApplication.
01-01 14:36:51.482 13129-13138/com.carto.cartomap W/art: Suspending all threads took: 77.329ms
01-01 14:36:51.747 13129-13143/com.carto.cartomap W/art: Suspending all threads took: 86.425ms
01-01 14:36:51.752 13129-13143/com.carto.cartomap I/art: Background sticky concurrent mark sweep GC freed 7114(377KB) AllocSpace objects, 4(88KB) LOS objects, 48% free, 575KB/1117KB, paused 87.968ms total 173.572ms
01-01 14:36:56.535 13129-13143/com.carto.cartomap W/art: Suspending all threads took: 5.898ms
01-01 14:36:56.554 13129-13143/com.carto.cartomap I/art: Background partial concurrent mark sweep GC freed 2582(301KB) AllocSpace objects, 4(74KB) LOS objects, 62% free, 621KB/1645KB, paused 7.414ms total 56.873ms
01-01 14:37:08.297 13129-13129/com.carto.cartomap I/carto-mobile-sdk: AndroidUtils::AttachJVM: Attaching JVM from current JNIEnv
01-01 14:37:08.438 13129-13516/com.carto.cartomap D/carto-mobile-sdk: LicenseManager::updateOnlineLicense: Requesting updated license
01-01 14:37:08.438 13129-13516/com.carto.cartomap I/carto-mobile-sdk: AndroidUtils::AttachCurrentThread: Attaching current thread to JNI
01-01 14:37:08.751 13129-13527/com.carto.cartomap D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
01-01 14:37:08.773 13129-13129/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
01-01 14:37:08.787 13129-13129/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
01-01 14:37:08.789 13129-13129/com.carto.cartomap D/Atlas: Validating map...
01-01 14:37:08.953 13129-13527/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
01-01 14:37:08.970 13129-13527/com.carto.cartomap I/OpenGLRenderer: Initialized EGL, version 1.4
01-01 14:37:08.972 13129-13527/com.carto.cartomap D/OpenGLRenderer: Enabling debug mode 0
01-01 14:37:08.972 13129-13527/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
01-01 14:37:08.985 13129-13527/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
01-01 14:37:09.030 13129-13138/com.carto.cartomap W/art: Suspending all threads took: 10.380ms
01-01 14:37:09.111 13129-13129/com.carto.cartomap W/art: Verification of java.lang.Object com.carto.cartomap.list.MapListRow.access$super(com.carto.cartomap.list.MapListRow, java.lang.String, java.lang.Object[]) took 113.726ms
01-01 14:37:09.213 13129-13516/com.carto.cartomap W/System:  NOT TPV APP file does not exists
01-01 14:37:09.467 13129-13516/com.carto.cartomap W/System:  else statusLineString HTTP/1.1 200 OK
01-01 14:37:09.467 13129-13516/com.carto.cartomap W/System:  NOT TPV APP file does not exists in chunk
01-01 14:37:09.470 13129-13516/com.carto.cartomap W/System:  non tpvapp read
01-01 14:37:09.470 13129-13516/com.carto.cartomap W/System:  integer parse 
01-01 14:37:09.470 13129-13516/com.carto.cartomap W/System:  non tpvapp read
01-01 14:37:09.470 13129-13516/com.carto.cartomap W/System:  integer parse 
01-01 14:37:09.480 13129-13516/com.carto.cartomap D/carto-mobile-sdk: LicenseManager::updateOnlineLicense: Received updated license
01-01 14:37:09.601 13129-13527/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
01-01 14:37:09.708 13129-13516/com.carto.cartomap I/carto-mobile-sdk: LicenseManager::updateOnlineLicense: License updated successfully
01-01 14:37:09.738 13129-13516/com.carto.cartomap W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[14,tid=13516,Native,Thread*=0xb0035400,peer=0x12c63280,"Thread-3316"]
01-01 14:37:09.738 13129-13516/com.carto.cartomap I/carto-mobile-sdk: AndroidUtils::DetachCurrentThread: Detaching current thread from JNI
01-01 14:37:10.066 13129-13527/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
01-01 14:37:26.138 13129-13129/com.carto.cartomap I/carto-mobile-sdk: BaseMapView: Build: android-188|(HEAD detached at 38c4759)|release/v4.0.0-rc.3-5-g38c4759 , time: Dec 28 2016 22:13:34, device type: QM152E, device OS: 5.1
01-01 14:37:26.143 13129-13143/com.carto.cartomap I/art: Background partial concurrent mark sweep GC freed 3160(186KB) AllocSpace objects, 2(32KB) LOS objects, 43% free, 1304KB/2MB, paused 10.068ms total 60.169ms
01-01 14:37:26.180 13129-13129/com.carto.cartomap I/carto-mobile-sdk: MapView: Preserving EGL context on pause is not possible
01-01 14:37:26.722 13129-13129/com.carto.cartomap I/LOG: cacheFile = /storage/emulated/0/Android/data/com.carto.cartomap/files/torque_tile_cache.db
01-01 14:37:27.026 13129-13527/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
01-01 14:37:27.132 13129-13776/com.carto.cartomap D/carto-mobile-sdk: ConfigChooser.chooseConfig: Model: QM152E, board: philips_MT5593FHT_EU, product: philips_MT5593FHT_EU
01-01 14:37:27.133 13129-13776/com.carto.cartomap D/carto-mobile-sdk: ConfigChooser.chooseConfig: Selected display configuration: 0
01-01 14:37:27.161 13129-13776/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
01-01 14:37:27.165 13129-13776/com.carto.cartomap I/carto-mobile-sdk: BaseMapView::onSurfaceCreated()
01-01 14:37:27.183 13129-13776/com.carto.cartomap D/carto-mobile-sdk: TileRenderer: Surface created
01-01 14:37:27.183 13129-13776/com.carto.cartomap D/carto-mobile-sdk: TileRenderer: Surface created
01-01 14:37:27.186 13129-13776/com.carto.cartomap I/carto-mobile-sdk: BaseMapView::onSurfaceChanged(): width: 1272, height: 648
01-01 14:37:27.210 13129-13527/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
01-01 14:37:27.273 13129-13772/com.carto.cartomap D/carto-mobile-sdk: CartoOnlineTileDataSource::loadTileURLs: Loading http://api.nutiteq.com/v2/nutiteq.osm/1/tiles.json?appToken=91e24761-d4f6-4643-9327-53db156707cf&deviceId=bc8318ad13b195db&platform=android&sdk_build=188%7c%28HEAD%20detached%20at%2038c4759%29%7crelease%2fv4.0.0-rc.3-5-g38c4759%20
01-01 14:37:27.273 13129-13772/com.carto.cartomap I/carto-mobile-sdk: AndroidUtils::AttachCurrentThread: Attaching current thread to JNI
01-01 14:37:27.282 13129-13776/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
01-01 14:37:27.348 13129-13776/com.carto.cartomap E/HAL: load module: /system/lib/hw/gralloc.mt5861.so, id: gralloc
jaakla commented 7 years ago

More devices with same GPU and issue (from AWS device farm test):

mtehver commented 7 years ago

Just a note - the sample uses 'lighten' comp-op, which needs GL_EXT_blend_minmax extension. Seems that though reported to be supported, it is actually broken on the listed devices. A workaround was implemented in 4.0.0RC3 that helped with at least one device, but did nothing on the other devices. Marking currently as wont-fix.