Google Play New problem : 64bits

All topics about ZGameEditor goes here.

Moderator: Moderators

User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Google Play New problem : 64bits

Post by Ats »

So I replaced the click screen to get to the BitmapExpression bug by a timer, so the gdb has the time to launch, and I can really see when the logcat is moving from the first AppState to the second, all while gdb displays its results.

Here are two gbd logs until the app crashes in the second AppState:

Code: Select all

(gdb) continue
Continuing.
[New Thread 10894.11068]

Thread 25 "InsetsAnimation" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 10894.10948]
0x000000005a058ee0 in ?? ()
(gdb) continue
Continuing.

Thread 27 "InteractionJank" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 10894.11005]
0x000000005a058ee0 in ?? ()
(gdb) continue
Continuing.

Thread 17 "GLThread 502" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 10894.10930]
0x000000005a0018c4 in ?? ()
(gdb) continue
Continuing.

Thread 9 "FinalizerWatchd" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 10894.10904]
0x000000005a377568 in ?? ()
(gdb) continue
Continuing.

Thread 24 "SurfaceSyncGrou" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 10894.10946]
0x000000005a058ee0 in ?? ()
(gdb) continue
Continuing.

Thread 1 "com.txori.zge" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 10894.10894]
0x000000005a058ee0 in ?? ()
(gdb) continue
Continuing.
[New Thread 10894.11075]
[New Thread 10894.11077]
[New Thread 10894.11078]
[New Thread 10894.11079]
[New Thread 10894.11080]
[New Thread 10894.11081]
[New Thread 10894.11083]

Thread 17 "GLThread 502" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 10894.10930]
0x0000007478ab58e4 in ?? ()

Code: Select all

(gdb) continue
Continuing.
[New Thread 11173.11352]

Thread 27 "InteractionJank" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 11173.11277]
0x000000005a056990 in ?? ()
(gdb) continue
Continuing.

Thread 24 "InsetsAnimation" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 11173.11226]
0x000000005a056990 in ?? ()
(gdb) continue
Continuing.

Thread 9 "FinalizerWatchd" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 11173.11184]
0x000000005a029390 in ?? ()
(gdb) continue
Continuing.

Thread 23 "SurfaceSyncGrou" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 11173.11223]
0x000000005a056990 in ?? ()
(gdb) continue
Continuing.

Thread 1 "com.txori.zge" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 11173.11173]
0x000000005a056990 in ?? ()
(gdb) continue
Continuing.

Thread 16 "GLThread 501" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 11173.11209]
0x000000005a0018c4 in ?? ()
(gdb) continue
Continuing.
[New Thread 11173.11353]
[New Thread 11173.11354]
[New Thread 11173.11355]
[New Thread 11173.11356]
[New Thread 11173.11359]
[New Thread 11173.11360]
[New Thread 11173.11361]

Thread 16 "GLThread 501" received signal SIGSEGV, Segmentation fault.
0x0000007478ab58e4 in ?? ()
The stack traces show addresses like 0x0000007478ab58e4 without providing function names, indicating missing debug symbols. But the -g flag is there when compiling the library. And the AndroiManifest has the android:debuggable="true"...
So I'm not able to do things without that, I think. For example:

Code: Select all

(gdb) disassemble 0x0000007478ab58e4
No function contains specified address.
The only function I get is the very first one, at the end of the gdb log that I previously posted:

Code: Select all

0x00000077167c4d28 in __epoll_pwait ()
   from C:\Dropbox\Omeganaut\research\ZgeBullet-master\demos\test\com.txori.zge\obj\local\arm64-v8a\system\lib64\libc.so

Code: Select all

(gdb) disassemble 0x00000077167c4d28
Dump of assembler code for function __epoll_pwait:
   0x00000077167c4d20 <+0>:     mov     x8, #0x16                       // #22
   0x00000077167c4d24 <+4>:     svc     #0x0
=> 0x00000077167c4d28 <+8>:     cmn     x0, #0x1, lsl #12
   0x00000077167c4d2c <+12>:    cneg    x0, x0, hi  // hi = pmore
   0x00000077167c4d30 <+16>:    b.hi    0x77167c3530 <__set_errno_internal>  // b.pmore
   0x00000077167c4d34 <+20>:    ret
End of assembler dump.
But ChatGPT says the problem isn't coming from that (I don't read assembly):
The function you're inspecting is part of the standard Linux kernel's system call mechanism. The crash or segmentation fault doesn't appear to be happening inside this system call itself, but rather this is where execution paused due to waiting on epoll.
User avatar
VilleK
Site Admin
Posts: 2355
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Google Play New problem : 64bits

Post by VilleK »

Not sure if it matters but you could specify more debug options when compiling like this "-g -gl -gw"
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Google Play New problem : 64bits

Post by Ats »

I tried -gl and -gw. This doesn't help.

So now I'm onto something entirely different: trying to build the library with a more recent NDK, again.
A few hours ago, I thought I was able to finaly build libzgeandroid.so using the current NDK 27b instead of the very old 21e. Turns out that ppcrossarm was till able to find android-ndk-r21e\platforms\android-30\arch-arm\usr\lib folder, even if I set the path to C:\Android\android-ndk-r27b\toolchains... I really don't understand how it is possible. Unless it is set in the windows/dos directory memory or something...
And once I deleted the old NDK, the library wasn't buildable anymore. Which led to a little mess on my commit in github.


From this obscure portuguese post in lazarus forum, it should be possible to build the library using the current NDK, thanks to LAMW. This other post talk about it too: https://forum.lazarus.freepascal.org/in ... 878.0.html

So right now, I have downloaded and installed LAMW Manager - Windows Port, as suggested by LAMW: Lazarus Android Module Wizard, a 8.93 GB folder. And I've yet to understand what to do with it...

