Try adding this line as first line in C function:
Fillchar(Params, SizeOf(Params), 0);
Search found 2329 matches
- Wed Oct 09, 2024 4:48 pm
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
- Wed Oct 09, 2024 9:29 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
Aha, sorry it should be "VPointer" and "PJValue".
I'm impressed with the solutions that ChatGPT suggest for you, they are better than expected.
I'm impressed with the solutions that ChatGPT suggest for you, they are better than expected.
- Wed Oct 09, 2024 9:03 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
Try this change:
Code: Select all
Params : array[0..10] of JValue;
function C(const args : array of const) : JValue;
var
I : integer;
begin
for I := 0 to High(args) do
Params[I] := args[I].vtPointer;
Result := @Params;
end;
- Wed Oct 09, 2024 8:15 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
Try changing to NewObjectA.
- Wed Oct 09, 2024 6:57 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
Ok, let's keep trying and focus on jni.
1. Undo the changes to the two files that I suggested.
2. Then change the CallStaticIntMethodV to CallStaticIntMethodA like this:
1. Undo the changes to the two files that I suggested.
2. Then change the CallStaticIntMethodV to CallStaticIntMethodA like this:
Code: Select all
bufferSizeInBytes := Env^.CallStaticIntMethodA(env, cAudioTrack, mGetMinBufferSize, C([AudioPlayer.AudioRate, 3, 2]));
- Tue Oct 08, 2024 11:40 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
Seems it is the "C" function that converts arguments that does not work on 64-bits.
Please try the attached changes to jni.pas and ZPlatform_Android.inc.
Please try the attached changes to jni.pas and ZPlatform_Android.inc.
- Tue Oct 08, 2024 10:07 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
Also I just noticed the constant to choose stereo is 12 and not 2: https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_STEREO So you could try changing 2 to 12 like this: bufferSizeInBytes := Env^.CallStaticIntMethodV(env, cAudioTrack, mGetMinBufferSize, C([AudioPlayer.Audi...
- Tue Oct 08, 2024 9:51 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
Try printing the bufferSizeInBytes value after it is assigned in ZPlatform_Android.
Platform_error('audio buffer size: ' + inttostr(bufferSizeInBytes));
Platform_error('audio buffer size: ' + inttostr(bufferSizeInBytes));
- Tue Oct 08, 2024 7:33 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
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?
About the audio crash: if you try to play a sound do you hear this at all before it crashes?
- Mon Oct 07, 2024 8:22 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
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.
For the Read beyond EOF issue: please try reimport the original model if you still have it.
- Mon Oct 07, 2024 7:16 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
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
- Fri Oct 04, 2024 3:08 pm
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
Not sure if it matters but you could specify more debug options when compiling like this "-g -gl -gw"
- Fri Oct 04, 2024 7:28 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
Thread 20 "GLThread 731" received signal SIGSEGV, Segmentation fault. [Switching to Thread 9950.10745] When you see this, then it could be possible from gdb to get the callstack of the crashing thread (in this case thread 20). I've never used gdb but it seems getting the callstack is &quo...
- Wed Oct 02, 2024 7:04 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
Let's roll back a bit. Could there be problems with the size of the variables I changed in this commit ? Those changes look good so I don't think they are the problem. It seems it is possible to debug apps with jni native code from Android Studio: https://stackoverflow.com/questions/32413593/how-to...
- Mon Sep 30, 2024 11:17 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 165
- Views: 40187
Re: Google Play New problem : 64bits
Looks like a memory problem again. The vec3 memory is not initalized for some reason.