www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: AeroShark333 on July 10, 2017, 07:29:06 pm

Title: Crash (native)
Post by: AeroShark333 on July 10, 2017, 07:29:06 pm
Hello,


There are some issues with my app on some devices and I don't really know what's causing it...
Code: [Select]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'motorola/surnia_retbr_dstv/surnia_udstv:6.0/MPI24.65-39-4/3:user/release-keys'
Revision: 'p30d'
ABI: 'arm'
pid: 4182, tid: 4448, name: GLThread 17896  >>> com.aeroshark333.artofearthify <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xa336f000
    r0 a336dab0  r1 a336dd10  r2 00000190  r3 a336efec
    r4 00000654  r5 9daa3d00  r6 a336e9b8  r7 a336e364
    r8 00000208  r9 00000000  sl 00000004  fp 00000000
    ip 00000020  sp a1c05528  lr a336edac  pc ac7a5396  cpsr 200f0030

backtrace:
    #00 pc 000bc396  /system/vendor/lib/egl/libRBGLESv2_adreno.so (oxili_tile_texture+637)
    #01 pc 000917a3  /system/vendor/lib/egl/libRBGLESv2_adreno.so
    #02 pc 000935c9  /system/vendor/lib/egl/libRBGLESv2_adreno.so (rb_texture_update_hw_subimage+4204)
    #03 pc 000949d7  /system/vendor/lib/egl/libRBGLESv2_adreno.so (rb_texture_loadimage+224)
    #04 pc 0006e6b9  /system/vendor/lib/egl/libRBGLESv2_adreno.so (TexImageLoad+216)
    #05 pc 0006e933  /system/vendor/lib/egl/libRBGLESv2_adreno.so (core_glTexImage2D+234)
    #06 pc 0004cd3b  /system/vendor/lib/egl/libRBGLESv2_adreno.so (glTexImage2D+50)
    #07 pc 0006b5cf  /system/lib/libandroid_runtime.so
    #08 pc 02d6f84d  /system/framework/arm/boot.oat (offset 0x1feb000)
Code: [Select]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'motorola/surnia_retbr_dstv/surnia_udstv:6.0/MPI24.65-39-4/3:user/release-keys'
Revision: 'p30d'
ABI: 'arm'
pid: 3892, tid: 4136, name: GLThread 17925  >>> com.aeroshark333.artofearthify <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x9fa331a8
    r0 9fa32500  r1 9fa32520  r2 00000190  r3 9fa337fc
    r4 00000654  r5 9f386e00  r6 9fa331a8  r7 9fa32b74
    r8 0000014c  r9 00000000  sl 00000004  fp 00000000
    ip 00000032  sp a02ff528  lr 9fa337fc  pc ac7a538e  cpsr 800f0030

backtrace:
    #00 pc 000bc38e  /system/vendor/lib/egl/libRBGLESv2_adreno.so (oxili_tile_texture+629)
    #01 pc 000917a3  /system/vendor/lib/egl/libRBGLESv2_adreno.so
    #02 pc 000935c9  /system/vendor/lib/egl/libRBGLESv2_adreno.so (rb_texture_update_hw_subimage+4204)
    #03 pc 000949d7  /system/vendor/lib/egl/libRBGLESv2_adreno.so (rb_texture_loadimage+224)
    #04 pc 0006e6b9  /system/vendor/lib/egl/libRBGLESv2_adreno.so (TexImageLoad+216)
    #05 pc 0006e933  /system/vendor/lib/egl/libRBGLESv2_adreno.so (core_glTexImage2D+234)
    #06 pc 0004cd3b  /system/vendor/lib/egl/libRBGLESv2_adreno.so (glTexImage2D+50)
    #07 pc 0006b5cf  /system/lib/libandroid_runtime.so
    #08 pc 02d6f84d  /system/framework/arm/boot.oat (offset 0x1feb000)

The device is a Motorola Moto E with 4G (2nd Gen) running Android 6.0.
I can't reproduce this crash myself on any of my devices.
Title: Re: Crash (native)
Post by: AeroShark333 on July 11, 2017, 12:29:50 am
Code: [Select]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/a5xeltexx/a5xelte:7.0/NRD90M/A510FXXU4CQDJ:user/release-keys'
Revision: '4'
ABI: 'arm'
pid: 32192, tid: 32357, name: GLThread 53616  >>> com.aeroshark333.artofearthify <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xcb181538
    r0 c43f7c00  r1 cb180890  r2 00000ca8  r3 cb181538
    r4 cb180890  r5 f0f2d008  r6 cb1808d0  r7 c43f7c00
    r8 00000400  r9 c43f8000  sl 00000001  fp 0000002d
    ip 0000005a  sp cce7e5cc  lr cfabc58c  pc cfabc5b8  cpsr 800a0010

backtrace:
    #00 pc 003075b8  /system/vendor/lib/egl/libGLES_mali.so