Edit:
The path to android-ndk-r21e isn't in my environment var. I have no ideas how my makeAndroid.bat is able to find it...

Edit 2:
OK I remember. The path to the ndk was set during fpc-3.2.2.i386-win32.cross.android.exe installation!!!
This is hell... Maybe I can set to 21e and change that path afterward, I'll try that.

All right, everything is in C:\FPC\3.2.2\bin\i386-win32\fpc.cfg :

Code: Select all

#ifdef android
  #ifdef cpuarm
    # Use CPU armv7a and FPU vfpv3-d16 since corresponding units are installed
    -Cparmv7a
    -Cfvfpv3_d16
    -FlC:\Android\android-ndk-r21e\platforms\android-30\arch-arm\usr\lib
    -FDC:\Android\android-ndk-r21e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin
  #endif
  #ifdef cpuaarch64
    -FlC:\Android\android-ndk-r21e\platforms\android-30\arch-arm64\usr\lib
    -FDC:\Android\android-ndk-r21e\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\bin
  #endif
  #ifdef cpui386
    -FlC:\Android\android-ndk-r21e\platforms\android-30\arch-x86\usr\lib
    -FDC:\Android\android-ndk-r21e\toolchains\x86-4.9\prebuilt\windows-x86_64\bin
  #endif
  #ifdef cpux86_64
    -FlC:\Android\android-ndk-r21e\platforms\android-30\arch-x86_64\usr\lib64
    -FDC:\Android\android-ndk-r21e\toolchains\x86_64-4.9\prebuilt\windows-x86_64\bin
  #endif
#endif
By setting the paths manually, I can build the objects of the library, but I can't link them, as the linking program is missing from NDK after 21e... :roll:
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Google Play New problem : 64bits

Post by Ats »

I think I tried everything in order to build the library with a more recent ndk.
I set the paths in fpc.cfg
I managed to build the obj files. Then ppcrossarm is expecting a program to link those objects that does not exist anymore.
So I manually linked them using what is available in recent ndk. This produces libzgeandroid.so fine, but the library is crashing instantly on the device.
So I really hope the thread problem isn't coming from the ndk, as the programs expected by free pascal are called the "legacy toolchain" in the ndk log: https://github.com/android/ndk/wiki/Changelog-r21


My next step is to try to locate what in Omeganaut crashes the 64 library although threads has been deactivated. It should be the vec3 stuff, but I wasn't able to make a simple exemple that crashes out of that.
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Google Play New problem : 64bits

Post by Ats »

Ok, so I can confirm that the mere presence of a Sound component is crashing the app after a certain amount of time.
The problem does not occur with the Music or Sample component.
The app doesn't crash when procedure Platform_InitAudio; is deactivated.
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Google Play New problem : 64bits

Post by Ats »

Found it! (threads and sound are currently deactivated in the library)
If there's an MeshImport component in the project, then the Mesh isn't rendered.
And because of that MeshImport, the app crashes if we try to set a vec2 or vec3 :|
Setting a vec2/3 with no MeshImport works.

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="Omeganaut" ClearColor="0.502 0 0.502 1" AmbientLightColor="1 1 1 1" FullScreen="255" FrameRateStyle="1" ScreenMode="0" CameraPosition="0 0 14" MouseVisible="255" EscapeToQuit="0" FileVersion="2" PreviewClearColor="0 0 0 1" AndroidPackageName="com.txori.omeganaut" AndroidPortrait="2">
  <OnLoaded>
    <ZExpression>
      <Expression>
<![CDATA[trace("crash vec2/3 ?");
vec3test.X = 0;]]>
      </Expression>
    </ZExpression>
  </OnLoaded>
  <OnRender>
    <RenderMesh Mesh="MyMesh"/>
  </OnRender>
  <Content>
    <Group Comment="Collision Meshes">
      <Children>
        <Mesh Name="MyMesh">
          <Producers>
            <MeshImport HasVertexColors="1" HasTextureCoords="1">
              <MeshData>
<![CDATA[789CED93C14DC3401045C749103DD0429AE06E4AA085D460D7C08D0E2820779AF0999C52C7B07F9FBF3611111149B8202C6D32FBF7EFCCF79FF15B443C97B5CB7CFF98D72E87C78F79ED37396CD7313EBC44282ED41283641674EC27C5FDA438D3713F15EEA8084E63E5C0AFB8FB8DF0923785B0771E50F2F7D37EB35D8B23861429428915967D105BA7EEC4A8BDD42BBF18BA93831165152E9DC241940BBE62E15474AC0AAEAB1DB538A58A33B4D3965FEFA0DBAABC5DE3807D10CE291EE021FF3888FA4337EC367DD1EDE3CC785E5DA96F672576DBDDE1D46FD73854B76BD4A9FD0AFD5A4F9B0EF74138281ED32318745999DDEB36519E3757A20F996DA2785FD8DA398F58A8F524E224AE1E6BA3639E1438CCA133E1BF6E7812D4534F8E76564B7F794754299FB28A8F72E1F4CB3D158E2AEAB6EFA2751C6576A92081F3876EDB577F23F3D701739E0794D8376BE3D4AA6AA5E86251566617CBB82BEB6B1C3512B3ABE829CE61BCA8DC885574957D8EFF7DDD65A0717571ADC5AC9D3CF717E33FF5E12FC579E6797A8D93EBB7EEDD2AEFB5BC5BADFFE7BAE713ED2183B4]]>
              </MeshData>
            </MeshImport>
          </Producers>
        </Mesh>
      </Children>
    </Group>
    <Variable Name="vec3test" Type="7"/>
  </Content>
</ZApplication>
Here's the logcat for that last bug:

Code: Select all

10-06 15:44:50.446 I/ActivityTaskManager( 2064): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.txori.omeganaut/org.zgameeditor.ZgeActivity bnds=[238,1630][439,1931]} from uid 10042

10-06 15:44:50.520 I/ActivityManager( 2064): Start proc 7483:com.txori.omeganaut/u0a589 for pre-top-activity {com.txori.omeganaut/org.zgameeditor.ZgeActivity}

10-06 15:44:50.761 D/nativeloader( 7483): Load /data/app/~~CDNc_kfYpwx-AukBA7iJ-g==/com.txori.omeganaut-zjti4m4x20co7GARBmZtPA==/lib/arm64/libzgeandroid.so using ns clns-4 from class loader (caller=/data/app/~~CDNc_kfYpwx-AukBA7iJ-g==/com.txori.omeganaut-zjti4m4x20co7GARBmZtPA==/base.apk): ok

10-06 15:44:50.772 E/ZgeAndroid( 7483): /storage/emulated/0
10-06 15:44:50.772 E/ZgeAndroid( 7483): /data/user/0/com.txori.omeganaut/files/
10-06 15:44:50.772 E/ZgeAndroid( 7483): /data/app/~~CDNc_kfYpwx-AukBA7iJ-g==/com.txori.omeganaut-zjti4m4x20co7GARBmZtPA==/lib/arm64/

10-06 15:44:50.773 E/ZgeAndroid( 7483): Function not found: JNI_OnLoad

10-06 15:44:50.773 E/ZgeAndroid( 7483): Function not found: glDepthRange
10-06 15:44:50.773 E/ZgeAndroid( 7483): Function not found: glGenLists

10-06 15:44:50.774 E/ZgeAndroid( 7483): Function not found: glMateriali
10-06 15:44:50.774 E/ZgeAndroid( 7483): Function not found: glIndexMask
10-06 15:44:50.774 E/ZgeAndroid( 7483): Function not found: glListBase
10-06 15:44:50.774 E/ZgeAndroid( 7483): Function not found: glBegin
10-06 15:44:50.774 E/ZgeAndroid( 7483): Function not found: glCallList
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glColor3f
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glColor3fv
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glColor4fv
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glEnd
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glColorMaterial
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glDeleteLists
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glDrawBuffer
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glGetTexImage

10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glPolygonMode
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glPopAttrib
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glPushAttrib
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glRasterPos2f
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glTexCoord2f
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glVertex2f
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glVertex3f
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glTexGeni
10-06 15:44:50.775 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.775 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.775 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.775 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.775 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.775 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.775 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.775 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glAttachShader
10-06 15:44:50.775 E/ZgeAndroid( 7483): Function not found: glBindAttribLocation
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glCompileShader
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glCreateShader

10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glCreateProgram
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glDeleteShader
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glDeleteProgram
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glDetachShader
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glGetProgramiv
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glGetShaderiv
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glGetShaderInfoLog
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glGetProgramInfoLog

10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glValidateProgram
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glGetUniformLocation
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glLinkProgram
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glShaderSource
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glUniform3fv
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glUniform1f
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glUniform4fv
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glUniform2fv
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glUniform1i
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glUniform1fv
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glUniformMatrix3fv
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glUniformMatrix4fv
10-06 15:44:50.776 E/ZgeAndroid( 7483): Function not found: glUseProgram
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glIsRenderbuffer
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glBindRenderbuffer
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glDeleteRenderbuffers
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glGenRenderbuffers
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glRenderbufferStorage
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glBindFramebuffer
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glDeleteFramebuffers
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glGenFramebuffers
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glCheckFramebufferStatus
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glFramebufferTexture2D
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glFramebufferRenderbuffer
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glGenerateMipmap
10-06 15:44:50.777 E/ZgeAndroid( 7483): Function not found: glRenderbufferStorageMultisample
10-06 15:44:50.778 E/ZgeAndroid( 7483): Function not found: glTexImage2DMultisample
10-06 15:44:50.778 E/ZgeAndroid( 7483): Function not found: glBlitFramebuffer
10-06 15:44:50.778 E/ZgeAndroid( 7483): Function not found: glDisableVertexAttribArray
10-06 15:44:50.778 E/ZgeAndroid( 7483): Function not found: glEnableVertexAttribArray
10-06 15:44:50.778 E/ZgeAndroid( 7483): Function not found: glVertexAttribPointer
10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)

10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.778 E/libEGL  ( 7483): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:50.778 E/ZgeAndroid( 7483): crash vec2/3 ?

10-06 15:44:51.061 F/DEBUG   ( 7509): Cmdline: com.txori.omeganaut
10-06 15:44:51.061 F/DEBUG   ( 7509): pid: 7483, tid: 7483, name: txori.omeganaut  >>> com.txori.omeganaut <<<
10-06 15:44:51.061 F/DEBUG   ( 7509): uid: 10589
10-06 15:44:51.061 F/DEBUG   ( 7509): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x49
10-06 15:44:51.061 F/DEBUG   ( 7509): Cause: null pointer dereference
10-06 15:44:51.061 F/DEBUG   ( 7509):     x0  0000000000000000  x1  0000007fc66832d8  x2  0000007fc6683360  x3  000000000000004a
10-06 15:44:51.061 F/DEBUG   ( 7509):     x4  000000795a190b80  x5  0000007c17325380  x6  feff3e1f322e3162  x7  7f7f7f7f7f7f7f7f
10-06 15:44:51.061 F/DEBUG   ( 7509):     x8  71bb4857fcf543dc  x9  71bb4857fcf543dc  x10 0000000000000001  x11 0000000000000000
10-06 15:44:51.061 F/DEBUG   ( 7509):     x12 0000007fc6681fe0  x13 000000000000000f  x14 0000007c13c0d060  x15 002e2ab51eba951a
10-06 15:44:51.061 F/DEBUG   ( 7509):     x16 000000795ff1cfa0  x17 0000007bf5ce2ad8  x18 0000007c1b43e000  x19 0000000000000000
10-06 15:44:51.061 F/DEBUG   ( 7509):     x20 0000007fc6683348  x21 0000000000000000  x22 0000007c17327ac0  x23 0000007fc6687580
10-06 15:44:51.061 F/DEBUG   ( 7509):     x24 0000007bf62ff558  x25 0000000000000002  x26 0000007bf62ff6f8  x27 0000000000000002
10-06 15:44:51.061 F/DEBUG   ( 7509):     x28 0000007fc6687450  x29 0000007fc6683300
10-06 15:44:51.061 F/DEBUG   ( 7509):     lr  000000795a15acf8  sp  0000007fc66832d0  pc  000000795a15acf8  pst 0000000020000000
10-06 15:44:51.061 F/DEBUG   ( 7509): backtrace:
10-06 15:44:51.061 F/DEBUG   ( 7509):       #00 pc 0000000000055cf8  /data/app/~~CDNc_kfYpwx-AukBA7iJ-g==/com.txori.omeganaut-zjti4m4x20co7GARBmZtPA==/lib/arm64/libzgeandroid.so (ZEXPRESSIONS$_$TDEFINEARRAY_$__$$_POPANDGETELEMENT$PEXECUTIONENVIRONMENT$$PFLOAT+40) (BuildId: ebd100d8f8a76749544377c301214ee42bfc2113)