On Samsung Galaxy A5 2016 running Android 7.0
Title: Re: Crash (native)
Post by: EgonOlsen on July 11, 2017, 07:16:00 pm
Maybe a kind of out of memory? The strange thing of, that it happens in Mali and on Adreno, which makes it look like an app related problem rather than an engine related. How often does it happen?
Title: Re: Crash (native)
Post by: AeroShark333 on July 12, 2017, 03:48:59 am
Apparently this happens a lot and I managed to find a device with this issue myself (dad's phone).

Hmmm, I tried to mess around a bit and I'm starting to suspect the render target(s) or the blitting fragment shaders that I'm using.
The blitting shader is used for both rendertargets (in the blitting shader the shader is split for the two rendertargets)
In the heavy shader, render target 1 will do light operations and render target 1 will do heavy operations (probably too heavy for this phone).
In the light shader, render target 1 will do light operations and render target 2 will do even lighter operations.

One render target with a heavy blitting shader:
-> 4bpp enabled on render target (16-bit): Works. Works. Works. Works. Works.
-> 4bpp disabled on render target (32-bit): Works. Works.

Two render targets with a heavy blitting shader:
-> 4bpp enabled on render target (16-bit): Hangs. Hangs.
-> 4bpp disabled on render target (32-bit): Hangs. Hangs.

One render target with a light shader:
-> 4bpp enabled on render target (16-bit): SIGSEGV. SIGSEGV. Works. Works. SIGSEGV. Works.
-> 4bpp disabled on render target (32-bit): Works. Works.

Two render targets with a light shader:
-> 4bpp enabled on render target (16-bit): SIGSEGV. SIGSEGV. Works. SIGSEGV. SIGSEGV. Works.
-> 4bpp disabled on render target (32-bit): Works. Works. Works.

Or maybe it's not related to any of this at all...
I really have no clue...
Changing Config.blittingMode from 8 to 1 doesn't prevent the SIGSEGV from happening either.
This SIGSEGV doesn't happen on my own phone (which is more high-end...)
Title: Re: Crash (native)
Post by: EgonOlsen on July 12, 2017, 06:51:27 pm
How large is the render target?
Title: Re: Crash (native)
Post by: AeroShark333 on July 13, 2017, 01:10:18 am
On the phone I tried this on?
320x420 if I remember correctly (just the resolution of the screen in pixels)
I tried downscaling as well for the render texture (160x210 for example) but that didn't really change anything...
Title: Re: Crash (native)
Post by: EgonOlsen on July 13, 2017, 10:33:03 am
Can't be an OOM of some kind then. How does your pipeline (setting targets, blitting etc.) looks exactly?
Title: Re: Crash (native)
Post by: AeroShark333 on July 13, 2017, 12:42:51 pm
Something like this:

Code: [Select]
if (hasRenderTexture) {
this.frameBuffer.setRenderTarget(this.renderTexture);
if (hasBlitShader) {
this.frameBuffer.setBlittingShader(blitShader);
}
}
frameBuffer.clear();
~World render + draw~
Code: [Select]
if (this.hasRenderTexture) {
frameBuffer.display();
this.frameBuffer.removeRenderTarget();
if (settings.renderer_blit_shader_two_pass) {
this.frameBuffer.setRenderTarget(renderTexture2);
}
if (hasBlitShader) {
blitShader.setUniform(
EarthifyShader.SHADER_UNIFORM_TWO_PASS, 0.0f);
}
frameBuffer.blit(renderTexture, 0, renderTexture.getHeight(),
0, 0, renderTexture.getWidth(),
-renderTexture.getHeight(), frameBuffer.getWidth(),
frameBuffer.getHeight(), -1, false);

if (settings.renderer_blit_shader_two_pass) {
frameBuffer.display();
this.frameBuffer.removeRenderTarget();

// seconds pass
if (hasBlitShader) {
blitShader.setUniform(
EarthifyShader.SHADER_UNIFORM_TWO_PASS, 1.0f);
}
frameBuffer.blit(renderTexture2, 0,
renderTexture2.getHeight(), 0, 0,
renderTexture2.getWidth(),
-renderTexture2.getHeight(),
frameBuffer.getWidth(), frameBuffer.getHeight(),
-1, false);
}
if (hasBlitShader) {
this.frameBuffer.setBlittingShader(null);
}
}
~Lens flare blits~
Code: [Select]
frameBuffer.display();
Title: Re: Crash (native)
Post by: EgonOlsen on July 13, 2017, 06:22:26 pm
Hard to track this one down...could be almost everything. Have you tried without VBOs? I doubt that it's related as this is clearly a texture thing, but one never knows...
Title: Re: Crash (native)
Post by: AeroShark333 on July 13, 2017, 09:11:48 pm
I tried that with Config.useVBO = false; but no luck there...

I tried to get some more logs (yeah, the screen resolution is bigger than I thought initially... I still don't think this would cause an OOM issue however):
Not working w/ Render texture @ 4bpp
Code: [Select]
07-13 21:01:47.373: I/jPCT-AE(5038): glClearColor(0.1137255, 0.1137255, 0.1137255, 1.0) took 31000ns
07-13 21:01:47.374: I/jPCT-AE(5038): glClear(16640) took 700385ns
07-13 21:01:47.374: I/jPCT-AE(5038): glDisable(2929) took 21461ns
07-13 21:01:47.375: I/jPCT-AE(5038): glVertexPointer(3, 5132, 12, java.nio.ByteBufferAsIntBuffer[position=0,limit=5400,capacity=5400]) took 49538ns
07-13 21:01:47.375: I/jPCT-AE(5038): glEnableClientState(32884) took 14539ns
07-13 21:01:47.375: I/jPCT-AE(5038): glDisableClientState(32885) took 9077ns
07-13 21:01:47.375: I/jPCT-AE(5038): glClientActiveTexture(33984) took 12308ns
07-13 21:01:47.375: I/jPCT-AE(5038): glEnableClientState(32888) took 11230ns
07-13 21:01:47.376: I/jPCT-AE(5038): glTexCoordPointer(2, 5132, 8, java.nio.ByteBufferAsIntBuffer[position=0,limit=3600,capacity=3600]) took 37308ns
07-13 21:01:47.376: I/jPCT-AE(5038): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 26077ns
07-13 21:01:47.376: I/jPCT-AE(5038): glEnableClientState(32886) took 15462ns
07-13 21:01:47.376: I/jPCT-AE(5038): glDrawElements(4, 594, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 151308ns
07-13 21:01:47.377: I/jPCT-AE(5038): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 47153ns
07-13 21:01:47.378: I/jPCT-AE(5038): glEnableClientState(32886) took 20538ns
07-13 21:01:47.378: I/jPCT-AE(5038): glDrawElements(4, 594, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 148923ns
07-13 21:01:47.379: I/jPCT-AE(5038): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 50846ns
07-13 21:01:47.379: I/jPCT-AE(5038): glEnableClientState(32886) took 20615ns
07-13 21:01:47.379: I/jPCT-AE(5038): glDrawElements(4, 438, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 142769ns
07-13 21:01:47.379: I/jPCT-AE(5038): glEnable(2929) took 13692ns
07-13 21:01:47.385: D/jPCT-AE(5038): FBO id is -1, render buffer is -1, buffersBuffer is false(0/0/)
07-13 21:01:47.387: I/jPCT-AE(5038): glGetString(7939) took 62000ns
07-13 21:01:47.387: I/jPCT-AE(5038): return value: 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
07-13 21:01:47.388: W/jPCT-AE(5038): [ 1499972507388 ] - WARNING: Texture's size is 360/600, but textures should be square for OpenGL ES2.0! This may result in a black texture!
07-13 21:01:47.388: D/jPCT-AE(5038): Allocating native memory for 360*600 texture(false/false/false/false/): 432000 bytes!
07-13 21:01:47.389: I/jPCT-AE(5038): glGenTextures(1, java.nio.ByteBufferAsIntBuffer[position=0,limit=1,capacity=1]) took 67846ns
07-13 21:01:47.389: D/jPCT-AE(5038): New texture's id is: 11
07-13 21:01:47.390: I/jPCT-AE(5038): glActiveTexture(33984) took 18308ns
07-13 21:01:47.390: I/jPCT-AE(5038): glBindTexture(3553, 11) took 58307ns
07-13 21:01:47.390: I/jPCT-AE(5038): glTexParameterx(3553, 10241, 9729) took 23693ns
07-13 21:01:47.390: I/jPCT-AE(5038): glTexParameterx(3553, 10240, 9728) took 17615ns
07-13 21:01:47.391: I/jPCT-AE(5038): glTexParameterx(3553, 10242, 33071) took 14615ns
07-13 21:01:47.391: I/jPCT-AE(5038): glTexParameterx(3553, 10243, 33071) took 23923ns
07-13 21:01:47.391: I/jPCT-AE(5038): --------- beginning of crash
07-13 21:01:47.673: W/google-breakpad(5038): ### ### ### ### ### ### ### ### ### ### ### ### ###
07-13 21:01:47.674: W/google-breakpad(5038): Chrome build fingerprint:
07-13 21:01:47.674: W/google-breakpad(5038): 1.1.2
07-13 21:01:47.674: W/google-breakpad(5038): 8
07-13 21:01:47.674: W/google-breakpad(5038): ### ### ### ### ### ### ### ### ### ### ### ### ###
07-13 21:01:47.674: A/libc(5038): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xa4103690 in tid 5312 (GLThread 588)

Working w/ Render texture @ non-4bpp
Code: [Select]
07-13 21:09:05.024: I/jPCT-AE(8876): glClearColor(0.5803922, 0.5803922, 0.5803922, 1.0) took 46615ns
07-13 21:09:05.025: I/jPCT-AE(8876): glClear(16640) took 663231ns
07-13 21:09:05.026: I/jPCT-AE(8876): glDisable(2929) took 28000ns
07-13 21:09:05.027: I/jPCT-AE(8876): glVertexPointer(3, 5132, 12, java.nio.ByteBufferAsIntBuffer[position=0,limit=5400,capacity=5400]) took 135692ns
07-13 21:09:05.027: I/jPCT-AE(8876): glEnableClientState(32884) took 26000ns
07-13 21:09:05.027: I/jPCT-AE(8876): glDisableClientState(32885) took 17385ns
07-13 21:09:05.028: I/jPCT-AE(8876): glClientActiveTexture(33984) took 17692ns
07-13 21:09:05.028: I/jPCT-AE(8876): glEnableClientState(32888) took 20077ns
07-13 21:09:05.028: I/jPCT-AE(8876): glTexCoordPointer(2, 5132, 8, java.nio.ByteBufferAsIntBuffer[position=0,limit=3600,capacity=3600]) took 62846ns
07-13 21:09:05.029: I/jPCT-AE(8876): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 52308ns
07-13 21:09:05.029: I/jPCT-AE(8876): glEnableClientState(32886) took 29461ns
07-13 21:09:05.029: I/jPCT-AE(8876): glDrawElements(4, 594, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 197615ns
07-13 21:09:05.030: I/jPCT-AE(8876): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 77538ns
07-13 21:09:05.031: I/jPCT-AE(8876): glEnableClientState(32886) took 26385ns
07-13 21:09:05.031: I/jPCT-AE(8876): glDrawElements(4, 594, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 180769ns
07-13 21:09:05.040: I/jPCT-AE(8876): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 64077ns
07-13 21:09:05.040: I/jPCT-AE(8876): glEnableClientState(32886) took 28461ns
07-13 21:09:05.041: I/jPCT-AE(8876): glDrawElements(4, 438, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 189770ns
07-13 21:09:05.041: I/jPCT-AE(8876): glEnable(2929) took 26154ns
07-13 21:09:05.045: D/jPCT-AE(8876): FBO id is -1, render buffer is -1, buffersBuffer is false(0/0/)
07-13 21:09:05.048: I/jPCT-AE(8876): glGetString(7939) took 104077ns
07-13 21:09:05.049: I/jPCT-AE(8876): return value: 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
07-13 21:09:05.049: W/jPCT-AE(8876): [ 1499972945049 ] - WARNING: Texture's size is 360/600, but textures should be square for OpenGL ES2.0! This may result in a black texture!
07-13 21:09:05.049: D/jPCT-AE(8876): Allocating native memory for 360*600 texture(false/false/false/false/): 864000 bytes!
07-13 21:09:05.052: I/jPCT-AE(8876): glGenTextures(1, java.nio.ByteBufferAsIntBuffer[position=0,limit=1,capacity=1]) took 70847ns
07-13 21:09:05.052: D/jPCT-AE(8876): New texture's id is: 11
07-13 21:09:05.052: I/jPCT-AE(8876): glActiveTexture(33984) took 17615ns
07-13 21:09:05.052: I/jPCT-AE(8876): glBindTexture(3553, 11) took 36154ns
07-13 21:09:05.053: I/jPCT-AE(8876): glTexParameterx(3553, 10241, 9729) took 21538ns
07-13 21:09:05.053: I/jPCT-AE(8876): glTexParameterx(3553, 10240, 9728) took 17154ns
07-13 21:09:05.053: I/jPCT-AE(8876): glTexParameterx(3553, 10242, 33071) took 18000ns
07-13 21:09:05.053: I/jPCT-AE(8876): glTexParameterx(3553, 10243, 33071) took 15000ns
07-13 21:09:05.058: I/jPCT-AE(8876): glTexImage2D(3553, 0, 6408, 360, 600, 0, 6408, 5121, java.nio.DirectByteBuffer[position=0,limit=864000,capacity=864000]) took 4440692ns
07-13 21:09:05.058: I/jPCT-AE(8876): glBindTexture(3553, 1) took 27923ns
07-13 21:09:05.059: D/jPCT-AE(8876): New texture uploaded: com.threed.jpct.NPOTTexture@cd69d1f in thread Thread[GLThread 1121,5,main]
07-13 21:09:05.059: I/jPCT-AE(8876): glBindTexture(3553, 11) took 20231ns
07-13 21:09:05.061: D/jPCT-AE(8876): Creating render buffer in depth mode!
07-13 21:09:05.064: D/jPCT-AE(8876): Render buffer created: 1

I wasn't really able to reproduce this error on a non-4bpp render texture (maybe it never crashed then...) but on a 4bpp render texture it crashes about 90% of the time with this phone. (On my higher-end phone it does not crash with 4bpp enabled for the render texture).
So I initially thought the having 4bpp enabled on the render texture was the problem, though strangely... it does work sometimes (this 10%).
For now, I published the application with 4bpp disabled on the render texture and many users (who first got the crash) reported to me that it's working fine now...  ???

Working w/ Render texture @ 4bpp
Code: [Select]
07-13 21:24:52.367: I/jPCT-AE(14416): glClearColor(0.6313726, 0.6313726, 0.6313726, 1.0) took 37000ns
07-13 21:24:52.367: I/jPCT-AE(14416): glClear(16640) took 173077ns
07-13 21:24:52.368: I/jPCT-AE(14416): glDisable(2929) took 24462ns
07-13 21:24:52.368: I/jPCT-AE(14416): glActiveTexture(33984) took 18615ns
07-13 21:24:52.369: I/jPCT-AE(14416): glBindTexture(3553, 1) took 23385ns
07-13 21:24:52.371: I/jPCT-AE(14416): glVertexPointer(3, 5132, 12, java.nio.ByteBufferAsIntBuffer[position=0,limit=5400,capacity=5400]) took 68000ns
07-13 21:24:52.371: I/jPCT-AE(14416): glEnableClientState(32884) took 19846ns
07-13 21:24:52.372: I/jPCT-AE(14416): glDisableClientState(32885) took 19461ns
07-13 21:24:52.372: I/jPCT-AE(14416): glClientActiveTexture(33984) took 18000ns
07-13 21:24:52.373: I/jPCT-AE(14416): glEnableClientState(32888) took 20462ns
07-13 21:24:52.373: I/jPCT-AE(14416): glTexCoordPointer(2, 5132, 8, java.nio.ByteBufferAsIntBuffer[position=0,limit=3600,capacity=3600]) took 58000ns
07-13 21:24:52.374: I/jPCT-AE(14416): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 45693ns
07-13 21:24:52.374: I/jPCT-AE(14416): glEnableClientState(32886) took 25385ns
07-13 21:24:52.375: I/jPCT-AE(14416): glDrawElements(4, 594, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 498692ns
07-13 21:24:52.377: I/jPCT-AE(14416): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 63077ns
07-13 21:24:52.378: I/jPCT-AE(14416): glEnableClientState(32886) took 48308ns
07-13 21:24:52.379: I/jPCT-AE(14416): glDrawElements(4, 594, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 279308ns
07-13 21:24:52.381: I/jPCT-AE(14416): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 60154ns
07-13 21:24:52.381: I/jPCT-AE(14416): glEnableClientState(32886) took 22077ns
07-13 21:24:52.382: I/jPCT-AE(14416): glDrawElements(4, 438, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 266770ns
07-13 21:24:52.383: I/jPCT-AE(14416): glEnable(2929) took 24230ns
07-13 21:24:52.388: I/jPCT-AE(14416): Normal vectors calculated in 2ms!
07-13 21:24:52.390: I/jPCT-AE(14416): Tangent vectors calculated in 1ms!
07-13 21:24:52.392: I/jPCT-AE(14416): Normal vectors calculated in 2ms!
07-13 21:24:52.393: I/jPCT-AE(14416): Memory usage before compacting: 5303 KB used out of 6982 KB. Max. memory available to the VM is 262144 KB.
07-13 21:24:52.593: I/jPCT-AE(14416): Memory usage after compacting: 5250 KB used out of 6995 KB. Max. memory available to the VM is 262144 KB.
07-13 21:24:52.593: I/jPCT-AE(14416): glClearColor(0.53333336, 0.53333336, 0.53333336, 1.0) took 36153ns
07-13 21:24:52.595: I/jPCT-AE(14416): glClear(16640) took 1345231ns
07-13 21:24:52.596: I/jPCT-AE(14416): glDisable(2929) took 84231ns
07-13 21:24:52.598: I/jPCT-AE(14416): glVertexPointer(3, 5132, 12, java.nio.ByteBufferAsIntBuffer[position=0,limit=5400,capacity=5400]) took 69769ns
07-13 21:24:52.598: I/jPCT-AE(14416): glEnableClientState(32884) took 20692ns
07-13 21:24:52.599: I/jPCT-AE(14416): glDisableClientState(32885) took 398308ns
07-13 21:24:52.600: I/jPCT-AE(14416): glClientActiveTexture(33984) took 18077ns
07-13 21:24:52.600: I/jPCT-AE(14416): glEnableClientState(32888) took 19154ns
07-13 21:24:52.601: I/jPCT-AE(14416): glTexCoordPointer(2, 5132, 8, java.nio.ByteBufferAsIntBuffer[position=0,limit=3600,capacity=3600]) took 63615ns
07-13 21:24:52.601: I/jPCT-AE(14416): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 45923ns
07-13 21:24:52.602: I/jPCT-AE(14416): glEnableClientState(32886) took 70308ns
07-13 21:24:52.603: I/jPCT-AE(14416): glDrawElements(4, 594, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 586846ns
07-13 21:24:52.605: I/jPCT-AE(14416): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 61154ns
07-13 21:24:52.606: I/jPCT-AE(14416): glEnableClientState(32886) took 24077ns
07-13 21:24:52.607: I/jPCT-AE(14416): glDrawElements(4, 594, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 236231ns
07-13 21:24:52.609: I/jPCT-AE(14416): glColorPointer(4, 5132, 16, java.nio.ByteBufferAsIntBuffer[position=0,limit=7200,capacity=7200]) took 60616ns
07-13 21:24:52.609: I/jPCT-AE(14416): glEnableClientState(32886) took 24077ns
07-13 21:24:52.610: I/jPCT-AE(14416): glDrawElements(4, 438, 5123, java.nio.ByteBufferAsShortBuffer[position=0,limit=3600,capacity=3600]) took 267770ns
07-13 21:24:52.611: I/jPCT-AE(14416): glEnable(2929) took 24693ns
07-13 21:24:52.613: D/jPCT-AE(14416): FBO id is -1, render buffer is -1, buffersBuffer is false(0/0/)
07-13 21:24:52.614: I/jPCT-AE(14416): glGetString(7939) took 70769ns
07-13 21:24:52.615: I/jPCT-AE(14416): return value: 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
07-13 21:24:52.615: W/jPCT-AE(14416): [ 1499973892615 ] - WARNING: Texture's size is 360/600, but textures should be square for OpenGL ES2.0! This may result in a black texture!
07-13 21:24:52.616: D/jPCT-AE(14416): Allocating native memory for 360*600 texture(false/false/false/false/): 432000 bytes!
07-13 21:24:52.621: I/jPCT-AE(14416): glGenTextures(1, java.nio.ByteBufferAsIntBuffer[position=0,limit=1,capacity=1]) took 90615ns
07-13 21:24:52.622: D/jPCT-AE(14416): New texture's id is: 11
07-13 21:24:52.622: I/jPCT-AE(14416): glActiveTexture(33984) took 22154ns
07-13 21:24:52.623: I/jPCT-AE(14416): glBindTexture(3553, 11) took 115538ns
07-13 21:24:52.624: I/jPCT-AE(14416): glTexParameterx(3553, 10241, 9729) took 24154ns
07-13 21:24:52.624: I/jPCT-AE(14416): glTexParameterx(3553, 10240, 9728) took 18846ns
07-13 21:24:52.625: I/jPCT-AE(14416): glTexParameterx(3553, 10242, 33071) took 19461ns
07-13 21:24:52.625: I/jPCT-AE(14416): glTexParameterx(3553, 10243, 33071) took 18000ns
07-13 21:24:52.636: I/jPCT-AE(14416): glTexImage2D(3553, 0, 6408, 360, 600, 0, 6408, 5121, java.nio.DirectByteBuffer[position=0,limit=432000,capacity=432000]) took 10327692ns
07-13 21:24:52.637: I/jPCT-AE(14416): glBindTexture(3553, 1) took 26769ns
07-13 21:24:52.637: D/jPCT-AE(14416): New texture uploaded: com.threed.jpct.NPOTTexture@27cf779 in thread Thread[GLThread 1559,5,main]
07-13 21:24:52.638: I/jPCT-AE(14416): glBindTexture(3553, 11) took 23693ns
07-13 21:24:52.638: D/jPCT-AE(14416): Creating render buffer in depth mode!
07-13 21:24:52.640: D/jPCT-AE(14416): Render buffer created: 1
Title: Re: Crash (native)
Post by: EgonOlsen on July 14, 2017, 09:51:33 pm
Might be a driver problem of some kind or an oversight on my side, but I've no idea what it's supposed to be...
Title: Re: Crash (native)
Post by: AeroShark333 on July 15, 2017, 09:39:15 am
Well apparently having a 4bpp render texture causes problems for me on older Andreno's and Mali's. A non-4bpp render texture pretty much solved everything instantly...
Title: Re: Crash (native)
Post by: AeroShark333 on January 23, 2018, 11:10:32 am
Still getting these mysterious SIGSEGV errors..

Crash log #1: https://pastebin.com/xtCdy0Yk (line #141)
Working log #2: https://pastebin.com/9Ngvzg2Q (line #337)

So it seems that glDrawElements(...) is causing a crash here, although it is not always happening which I still don't really understand.

I tried to make it use glDrawArrays(...) by invoking build(false) and compile(false,false) but no luck there, same story: random crashes but sometimes works.

All textures do load, but when the first World draw call is made, it might crash.

EDIT:
Another unrelated question I always wondered about:
Why is TextureManager static and why isn't it designed in such way that you can have multiple TextureManagers (for multiple renderers)?

EDIT2:
I seem to be having issues with render target textures. Everytime I change device orientation I create a new render texture so it'd fit the rotated screen dimensions. However, I seem to be getting a memory leak here... How I do this:
-> start
-> on surface changed (): create rendertargettexture and add to texturemanager with a specific name
-> on draw (): use rendertexture
-> change screen orientation
-> on surface changed (): set rendertargettexture reference to null + unload&remove rendertargettexture using specific name + add new rendertargettexture with new dimensions
-> on draw (): use new rendertexture
While this all works fine, it seems to fill my device's memory if I keep changing the screen orientation.
Without using rendertargettexture, RAM usage might also increase a little when changing screen orientation but it'd get GC'ed and RAM usage will drop again.
Title: Re: Crash (native)
Post by: AeroShark333 on February 02, 2018, 11:05:03 am
Hello?
Title: Re: Crash (native)
Post by: EgonOlsen on February 05, 2018, 09:50:32 am
Sorry, I haven't spotted your question ealier. The upload method works only at render time, i.e. if you call unload, it doesn't really unload but waits for the next render call and then does the unloading. That's because it has to happen in the GL thread or otherwise, there's nothing to unload.
If you rotate the device, it might be that the actual context is already lost (or onDrawFrame not called anymore on it) so that the unload never happens but somehow the driver keeps the copy in memory (albeit it shouldn't, because it should be bound to the context and if that changes, it should go away).
If you sure to be in the right thread, you can try to set Config.unloadImmediately to true and see if that helps.
Title: Re: Crash (native)
Post by: AeroShark333 on February 06, 2018, 06:12:48 pm
Uhm, I'm not sure if the context is lost...
I don't re-initialize the Framebuffer ever (I just use #resize() whenever the device is rotated).

I already had Config.unloadImmediately set to true, which did not work... Setting it to false did not work either unfortunately.
Whenever I don't use a rendertexture but just the FrameBuffer, RAM usage does not increase on screen rotations.

Is there perhaps a rotate function/method possible for rendertextures/NPOTTextures since screen rotations usually just swap the width and the height? (But these rendertextures would hold the same amount of data eventually for the different orientations)
Probably my solution for now would be to create these two rendertextures at start (one with default orientation and one with rotated orientation) and just switch between these two rendertextures.

---

Another thing about my application:
I don't keep my texturedata for rendertextures nor any other texture in VM.
TextureManager.getMemoryUsage() would indeed show that just 1024 bytes is stored by the VM. (Basically nothing)
However, when I use "Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()", it would show that there's muuuch RAM usage more by the VM, up to 300 megabytes (by jPCT, I assume). What could be using all the RAM?
Title: Re: Crash (native)
Post by: EgonOlsen on February 07, 2018, 10:44:31 am
To answer your last question: The textures and other native data is using that RAM.

About the render targets: As long as you don't create a new FrameBuffer, nothing happens for the textures if your rotate the device. However, I've no idea how it's supposed to work that way, because rotating the device should destroy the context (simply because width and height are changing) and so you should need a new instance of the buffer. But anyway...as long as the buffer doesn't change, there's actually no need to unload the render target texture at all. Have you tried what happens if you don't do that at all?
Title: Re: Crash (native)
Post by: AeroShark333 on February 08, 2018, 09:26:41 pm
To answer your last question: The textures and other native data is using that RAM.
Ah understood.

About the render targets: As long as you don't create a new FrameBuffer, nothing happens for the textures if your rotate the device.
Yes, they are fine if the device is rotated

However, I've no idea how it's supposed to work that way, because rotating the device should destroy the context (simply because width and height are changing) and so you should need a new instance of the buffer.
Well it is a live wallpaper, and live wallpapers are able to preserve EGL context on pause (or something like that).
https://developer.android.com/reference/android/opengl/GLSurfaceView.html#setPreserveEGLContextOnPause(boolean)
So whenever the device is rotated, onSurfaceChanged(...) is called again, and here I can resize the already existing FrameBuffer to the new width and height.

But anyway...as long as the buffer doesn't change, there's actually no need to unload the render target texture at all. Have you tried what happens if you don't do that at all?
I tried that... but the render target won't have the right dimensions then and it will give weird results on screen.
Let's say I start the wallpaper in portrait mode.
I would create a 1440 x 2560 FrameBuffer (width x height)
And at the same time I'd create a 1440 x 2560 NPOTTexture for the render texture.
All fine here.
Now if I change the orientation to landscape, I'd resize the FrameBuffer to 2560x1440 (width x height). (Notice that the values are now swapped)
But the rendertexture is still 1440 x 2560, so I remove this texture from the texturemanager and add a new 2560 x 1440 NPOTTexture.

Removing without unloading did not change anything, still filling memory...

I actually have the feeling that unloading textures does not completely work...
Whenever I open a second live wallpaper instance (using preview) it seems that the textures of that instance aren't unloaded whenever the preview instance is 'killed'.
It is like the primary live wallpaper instance is preventing the other textures to get unloaded or something
(Unless all instances are killed it will all be gone)
Title: Re: Crash (native)
Post by: EgonOlsen on February 09, 2018, 12:13:06 pm
As mentioned, unloading of texture data from the GPU's memory has to happen in the GL rendering thread with a valid context. Otherwise, there nothing to unload it from. If the OS destroys a GL context, the graphics driver should actually free the associated memory. If that doesn't happen...well, I can't do anything about it then.
Have you tried this on some other device witha different GPU? Does it behave the same?
Title: Re: Crash (native)
Post by: AeroShark333 on February 11, 2018, 05:31:40 pm
I tested rendertarget textures with rotating screen on the following devices

Code: [Select]
My device (ZTE Axon 7 @ Android 7.1.1 Custom ROM):
-> Low VM RAM (discard what I said about 300 MB RAM usage in VM earlier... It's about 30 MB actually (I guess my eyes added a digit... derp))
-> No memoryleak when rotating screen in VM (but there is in native/video memory)
-> However, in developer options -> Active services, the RAM usage keeps rising (300+ MB+ here (could go much higher though (1,8+ GB after many many screen rotations => device will kill other processes and might even reboot here) so I suppose it's not VM but native+video+VM that is being displayed here)

Some old tablet (Difrnce DIT4350 @ Android 4.0.4)
-> Low VM RAM
-> No memory leak with rendertarget textures
-> Crashes after many screen rotations..?

Old tablet 2 (Asus TF101 @ Android 4.0.3)
-> Low VM RAM
-> Crashes after many screen rotations?

Emulator #1 (Android 4.1.1):
-> Low VM RAM
-> No memory leak with rendertarget textures in VM

Emulator #2 (Android 4.2.2):
-> Low VM RAM
-> No memory leak with rendertarget textures in VM

Emulator #3 (Android 7.1.0):
-> Low VM RAM
-> No memory leak with rendertarget textures in VM
-> I don't see the VM+Video+Native memory usage as high as on my own device here in developer options... Unloading seems to work just fine here
-> No memory leak with rendertarget textures in native+video

For the sake of clarity also a test without rendertarget textures on my main device:
Code: [Select]
-> Low VM RAM
-> No memoryleak with rotating screen
-> Memoryleak with renderers when restarted in native+video RAM (renderer restarts when a setting is changed)

How does it restart:
-> Change a setting
-> (I believe it still uses the same GL context as before)
-> Removing and unloading textures from texturemanager (but it won't go through another draw call to actually unload them I suppose...)
-> Framebuffer is disposed
-> Reference to the renderer is gone now
-> A new Framebuffer is created
Now that I think of it... I think I could re-use the framebuffer... :|
10 minutes later... -> Re-using the same FrameBuffer but the memory leak remains..?

In the end, it seems that textures aren't unloaded untill the whole wallpaper engine is killed.
(restarting doesn't kill the wallpaper engine...)

Starting to think it could be a driver issue on my device... Egh

I'll try to test it with other physical devices
Title: Re: Crash (native)
Post by: AeroShark333 on February 27, 2018, 01:59:50 pm
For now I'll just assume my device is the only device with this unloading issue... Oh well, it's a custom ROM...

Anyway, about the SIGSEGV error that keeps happening at the first world draw call, I think it's because of my custom shaders... Which I don't really understand though...
On most high-end devices there are no issues at all with my custom shaders
And I don't really understand why the default shaders would work just fine (always..) while they look more complicated than some of the custom shaders I'm using. Although, on devices where my custom shaders crash, it does NOT always crash, which completely blows my mind... It seems to happen just randomly basically.

Unlike the default shader, my custom shaders use:
-> pre-processor things with #
-> setting uniform variables in onDraw
-> defined functions within the shader
Though, I don't think these are really the issue...

While Googling this issue I did find some weird OpenGLES shader crash reports by other people that could be solved by work-arounds such as changing the order of operands...???
Anyway, what would be do's and don't for writing a GLES shader? Or maybe: how did you manage to create the 'perfect?' default shader which never seems to crash?
Does jPCT-AE perhaps treat custom shaders differently than default shaders?

Another thing that seems to reduce the probability of the random crash at the first draw call was to use lower polygon models...

Also... What could be an explanation of the randomness of the crashes since it does not always happen, well the positions of the Object3D's are always different but would that make a huge difference...? I'd think not but apart from that nothing else is really different and yet it somehow manages to render/crash
And once the first draw call has successfully completed (assuming all Object3D's are visible) then it won't crash in future world draw calls

Another possible solution: increase the buffersize of the framebuffer even more? I thought Config.blittingMode = 8; did impact the probability of crashing in a positive way (I think it had to do with vertex upload buffer maybe, I don't really know...)
Is there any way for me to determine what is actually causing the crash as in which call in the jPCT-AE jar is causing the SIGSEGV error?
Might help for solving the issue...
Title: Re: Crash (native)
Post by: AeroShark333 on March 04, 2018, 04:43:10 pm
Okay nevermind, it crashes with default shaders too :| It just seems more likely with my custom shaders though...
But increasing the buffer size to 1800 did help a little, is it possible to increase it even more?
Why is the default 600 anyway? And what units are these 1800? Bytes I assume?

Another thing that helped a lot is reducing polygon count per mesh but yeah... that'd reduce quality...

LOGS:
Working: https://pastebin.com/n08EE8VR
Not working: https://pastebin.com/AuQF8NTm
Title: Re: Crash (native)
Post by: EgonOlsen on March 05, 2018, 10:01:12 am
Which buffer size do you mean exactly? And which device are you using to test this?
Title: Re: Crash (native)
Post by: AeroShark333 on March 05, 2018, 04:34:03 pm
Which buffer size do you mean exactly?
03-05 10:19:44.749: I/jPCT-AE(2711): Blitting buffer size: 600
^ this one

I tried to test with the default Config.blittingMode and with Config.blittingMode = 8;
I used higher polygon count models for this test.
Compat mode => Config.blittingMode = 8;
No compat mode => Default Config.blittingMode
Code: [Select]
compat mode:
runs: 10
succes: 5
crashes: 5

no compat mode:
runs: 10
succes: 1
crashes: 9

compat mode:
runs: 10
succes: 4
crashes: 6

no compat mode:
runs: 10
succes: 0
crashes: 10

compat mode:
runs: 10
succes: 5
crashes: 5

no compat mode:
runs: 10
succes: 0
crashes: 10
As you can see it drops the chance of crashing from ~96% to ~53%.
Whether this is just a coincidence, I can't tell but I tested this multiple times (swapping between the two config values after every 10 runs).

And which device are you using to test this?
I'm currently using a Genymotion emulator (With a Nexus 5, Android 5.0.1 build) to reproduce these crashes. (I can reproduce crash on older physical devices, just to make sure... Plus many people reported this SIGSEGV crash through the Google Play Store and I think I can assume they are not using an emulator...  ??? )
Title: Re: Crash (native)
Post by: EgonOlsen on March 06, 2018, 09:26:01 am
No, they aren't using an emulator for sure, but...from my own experience, crashes happen mostly on MALI-based GPUs. Can you confirm this based on the Google Play stats?
Title: Re: Crash (native)
Post by: AeroShark333 on March 06, 2018, 12:32:34 pm
All devices with SIGSEGV's (for https://play.google.com/store/apps/details?id=com.aeroshark333.artofearthify):
Samsung Galaxy J1 Ace => Mali-400MP2 or Vivante GC7000 UL - J110L
Motorola Moto E4 (2nd Gen) => Mali-T720
Xiaomi Mi A1 => Adreno 506
Samsung Galacy Note 3 => Adreno 330 - N9005, N9002 or Mali-T628 MP6 - N9000
Lenovo K5 => Adreno 405 or Mali-T860MP2
LGE LG Aristo => Adreno 308

Another app of mine with SIGSEGV's (for https://play.google.com/store/apps/details?id=com.aeroshark333.skinviewer):
Huawei MediaPad => Adreno 220
Samsung Galaxy S3 Neo => Adreno 305
Samsung Galaxy Note 2 => Mali-400MP4
LGE L20 => Mali-400
ZTE Lever Z936L => Adreno 306
Huawei Mate 9 => Mali-G71 MP8
HTC U11+ =>Adreno 540
Motorola Moto X4 => Adreno 508
General Mobile GM6 => Mali-T720 MP2
OnePlus 3T => Adreno 530
Xiaomi Mi A1 => Adreno 506
Samsung Galaxy Tab E 8.0 => Adreno 306
Motorola Moto C Plus => Mali-T720MP2
Samsung Galaxy Tab A 10.1 (2016) => Mali-T830 MP2
Motorola Moto C =>    Mali-T720MP2
Samsung Galaxy Tab 3 Lite 7.0 => Vivante GC1000 (according to specs website but logs mention "libGLES_mali.so"...)
Samsung Galaxy On7 => Adreno 306
LGE Nexus 5X => Adreno 418
Huawei P8 Lite => Mali-T830MP2

So it's mostly (or only?) Adreno/Mali based GPU's for me

I found this while Googling around: https://stackoverflow.com/questions/30825386/android-opengl-fatal-signal-11-sigsegv-code-2
I tried the same code on the Nexus 5 emulator and I got some similar results.
=> size = 10000; would crash
=> size = 3000; would work
=> size = 5000; would crash
=> size = 3500; would crash sometimes?
When it works, I would show nothing but it would keep 'drawing' and not crashing
Adding floatBuffer.rewind(); after giving it values would fix the issue for any size (and it'd actually show something when drawing.. lol).
I'm not sure if this could be helpful but I sure found it interesting.
Title: Re: Crash (native)
Post by: EgonOlsen on March 06, 2018, 04:41:06 pm
That looks more like the normal distribution of GPUs in the Android market than anything else. The stackoverflow post doesn't help either. Of course, I'm rewinding the buffers. Otherwise, it wouldn't be able to render anything in the first place.

Personally, I just accepted a certain "crash rate". It just happens on some devices, may it be caused by driver errors or by some custom rom that has some great "optimization" in it that just doesn't work.

Any ideas about which "in the wild" crash rate we are taking here? 50% 1% 0.1%...any clues?

And because fiddling around with the blitting config seems to changes things for you: Are you actually blitting stuff? What happens if you don't?
Title: Re: Crash (native)
Post by: AeroShark333 on March 06, 2018, 11:47:40 pm
Any ideas about which "in the wild" crash rate we are taking here? 50% 1% 0.1%...any clues?
Well it depends on the context..? Higher polygon count seems to make it more likely to crash. While lower polygon models don't crash at all...

And because fiddling around with the blitting config seems to changes things for you: Are you actually blitting stuff? What happens if you don't?
Yes, I do blit things before the first world.draw() call.
=> Texture blits (some of these textures are used for the Object3D's, so the textures get uploaded to the GPU and removed from VM heap memory)
=> Loading screen (probably 50+ blits of a 2x2 texture with variable greyscale color) per frame

I tried to comment out the texture blits (so they'd stay in VM heap memory) => it would still crash
But when I removed all blits (texture+loading blits) before the first draw call, it would work fine.

Also, only have texture blits (without loading screen blits) would still be able to crash but not so likely.

Interesting results I guess...

I once again tested the crashing likelyness (with higher polygon models and with blitting before the first world.draw() call)
=> Config.blittingMode = 8
Runs: 25
Crashes: 17
Result: More than the 50% of last time...
=> Default Config.blittingMode
Runs: 25
Crashes 25
Result: About the same result as last time (100% vs. 96%)

So could it be that blitting anything before having all Object3D data loaded could cause this SIGSEGV issue?

PS: I actually do blit (2D background behind 3D world) before calling the first world.draw() in the other app too actually...
Title: Re: Crash (native)
Post by: EgonOlsen on March 07, 2018, 07:42:51 am
Blitting is just like rendering an object except that the data of that "blitting object" is dynamic and changes every frame. That's not a problem per se, animate objects do exactly the same. A lot of apps using jPCT-AE are doing it all the time (including mine) without any problems. However, I'm well aware that it might cause trouble, which is why there are these config settings for it (which are just some shots in the dark as well). The actual problem is, that I've no idea why this happens and when. I've checked the code at least a dozen times because of this and it's just fine. It's the same code that desktop jPCT uses as well and it doesn't have this problem. My current app is blitting stuff before doing anything else and that is fine as well.

Your apps...are these all wallpapers or standard apps?
Title: Re: Crash (native)
Post by: AeroShark333 on March 07, 2018, 07:53:49 pm
A lot of apps using jPCT-AE are doing it all the time (including mine) without any problems. However, I'm well aware that it might cause trouble, which is why there are these config settings for it (which are just some shots in the dark as well). The actual problem is, that I've no idea why this happens and when. I've checked the code at least a dozen times because of this and it's just fine.

Well yeah, I'm unable to reproduce this SIGSEGV error on most of my devices too, it'd work just fine with the way I render everything now.
And I'm not sure if this blitting before the uploading the Object3D data is actually the issue for all the SIGSEGV reports I got, maybe it would only solve the problem for the emulator.

Your apps...are these all wallpapers or standard apps?
Mixed, however I can run the renderer class in a regular Android Activity too but that'd not really make much of a difference..?
The app I'm currently working on is the wallpaper app, and the other app is a 'standard app' I'd say.

My best workaround/solution for now would be to make sure the Object3D's I'm using are uploaded to the GPU before blitting anything.
Which I'll try to implement soon so I can see if people would still get SIGSEGV's after this.
Though, there's one problem... How can I set textures to my Object3D's after building and compiling them?
If I remember correctly it'd have a delay or something before the textures get visibly applied or something if you do it this way.
Title: Re: Crash (native)
Post by: EgonOlsen on March 08, 2018, 09:07:42 am
Though, there's one problem... How can I set textures to my Object3D's after building and compiling them?
If I remember correctly it'd have a delay or something before the textures get visibly applied or something if you do it this way.
...I'm not sure what you mean by that...???
Title: Re: Crash (native)
Post by: AeroShark333 on March 09, 2018, 12:07:55 am
Oh... Ehm, nevermind maybe it was scaling..? Ah nevermind this.

However, is it safe to apply textures after having having the Object3D's built and compiled?
It seemed to work just fine? Though, not sure about performance...
However, a multi-textured TextureInfo would give an ArrayOutOfBoundsException when I apply the TextureInfo after having built and compiled.

I also wondered if 16k and 32k textures could be enabled, devices these days can handle quite a lot hehe :)
Title: Re: Crash (native)
Post by: EgonOlsen on March 09, 2018, 08:18:03 am
Yes, it's save and it's cheap. However, compiling the object fixes the texture stage count for it. That's why you are getting that exception with the TextureInfo. YOu could assign a TextureInfo with the same amount of stage but using some dummy textures, compile, assing the actual textures. That should actually work.

16k and 32k...it's absurd IMHO to use those. A 16k texture with 32bit and no compression but mipmaps would require ~2GB auf GPU memory and almost the same in VM memory. Still not very feasible IMHO.
Title: Re: Crash (native)
Post by: AeroShark333 on March 10, 2018, 01:50:35 am
Yes, it's save and it's cheap. However, compiling the object fixes the texture stage count for it. That's why you are getting that exception with the TextureInfo. YOu could assign a TextureInfo with the same amount of stage but using some dummy textures, compile, assing the actual textures. That should actually work.
Alright, thanks for the help! :)

16k and 32k...it's absurd IMHO to use those. A 16k texture with 32bit and no compression but mipmaps would require ~2GB auf GPU memory and almost the same in VM memory. Still not very feasible IMHO.
Hmmm yeah, I understand... Though that would be true for squared textures but for me just one dimension would be okay. I can already kind of use 16384x4096 textures on my phone using NPOTTexture (which I guess is kind of a hack-ish way to surpass the 8192 limit restricted by jPCT. So well yeah...
Title: Re: Crash (native)
Post by: EgonOlsen on March 11, 2018, 05:18:59 pm
Try this jar: http://jpct.de/download/beta/jpct_ae.jar (http://jpct.de/download/beta/jpct_ae.jar)

It should support textures up to 16384 in size.
Title: Re: Crash (native)
Post by: AeroShark333 on March 18, 2018, 04:38:30 pm
Yes, it's save and it's cheap. However, compiling the object fixes the texture stage count for it. That's why you are getting that exception with the TextureInfo. YOu could assign a TextureInfo with the same amount of stage but using some dummy textures, compile, assing the actual textures. That should actually work.
So I tried this with two TextureInfo's (one 3-layered with dummy textureID and one 3-layered with the actual textureID's) but I am still getting the Exception.

Code: [Select]
final int dummyID = textureManager.getTextureID(textureManager.getNameByTexture(textureManager.getDummyTexture()));
final TextureInfo ti = new TextureInfo(dummyID);
ti.add(dummyID, TextureInfo.MODE_ADD);
ti.add(dummyID, TextureInfo.MODE_ADD);

obj.setTexture(ti);
obj.build();
obj.compile();
obj.strip();

world.addObject(obj);
world.renderScene(frameBuffer);
world.draw(frameBuffer);

This is how I first load the Object3D with 3 (not even sure if it actually gives 3...) texturelayers.

But when I apply the real TextureInfo (after loading Textures and getting their ID's) it will crash:
Code: [Select]
03-18 11:35:18.768: E/AndroidRuntime(4487): java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
03-18 11:35:18.768: E/AndroidRuntime(4487): at com.threed.jpct.Object3D.setTexture(Object3D.java:3660)
When the real TextureInfo only holds one texture(layer) it won't crash... So it doesn't really seem to set 3 layers using the dummy textures or something..?

EDIT:
I moved the obj.strip() line to after applying the real TextureInfo, which seemed to fix it...
Title: Re: Crash (native)
Post by: EgonOlsen on March 18, 2018, 08:36:56 pm
Interesting...maybe I'm stripping dummy texture layers away...I'm not sure ATM, but if it works now... ;)
Title: Re: Crash (native)
Post by: AeroShark333 on April 06, 2018, 12:08:44 am
Okay, good and bad news I guess:

Good news:
The SIGSEGV reports seemed to have stopped (on Android 7.1.2 and below at least..).
So the solution to have all vertices/Object3D's loaded to the GPU before any blit/texture data upload seemed to have worked..?

Bad news:
However, I've been getting a new SIGSEGV error now (which only seems to happen on Android 8.0..?):
Crashreport:
On OnePlus 5T and Huawei P20 Lite
Code: [Select]
backtrace:
  #00  pc 000000000030b868  /system/lib64/libskia.so (_ZN15SkScalerContext10getMetricsEP7SkGlyph+40)
  #01  pc 0000000000283b0c  /system/lib64/libskia.so (_ZN12SkGlyphCache16allocateNewGlyphE15SkPackedGlyphIDNS_11MetricsTypeE+360)
  #02  pc 000000000028396c  /system/lib64/libskia.so (_ZN12SkGlyphCache17getGlyphIDMetricsEt+16)
  #03  pc 0000000000278b20  /system/lib64/libskia.so (_ZN19SkFindAndPlaceGlyph26GlyphFindAndPlaceFullPixelIR12DrawOneGlyphLN7SkPaint5AlignE0ELNS_13SelectKerningE0EE20findAndPositionGlyphEPPKc7SkPointS2_+40)
  #04  pc 0000000000276040  /system/lib64/libskia.so (_ZN19SkFindAndPlaceGlyph14ProcessPosTextIR12DrawOneGlyphEEvN7SkPaint12TextEncodingEPKcm7SkPointRK8SkMatrixPKfiNS3_5AlignEP12SkGlyphCacheOT_+972)
  #05  pc 0000000000275bb8  /system/lib64/libskia.so (_ZNK6SkDraw11drawPosTextEPKcmPKfiRK7SkPointRK7SkPaintPK14SkSurfaceProps+400)
  #06  pc 00000000001f41d4  /system/lib64/libskia.so (_ZN14SkBitmapDevice11drawPosTextEPKvmPKfiRK7SkPointRK7SkPaint+112)
  #07  pc 000000000026ee40  /system/lib64/libskia.so (_ZN12SkBaseDevice12drawTextBlobEPK10SkTextBlobffRK7SkPaintP12SkDrawFilter+432)
  #08  pc 0000000000215068  /system/lib64/libskia.so (_ZN8SkCanvas14onDrawTextBlobEPK10SkTextBlobffRK7SkPaint+500)
  #09  pc 0000000000215a20  /system/lib64/libskia.so (_ZN8SkCanvas12drawTextBlobEPK10SkTextBlobffRK7SkPaint+236)
  #10  pc 00000000002600b4  /system/lib64/libskia.so (_ZN23SkColorSpaceXformCanvas14onDrawTextBlobEPK10SkTextBlobffRK7SkPaint+84)
  #11  pc 0000000000215a20  /system/lib64/libskia.so (_ZN8SkCanvas12drawTextBlobEPK10SkTextBlobffRK7SkPaint+236)
  #12  pc 0000000000095f78  /system/lib64/libhwui.so (_ZN7android10SkiaCanvas10drawGlyphsEPKtPKfiRK7SkPaintfffffff+300)
  #13  pc 0000000000037684  /system/lib64/libhwui.so (_ZN7android15DrawTextFunctorclEmm+368)
  #14  pc 0000000000037194  /system/lib64/libhwui.so (_ZN7android12MinikinUtils10forFontRunINS_15DrawTextFunctorEEEvRKN7minikin6LayoutEPNS_5PaintERT_+276)
  #15  pc 0000000000036f98  /system/lib64/libhwui.so (_ZN7android6Canvas8drawTextEPKtiiiffiRKNS_5PaintEPNS_8TypefaceE+356)
  #16  pc 0000000000130b18  /system/lib64/libandroid_runtime.so (_ZN7android9CanvasJNIL14drawTextStringEP7_JNIEnvP8_jobjectlP8_jstringiiffill+136)
  #17  pc 0000000000b5f6b4  /system/framework/arm64/boot-framework.oat (android.graphics.BaseCanvas.nDrawText [DEDUPED]+244)
  #18  pc 0000000000b62cd8  /system/framework/arm64/boot-framework.oat (android.graphics.BaseCanvas.drawText+216)
  #19  pc 0000000000b74924  /system/framework/arm64/boot-framework.oat (android.graphics.Canvas.drawText+52)
  #20  pc 000000000128b2e8  /system/framework/arm64/boot-framework.oat (android.text.BoringLayout.draw+136)
  #21  pc 0000000001540fb4  /system/framework/arm64/boot-framework.oat (android.widget.TextView.onDraw+3316)
  #22  pc 00000000010f6b90  /system/framework/arm64/boot-framework.oat (android.view.View.draw+256)
  #23  pc 00000000010f8360  /system/framework/arm64/boot-framework.oat (android.view.View.draw+3616)
  #24  pc 00000000013c64d4  /system/framework/arm64/boot-framework.oat (android.view.ViewGroup.drawChild+68)
  #25  pc 00000000013c1248  /system/framework/arm64/boot-framework.oat (android.view.ViewGroup.dispatchDraw+1464)
  #26  pc 00000000010f6ba8  /system/framework/arm64/boot-framework.oat (android.view.View.draw+280)
  #27  pc 0000000000509384  /system/lib64/libart.so (art_quick_invoke_stub+580)
  #28  pc 00000000000d8078  /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+200)
  #29  pc 00000000002821dc  /system/lib64/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+352)
  #30  pc 000000000027c8a4  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+672)
  #31  pc 00000000004f3d30  /system/lib64/libart.so (MterpInvokeVirtualQuick+680)
  #32  pc 00000000004fea94  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #33  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #34  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #35  pc 000000000027c884  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #36  pc 00000000004f1e78  /system/lib64/libart.so (MterpInvokeDirect+504)
  #37  pc 00000000004fae14  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #38  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #39  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #40  pc 000000000027c884  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #41  pc 00000000004f1e78  /system/lib64/libart.so (MterpInvokeDirect+504)
  #42  pc 00000000004fae14  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #43  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #44  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #45  pc 000000000027c884  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #46  pc 00000000004f3d30  /system/lib64/libart.so (MterpInvokeVirtualQuick+680)
  #47  pc 00000000004fea94  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #48  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #49  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #50  pc 000000000027d6f4  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb1ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+584)
  #51  pc 00000000004f3754  /system/lib64/libart.so (MterpInvokeDirectRange+424)
  #52  pc 00000000004fb114  /system/lib64/libart.so (ExecuteMterpImpl+15252)
  #53  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #54  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #55  pc 000000000027c884  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #56  pc 00000000004f1e78  /system/lib64/libart.so (MterpInvokeDirect+504)
  #57  pc 00000000004fae14  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #58  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
  #59  pc 0000000000263d20  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #60  pc 000000000027c884  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #61  pc 00000000004f1e78  /system/lib64/libart.so (MterpInvokeDirect+504)
  #62  pc 00000000004fae14  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #63  pc 000000000025d620  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)

Galaxy S8 And Galaxy S8+
Code: [Select]
backtrace:
  #00  pc 00400e60f947a908  <unknown>
  #01  pc 0000000000330400  /system/lib64/libskia.so (_ZN15SkScalerContext10getMetricsEP7SkGlyph+48)
  #02  pc 000000000029f404  /system/lib64/libskia.so (_ZN12SkGlyphCache16allocateNewGlyphE15SkPackedGlyphIDNS_11MetricsTypeE+372)
  #03  pc 000000000029f250  /system/lib64/libskia.so (_ZN12SkGlyphCache17getGlyphIDMetricsEt+16)
  #04  pc 0000000000293b38  /system/lib64/libskia.so (_ZN19SkFindAndPlaceGlyph26GlyphFindAndPlaceFullPixelIR12DrawOneGlyphLN7SkPaint5AlignE0ELNS_13SelectKerningE0EE20findAndPositionGlyphEPPKc7SkPointS2_+40)
  #05  pc 0000000000290ecc  /system/lib64/libskia.so (_ZN19SkFindAndPlaceGlyph14ProcessPosTextIR12DrawOneGlyphEEvN7SkPaint12TextEncodingEPKcm7SkPointRK8SkMatrixPKfiNS3_5AlignEP12SkGlyphCacheOT_+940)
  #06  pc 0000000000290a60  /system/lib64/libskia.so (_ZNK6SkDraw11drawPosTextEPKcmPKfiRK7SkPointRK7SkPaintPK14SkSurfaceProps+400)
  #07  pc 000000000020ad00  /system/lib64/libskia.so (_ZN14SkBitmapDevice11drawPosTextEPKvmPKfiRK7SkPointRK7SkPaint+112)
  #08  pc 00000000002897e4  /system/lib64/libskia.so (_ZN12SkBaseDevice12drawTextBlobEPK10SkTextBlobffRK7SkPaintP12SkDrawFilter+436)
  #09  pc 000000000022e1cc  /system/lib64/libskia.so (_ZN8SkCanvas14onDrawTextBlobEPK10SkTextBlobffRK7SkPaint+524)
  #10  pc 000000000022ebbc  /system/lib64/libskia.so (_ZN8SkCanvas12drawTextBlobEPK10SkTextBlobffRK7SkPaint+236)
  #11  pc 0000000000279fc4  /system/lib64/libskia.so (_ZN23SkColorSpaceXformCanvas14onDrawTextBlobEPK10SkTextBlobffRK7SkPaint+84)
  #12  pc 000000000022ebbc  /system/lib64/libskia.so (_ZN8SkCanvas12drawTextBlobEPK10SkTextBlobffRK7SkPaint+236)
  #13  pc 000000000009d92c  /system/lib64/libhwui.so (_ZN7android10SkiaCanvas10drawGlyphsEPKtPKfiRK7SkPaintfffffff+300)
  #14  pc 0000000000039380  /system/lib64/libhwui.so (_ZN7android15DrawTextFunctorclEmm+368)
  #15  pc 0000000000038e84  /system/lib64/libhwui.so (_ZN7android12MinikinUtils10forFontRunINS_15DrawTextFunctorEEEvRKN7minikin6LayoutEPNS_5PaintERT_+276)
  #16  pc 0000000000038c84  /system/lib64/libhwui.so (_ZN7android6Canvas8drawTextEPKtiiiffiRKNS_5PaintEPNS_8TypefaceE+356)
  #17  pc 0000000000177448  /system/lib64/libandroid_runtime.so (_ZN7android9CanvasJNIL14drawTextStringEP7_JNIEnvP8_jobjectlP8_jstringiiffill+136)
  #18  pc 0000000000bb5f34  /system/framework/arm64/boot-framework.oat (android.graphics.BaseCanvas.nDrawText [DEDUPED]+244)
  #19  pc 0000000000bb95d4  /system/framework/arm64/boot-framework.oat (android.graphics.BaseCanvas.drawText+244)
  #20  pc 0000000000bcaad4  /system/framework/arm64/boot-framework.oat (android.graphics.Canvas.drawText+52)
  #21  pc 00000000013ab328  /system/framework/arm64/boot-framework.oat (android.text.BoringLayout.draw+136)
  #22  pc 000000000167c3bc  /system/framework/arm64/boot-framework.oat (android.widget.TextView.onDraw+3980)
  #23  pc 0000000001158814  /system/framework/arm64/boot-framework.oat (android.view.View.draw+308)
  #24  pc 000000000115a0f0  /system/framework/arm64/boot-framework.oat (android.view.View.draw+3616)
  #25  pc 00000000011934e0  /system/framework/arm64/boot-framework.oat (android.view.ViewGroup.drawChild+64)
  #26  pc 000000000118dd1c  /system/framework/arm64/boot-framework.oat (android.view.ViewGroup.dispatchDraw+1468)
  #27  pc 000000000115882c  /system/framework/arm64/boot-framework.oat (android.view.View.draw+332)
  #28  pc 000000000052df84  /system/lib64/libart.so (art_quick_invoke_stub+580)
  #29  pc 00000000000d86a8  /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+200)
  #30  pc 0000000000291720  /system/lib64/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+352)
  #31  pc 000000000028bd30  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+672)
  #32  pc 0000000000518898  /system/lib64/libart.so (MterpInvokeVirtualQuick+680)
  #33  pc 0000000000523714  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #34  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #35  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #36  pc 000000000028bd10  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #37  pc 00000000005169b8  /system/lib64/libart.so (MterpInvokeDirect+504)
  #38  pc 000000000051fa94  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #39  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #40  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #41  pc 000000000028bd10  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #42  pc 00000000005169b8  /system/lib64/libart.so (MterpInvokeDirect+504)
  #43  pc 000000000051fa94  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #44  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #45  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #46  pc 000000000028bd10  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #47  pc 0000000000518898  /system/lib64/libart.so (MterpInvokeVirtualQuick+680)
  #48  pc 0000000000523714  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #49  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #50  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #51  pc 000000000028cbec  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb1ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+684)
  #52  pc 00000000005182b8  /system/lib64/libart.so (MterpInvokeDirectRange+424)
  #53  pc 000000000051fd94  /system/lib64/libart.so (ExecuteMterpImpl+15252)
  #54  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #55  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #56  pc 000000000028bd10  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #57  pc 00000000005169b8  /system/lib64/libart.so (MterpInvokeDirect+504)
  #58  pc 000000000051fa94  /system/lib64/libart.so (ExecuteMterpImpl+14484)
  #59  pc 000000000026bed0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+448)
  #60  pc 0000000000272794  /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
  #61  pc 000000000028bd10  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
  #62  pc 00000000005169b8  /system/lib64/libart.so (MterpInvokeDirect+504)
  #63  pc 000000000051fa94  /system/lib64/libart.so (ExecuteMterpImpl+14484)

Seems to be a similar crash on all 4 devices (just different code-lines on the Samsung devices)

EDIT: I'm actually not sure if this SIGSEGV is related to jPCT... :|
Title: Re: Crash (native)
Post by: EgonOlsen on April 06, 2018, 07:57:30 am
Looks like something related to font rendering to me. I don't think that this relates to jPCT...