10-06 15:44:51.214 W/ActivityManager( 2064): Slow operation: 53ms so far, now at startProcess: building log message
10-06 15:44:51.214 I/ActivityManager( 2064): Start proc 7516:com.txori.omeganaut/u0a589 for top-activity {com.txori.omeganaut/org.zgameeditor.ZgeActivity}
10-06 15:44:51.214 W/ActivityManager( 2064): Slow operation: 54ms so far, now at startProcess: starting to update pids map
10-06 15:44:51.214 I/txori.omeganau( 7516): Late-enabling -Xcheck:jni

10-06 15:44:51.422 D/nativeloader( 7516): Load /data/app/~~CDNc_kfYpwx-AukBA7iJ-g==/com.txori.omeganaut-zjti4m4x20co7GARBmZtPA==/lib/arm64/libzgeandroid.so using ns clns-4 from class loader (caller=/data/app/~~CDNc_kfYpwx-AukBA7iJ-g==/com.txori.omeganaut-zjti4m4x20co7GARBmZtPA==/base.apk): ok

10-06 15:44:51.432 E/ZgeAndroid( 7516): /storage/emulated/0
10-06 15:44:51.432 E/ZgeAndroid( 7516): /data/user/0/com.txori.omeganaut/files/
10-06 15:44:51.432 E/ZgeAndroid( 7516): /data/app/~~CDNc_kfYpwx-AukBA7iJ-g==/com.txori.omeganaut-zjti4m4x20co7GARBmZtPA==/lib/arm64/

10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: JNI_OnLoad
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glDepthRange

10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glGenLists
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glMateriali
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glIndexMask
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glListBase
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glBegin
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glCallList
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glColor3f
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glColor3fv
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glColor4fv
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glEnd
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glColorMaterial

10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glDeleteLists
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glDrawBuffer
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glGetTexImage
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glPolygonMode
10-06 15:44:51.434 E/ZgeAndroid( 7516): Function not found: glPopAttrib
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glPushAttrib
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glRasterPos2f

10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glTexCoord2f
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glVertex2f
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glVertex3f
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glTexGeni
10-06 15:44:51.435 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.435 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.435 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.435 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.435 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.435 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)

10-06 15:44:51.435 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.435 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glAttachShader
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glBindAttribLocation
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glCompileShader
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glCreateShader

10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glCreateProgram
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glDeleteShader
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glDeleteProgram
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glDetachShader
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glGetProgramiv
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glGetShaderiv
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glGetShaderInfoLog
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glGetProgramInfoLog
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glValidateProgram
10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glGetUniformLocation

10-06 15:44:51.435 E/ZgeAndroid( 7516): Function not found: glLinkProgram
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glShaderSource
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glUniform3fv
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glUniform1f
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glUniform4fv
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glUniform2fv
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glUniform1i
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glUniform1fv

10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glUniformMatrix3fv
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glUniformMatrix4fv
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glUseProgram
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glIsRenderbuffer
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glBindRenderbuffer
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glDeleteRenderbuffers
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glGenRenderbuffers

10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glRenderbufferStorage
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glBindFramebuffer
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glDeleteFramebuffers
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glGenFramebuffers
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glCheckFramebufferStatus
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glFramebufferTexture2D
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glFramebufferRenderbuffer
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glGenerateMipmap
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glRenderbufferStorageMultisample
10-06 15:44:51.436 E/ZgeAndroid( 7516): Function not found: glTexImage2DMultisample

10-06 15:44:51.437 E/ZgeAndroid( 7516): Function not found: glBlitFramebuffer
10-06 15:44:51.437 E/ZgeAndroid( 7516): Function not found: glDisableVertexAttribArray
10-06 15:44:51.437 E/ZgeAndroid( 7516): Function not found: glEnableVertexAttribArray
10-06 15:44:51.437 E/ZgeAndroid( 7516): Function not found: glVertexAttribPointer
10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)

10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.437 E/libEGL  ( 7516): call to OpenGL ES API with no current context (logged once per thread)
10-06 15:44:51.437 E/ZgeAndroid( 7516): crash vec2/3 ?
10-06 15:44:51.437 F/libc    ( 7516): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x49 in tid 7516 (txori.omeganaut), pid 7516 (txori.omeganaut)

10-06 15:44:51.694 F/DEBUG   ( 7545): Revision: 'MP1.0'
10-06 15:44:51.694 F/DEBUG   ( 7545): ABI: 'arm64'
10-06 15:44:51.694 F/DEBUG   ( 7545): Timestamp: 2024-10-06 15:44:51.484761145+0200
10-06 15:44:51.694 F/DEBUG   ( 7545): Process uptime: 0s
10-06 15:44:51.694 F/DEBUG   ( 7545): Cmdline: com.txori.omeganaut
10-06 15:44:51.694 F/DEBUG   ( 7545): pid: 7516, tid: 7516, name: txori.omeganaut  >>> com.txori.omeganaut <<<
10-06 15:44:51.694 F/DEBUG   ( 7545): uid: 10589
10-06 15:44:51.694 F/DEBUG   ( 7545): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x49
10-06 15:44:51.694 F/DEBUG   ( 7545): Cause: null pointer dereference
10-06 15:44:51.694 F/DEBUG   ( 7545):     x0  0000000000000000  x1  0000007fc66832d8  x2  0000007fc6683360  x3  000000000000004a
10-06 15:44:51.694 F/DEBUG   ( 7545):     x4  000000795a197b80  x5  0000007c17325380  x6  feff3e1f322e3162  x7  7f7f7f7f7f7f7f7f
10-06 15:44:51.694 F/DEBUG   ( 7545):     x8  71bb4857fcf543dc  x9  71bb4857fcf543dc  x10 0000000000000001  x11 0000000000000000
10-06 15:44:51.694 F/DEBUG   ( 7545):     x12 0000007fc6681fe0  x13 000000000000000f  x14 0000007c13c0d060  x15 0019e6b8607a9ac9
10-06 15:44:51.694 F/DEBUG   ( 7545):     x16 000000795ff1cfa0  x17 0000007bf5ce2ad8  x18 0000007c1b43e000  x19 0000000000000000
10-06 15:44:51.694 F/DEBUG   ( 7545):     x20 0000007fc6683348  x21 0000000000000000  x22 0000007c17327ac0  x23 0000007fc6687580
10-06 15:44:51.694 F/DEBUG   ( 7545):     x24 0000007bf62ff558  x25 0000000000000002  x26 0000007bf62ff6f8  x27 0000000000000002
10-06 15:44:51.694 F/DEBUG   ( 7545):     x28 0000007fc6687450  x29 0000007fc6683300
10-06 15:44:51.694 F/DEBUG   ( 7545):     lr  000000795a161cf8  sp  0000007fc66832d0  pc  000000795a161cf8  pst 0000000020000000
10-06 15:44:51.694 F/DEBUG   ( 7545): backtrace:
10-06 15:44:51.694 F/DEBUG   ( 7545):       #00 pc 0000000000055cf8  /data/app/~~CDNc_kfYpwx-AukBA7iJ-g==/com.txori.omeganaut-zjti4m4x20co7GARBmZtPA==/lib/arm64/libzgeandroid.so (ZEXPRESSIONS$_$TDEFINEARRAY_$__$$_POPANDGETELEMENT$PEXECUTIONENVIRONMENT$$PFLOAT+40) (BuildId: ebd100d8f8a76749544377c301214ee42bfc2113)

10-06 15:44:51.716 I/DropBoxManagerService( 2064): add tag=data_app_native_crash isTagEnabled=true flags=0x2
10-06 15:44:51.717 W/ActivityManager( 2064): Process com.txori.omeganaut has crashed too many times, killing! Reason: crashed quickly
10-06 15:44:51.717 W/WindowManager( 2064):   Force finishing activity com.txori.omeganaut/org.zgameeditor.ZgeActivity
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Google Play New problem : 64bits

Post by Ats »

I believe I'm getting better at this (got to stay motivated) :lol:

So I run:
adb logcat > log.txt
ndk-stack -sym libzgeandroid.so -dump log.txt

to get:

Code: Select all

********** Crash dump: **********
Build fingerprint: 'google/sargo/sargo:12/SP2A.220505.008/8782922:user/release-keys'
#00 0x0000000000055cf8 /data/app/~~pWD0fRFwrAe_GJWLIGclaQ==/com.txori.omeganaut-iCTMB0rOGtGYO8u66ct2qA==/lib/arm64/libzgeandroid.so (ZEXPRESSIONS$_$TDEFINEARRAY_$__$$_POPANDGETELEMENT$PEXECUTIONENVIRONMENT$$PFLOAT+40) (BuildId: ebd100d8f8a76749544377c301214ee42bfc2113)
Crash dump is completed
Apparently, the +40 means the crash happened 40 bytes after the start of the POPANDGETELEMENT function
Now, on Linux, I can use addr2line to get the exact line where this crash is happening by using addr2line with the memory address offset +40 from the crash log.

Exact crash line:
addr2line -e libzgeandroid.so 0x0000000000055cf8
C
ZExpressions.pas:1491
which corresponds to
if Self.Dimensions>=dadTwo then

And, if I understand correctly, the address of the function start should be 0x0000000000055cf8 - 0x40 = 0x0000000000055cb8

addr2line -e libzgeandroid.so 0x0000000000055cb8
ZExpressions.pas:1478
which corresponds to
for I := 0 to Count - 1 do

Anyway, the problem should be in ZExpressions.pas
function TDefineArray.PopAndGetElement(Env : PExecutionEnvironment) : ZClasses.PFloat;
User avatar
VilleK
Site Admin
Posts: 2355
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Google Play New problem : 64bits

Post by VilleK »

MeshImport was updated earlier this year to handle different encoding options (in reply to Kjell having issues with .obj file import). Do you export to Android from the very latest ZGE? Please check to be sure: http://www.zgameeditor.org/files/ZGameEditor_beta.zip
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Google Play New problem : 64bits

Post by Ats »

What??? I didn't see that in the forum... :shock:
And I'm pretty sure I downloaded it last month. Dropbox versioning confirms that I replaced it. I think what happened is that chrome does everything it can to prevent downloading ZGameEditor_beta.zip, and I didn't pay attention and unzipped a previous ZGE zip that already was in my download folder... :|

So now it displays the model, and set the vec3 isn't crashing anymore, which is nice!
But it displays "Read beyond EOF attempted" 336 times in ZGE's log each time I try to display a mesh in ZGE. You can see that with my example just above. I don't get this message with the same 3D object in obj format.

Now, Omeganaut runs nicely. Having no threads don't seem to bother the game. Having no sound is less cool. And I get a crash on enemy's hit. I'm on it :wink:

Edit:
All right, I found where this bug is coming from. It's because I built ZGEBullet 32 and 64 from source when I started running my tests last month, and I totally forgot about the zbtGetMainCollidedObject function that I added last year...
User avatar
VilleK
Site Admin
Posts: 2355
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Google Play New problem : 64bits

Post by VilleK »

I think Kjell contacted me with PM so it is possible the update was not mentioned on public forum. Sorry for the inconvenience.

For the Read beyond EOF issue: please try reimport the original model if you still have it.
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Google Play New problem : 64bits

Post by Ats »

I fixed the ZGEBullet problem. I'm going to push the change to Rado-1's github for building android 32 and 64 from windows and linux. Omeganaut is playing very nicely now. I'm going to test it for a while, then I'll get back to try to fix the sound.

Reimporting the 3DS object works :wink: I kept everything in a folder.
User avatar
Kjell
Posts: 1915
Joined: Sat Feb 23, 2008 11:15 pm

Re: Google Play New problem : 64bits

Post by Kjell »

8)

The OBJ importer used to be extremely bare-bones .. or maybe you could even say broken. Didn't matter what vertex data your OBJ contained, the imported mesh would always have vertex colors enabled ( even though it didn't actually import any vertex color data ) and texCoords disabled. Normals weren't even supported by MeshImport. Ville fixed all of that earlier this year + texture coordinates no longer have to be in the -1 to 1 range.

K
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Google Play New problem : 64bits

Post by Ats »

I wrote a batch file that does everything, so I can just test things in the source code, press build and see what's going on the phone. Regarding my tests, I'm currently browsing the SDL2-for-Pascal folder.
I've read through stuff like that: https://github.com/PascalGameDevelopmen ... issues/146

So I was wondering, SDL2 isn't used for Android? I only see it being imported in ZPlatform_SDL.inc
User avatar
VilleK
Site Admin
Posts: 2355
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Google Play New problem : 64bits

Post by VilleK »

ZGE does not use SDL on Android.

About the audio crash: if you try to play a sound do you hear this at all before it crashes?
User avatar
Ats
Posts: 762
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Google Play New problem : 64bits

Post by Ats »

With threads disabled, the sound is working fine in 32 bits. In 64, there is no sound at all, then it crashes a few random frames later.
I started added traces in all functions that could be related to the sound or the main loop. Here's initialization and the first frame.

Code: Select all

10-08 10:51:56.543 11594 11594 E ZgeAndroid: InitChannels: Initializing channels
10-08 10:51:56.543 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 0
10-08 10:51:56.543 11594 11594 E ZgeAndroid: InitChannels: Channel 0 set to active with Volume = 0.5 and DelayLength = 0.1
10-08 10:51:56.543 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 0
10-08 10:51:56.544 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 0 initialized to 0
10-08 10:51:56.544 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 1
10-08 10:51:56.544 11594 11594 E ZgeAndroid: InitChannels: Channel 1 set to active with Volume = 0.5 and DelayLength = 0.1
10-08 10:51:56.544 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 1
10-08 10:51:56.544 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 1 initialized to 0
10-08 10:51:56.544 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 2
10-08 10:51:56.544 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 2
10-08 10:51:56.544 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 2 initialized to 0
10-08 10:51:56.544 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 3
10-08 10:51:56.544 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 3
10-08 10:51:56.545 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 3 initialized to 0
10-08 10:51:56.545 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 4
10-08 10:51:56.545 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 4
10-08 10:51:56.545 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 4 initialized to 0
10-08 10:51:56.545 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 5
10-08 10:51:56.545 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 5
10-08 10:51:56.545 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 5 initialized to 0
10-08 10:51:56.545 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 6
10-08 10:51:56.545 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 6
10-08 10:51:56.546 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 6 initialized to 0
10-08 10:51:56.546 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 7
10-08 10:51:56.546 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 7
10-08 10:51:56.549 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 7 initialized to 0
10-08 10:51:56.549 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 8
10-08 10:51:56.549 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 8
10-08 10:51:56.549 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 8 initialized to 0
10-08 10:51:56.549 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 9
10-08 10:51:56.549 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 9
10-08 10:51:56.550 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 9 initialized to 0
10-08 10:51:56.550 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 10
10-08 10:51:56.550 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 10
10-08 10:51:56.550 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 10 initialized to 0
10-08 10:51:56.550 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 11
10-08 10:51:56.550 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 11
10-08 10:51:56.551 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 11 initialized to 0
10-08 10:51:56.551 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 12
10-08 10:51:56.551 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 12
10-08 10:51:56.551 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 12 initialized to 0
10-08 10:51:56.551 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 13
10-08 10:51:56.551 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 13
10-08 10:51:56.552 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 13 initialized to 0
10-08 10:51:56.552 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 14
10-08 10:51:56.552 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 14
10-08 10:51:56.552 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 14 initialized to 0
10-08 10:51:56.552 11594 11594 E ZgeAndroid: InitChannels: Initializing channel 15
10-08 10:51:56.552 11594 11594 E ZgeAndroid: InitChannels: Allocated 705600 bytes for DelayBuffer of channel 15
10-08 10:51:56.553 11594 11594 E ZgeAndroid: InitChannels: DelayBuffer of channel 15 initialized to 0
10-08 10:51:56.553 11594 11594 E ZgeAndroid: InitChannels: All channels initialized
10-08 10:51:56.556 11594 11594 E ZgeAndroid: /storage/emulated/0
10-08 10:51:56.556 11594 11594 E ZgeAndroid: /data/user/0/com.txori.omeganaut/files/
10-08 10:51:56.556 11594 11594 E ZgeAndroid: /data/app/~~WzM-AujtO1JGB9Ob-MXTag==/com.txori.omeganaut-Fbs6WlbwCDCfFzz6L_NppQ==/lib/arm64/
10-08 10:51:56.557 11594 11594 E ZgeAndroid: TSound.Create: Initializing TSound object
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Entering function
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Length property added
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Volume property added
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: BaseNoteNr property added
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Osc1 properties added
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Osc2 properties added
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: HardSync property added
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Filter properties added
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Pan property added
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Modulation properties added for index 0
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Modulation properties added for index 1
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Modulation properties added for index 2
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Modulation properties added for index 3
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Envelope properties added for index 0
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Envelope properties added for index 1
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Lfo properties added for index 0
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Lfo properties added for index 1
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: SampleRepeatPosition and UseSampleHz properties added
10-08 10:51:56.557 11594 11594 E ZgeAndroid: DefineProperties: Exiting function
10-08 10:51:56.557 11594 11594 E ZgeAndroid: TSound.Create: Initialization completed
10-08 10:51:56.558 11594 11594 E ZgeAndroid: TZApplication.Run: Starting application run.
10-08 10:51:56.558 11594 11594 E ZgeAndroid: TZApplication.Run: Initializing application...
10-08 10:51:56.599 11594 11594 E ZgeAndroid: TZApplication.Run: Skipping initial tree update to avoid triggering AppState.OnStart.
10-08 10:51:56.599 11594 11594 E ZgeAndroid: TZApplication.Run: Executing OnLoaded commands...
10-08 10:51:56.599 11594 11594 E ZgeAndroid: TExpAddToPointer.Execute: Starting execution
10-08 10:51:56.599 11594 11594 E ZgeAndroid: TExpAddToPointer.Execute: Popped value V: 32
10-08 10:51:56.599 11594 11594 E ZgeAndroid: TExpAddToPointer.Execute: Popped pointer P: 411B7A00
10-08 10:51:56.599 11594 11594 E ZgeAndroid: TExpAddToPointer.Execute: Incremented pointer P: 411B7A20
10-08 10:51:56.599 11594 11594 E ZgeAndroid: TExpAddToPointer.Execute: Pushed updated pointer back to stack
10-08 10:51:56.599 11594 11594 E ZgeAndroid: PLAY SOUND COMPONENT
10-08 10:51:56.599 11594 11594 E ZgeAndroid: TZApplication.Run: Running main application loop...
10-08 10:51:56.599 11594 11594 E ZgeAndroid: TZApplication.Run: Application run completed.
10-08 10:51:56.599 11594 11635 E ZgeAndroid: Audio callback started
10-08 10:51:56.599 11594 11594 E ZgeAndroid: GLBase: 1.1
10-08 10:51:56.599 11594 11635 E ZgeAndroid: AudioTrack class found
10-08 10:51:56.599 11594 11635 E ZgeAndroid: getMinBufferSize method found
10-08 10:51:56.599 11594 11635 E ZgeAndroid: AudioRate: 44100, Params: 3, 2
10-08 10:51:56.811 11594 11636 E ZgeAndroid: TZApplication.Main: Current time: 0.8118079901
10-08 10:51:56.812 11594 11636 E ZgeAndroid: TZApplication.Main: Frame processing initiated
10-08 10:51:56.812 11594 11636 E ZgeAndroid: TZApplication.Main: UpdateTime called
10-08 10:51:56.812 11594 11636 E ZgeAndroid: MainSlice: Starting main update cycle
10-08 10:51:56.812 11594 11636 E ZgeAndroid: MainSlice: No current music to update
10-08 10:51:56.812 11594 11636 E ZgeAndroid: MainSlice: No current state to update
10-08 10:51:56.812 11594 11636 E ZgeAndroid: MainSlice: Executing OnUpdate commands
10-08 10:51:56.812 11594 11636 E ZgeAndroid: TExpAddToPointer.Execute: Starting execution
10-08 10:51:56.812 11594 11636 E ZgeAndroid: TExpAddToPointer.Execute: Popped value V: 32
10-08 10:51:56.812 11594 11636 E ZgeAndroid: TExpAddToPointer.Execute: Popped pointer P: 411B7B00
10-08 10:51:56.812 11594 11636 E ZgeAndroid: TExpAddToPointer.Execute: Incremented pointer P: 411B7B20
10-08 10:51:56.812 11594 11636 E ZgeAndroid: TExpAddToPointer.Execute: Pushed updated pointer back to stack
10-08 10:51:56.812 11594 11636 E ZgeAndroid: Frame 0
10-08 10:51:56.812 11594 11636 E ZgeAndroid: MainSlice: Updating renderers
10-08 10:51:56.812 11594 11636 E ZgeAndroid: MainSlice: Updating models
10-08 10:51:56.812 11594 11636 E ZgeAndroid: MainSlice: Updating collisions
10-08 10:51:56.812 11594 11636 E ZgeAndroid: MainSlice: Emitting sounds from the AudioPlayer
10-08 10:51:56.812 11594 11636 E ZgeAndroid: EmitSoundsInEmitList: Start emitting sounds
10-08 10:51:56.812 11594 11636 E ZgeAndroid: EmitSoundsInEmitList: Emitting note
10-08 10:51:56.812 11594 11636 E ZgeAndroid: EmitSoundsInEmitList: EmitList cleared after processing
10-08 10:51:56.812 11594 11636 E ZgeAndroid: EmitSoundsInEmitList: Mutex released
10-08 10:51:56.812 11594 11636 E ZgeAndroid: EmitSoundsInEmitList: Finished emitting sounds
10-08 10:51:56.813 11594 11636 E ZgeAndroid: MainSlice: No net results to flush
10-08 10:51:56.813 11594 11636 E ZgeAndroid: MainSlice: Wheel delta reset
10-08 10:51:56.813 11594 11636 E ZgeAndroid: MainSlice: Finished main update cycle
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.Main: MainSlice executed
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Starting screen update
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Render Pass: 0
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Updating viewport
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Applying camera transform
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.ApplyCameraTransform: Starting camera transform
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.ApplyCameraTransform: Setting up view and camera
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.ApplyCameraTransform: Setting perspective with FOV: 45, Viewport Ratio: 2.055555582, Clip Near: 0.1000000015, Clip Far: 100
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.ApplyCameraTransform: Applying camera rotation: X: 0, Y: 0, Z: 0
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.ApplyCameraTransform: Translating camera to position: X: 0, Y: 0, Z: -14
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.ApplyCameraTransform: Camera transform completed
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Clearing screen with ClearScreenMode = csmClear and CurrentRenderTarget = nil
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: ClearColor - R: 0.501960814, G: 0, B: 0.501960814, A: 1
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Screen cleared successfully.
10-08 10:51:56.813 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Setting ambient light color
10-08 10:51:56.814 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: No lights found, using default light position
10-08 10:51:56.814 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Rendering models and application
10-08 10:51:56.814 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Rendering models
10-08 10:51:56.814 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Rendering application
10-08 10:51:56.814 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Removing lights
10-08 10:51:56.814 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Flushing OpenGL commands
10-08 10:51:56.827 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Swapping buffers
10-08 10:51:56.827 11594 11636 E ZgeAndroid: TZApplication.UpdateScreen: Screen update completed
10-08 10:51:56.827 11594 11636 E ZgeAndroid: TZApplication.Main: UpdateScreen executed
10-08 10:51:56.827 11594 11636 E ZgeAndroid: TZApplication.Main: Garbage collecting, Alloc Count: 2
10-08 10:51:56.827 11594 11636 E ZgeAndroid: TZApplication.Main: Terminating status: False
10-08 10:51:56.828 11594 11636 E ZgeAndroid: TZApplication.Main: Current time: 0.8286730051
10-08 10:51:56.828 11594 11636 E ZgeAndroid: TZApplication.Main: Frame processing initiated
10-08 10:51:56.828 11594 11636 E ZgeAndroid: TZApplication.Main: UpdateTime called
10-08 10:51:56.828 11594 11636 E ZgeAndroid: MainSlice: Starting main update cycle
10-08 10:51:56.828 11594 11636 E ZgeAndroid: MainSlice: No current music to update
10-08 10:51:56.828 11594 11636 E ZgeAndroid: MainSlice: No current state to update
10-08 10:51:56.828 11594 11636 E ZgeAndroid: MainSlice: Executing OnUpdate commands
10-08 10:51:56.828 11594 11636 E ZgeAndroid: TExpAddToPointer.Execute: Starting execution
10-08 10:51:56.828 11594 11636 E ZgeAndroid: TExpAddToPointer.Execute: Popped value V: 32
10-08 10:51:56.828 11594 11636 E ZgeAndroid: TExpAddToPointer.Execute: Popped pointer P: 411B7B00
10-08 10:51:56.828 11594 11636 E ZgeAndroid: TExpAddToPointer.Execute: Incremented pointer P: 411B7B20
10-08 10:51:56.828 11594 11636 E ZgeAndroid: TExpAddToPointer.Execute: Pushed updated pointer back to stack
10-08 10:51:56.828 11594 11636 E ZgeAndroid: Frame 1
Then it crashes randomly after a few frames. And not always at the same place in the code.

And here's the crash dump that goes with it:

Code: Select all

********** Crash dump: **********
Build fingerprint: 'google/sargo/sargo:12/SP2A.220505.008/8782922:user/release-keys'
#00 0x000000000059f89c /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::(anonymous namespace)::JniValueType*) (.__uniq.99033978352804627313491551960229047428)+1812) (BuildId: 1ee2c234829500686eefa384068e67c8)
#01 0x000000000059f0a8 /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CheckCallArgs(art::ScopedObjectAccess&, art::(anonymous namespace)::ScopedCheck&, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, art::InvokeType, art::(anonymous namespace)::VarArgs const*) (.__uniq.99033978352804627313491551960229047428)+76) (BuildId: 1ee2c234829500686eefa384068e67c8)
#02 0x00000000005a46f4 /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::__va_list, art::Primitive::Type, art::InvokeType) (.__uniq.99033978352804627313491551960229047428)+232) (BuildId: 1ee2c234829500686eefa384068e67c8)
#03 0x00000000005a74d8 /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallStaticIntMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list) (.__uniq.99033978352804627313491551960229047428.llvm.10145813973330161544)+76) (BuildId: 1ee2c234829500686eefa384068e67c8)
#04 0x000000000004509c /data/app/~~WzM-AujtO1JGB9Ob-MXTag==/com.txori.omeganaut-Fbs6WlbwCDCfFzz6L_NppQ==/lib/arm64/libzgeandroid.so (ZPLATFORM_$$_AUDIOCALLBACK$POINTER$$INT64+828) (BuildId: 6b98f8eb685bb8a66253ffd117f31d2cd5ced61a)
Crash dump is completed
The only weird thing that I see is the definition in ZPlatform.pas:
TDesignerAudioCallback = procedure(P : pointer; FrameCount : integer);

The pointer is called P, while I wrote Data in my changes to 64 bits, a mistake:
{$IFDEF CPU64}
function AudioCallback(Data : pointer) : Int64;
{$ELSE}
function AudioCallback(P : pointer): LongInt;
{$ENDIF}

But naming them both to P doesn't change a thing, as it doesn't seems to be used afterwards.
Post Reply