Search found 770 matches

by Ats
Fri Nov 08, 2024 10:52 am
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

I suppose replacing the last remnants of MethodV makes sense. So in ReadAssetFile I replaced: Buffer := Env^.CallObjectMethodV(Env, Jobject(AndroidThis), Mid, C([Env^.NewStringUTF(Env,FileName)]) ); by Buffer := Env^.CallObjectMethodA(Env, Jobject(AndroidThis), Mid, C([Env^.NewStringUTF(Env,FileName...
by Ats
Thu Nov 07, 2024 10:16 am
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

So I’ve been running tests for days, and the 64-bit APK still crashes randomly. Sometimes it even crashes during the disclaimer screen, when nothing is running in the background yet. Also, when I run the game again after a crash, sometimes names disappear from the high score table. That’s strange be...
by Ats
Thu Oct 31, 2024 10:23 pm
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

All right, I think I found the last culprit :lol: I was still initializing SunVox, even though there's no more music in the game, while waiting for me to finish composing the music (on FamiStudio, it's complicated). With SunVox entirely deactivated, it's been a good while since the game didn't rando...
by Ats
Thu Oct 31, 2024 9:24 am
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

Thanks. I found another error, but comming from me: <Bitmap Name="BitmapSpaceColors" Width="5" Height="1"> <Producers> <BitmapExpression> <Expression> <![CDATA[float c1 = cos(X + 1); float c2 = cos(X - 1); Pixel.R = NebulaeColor1.R * c1 + NebulaeColor2.R * c2; Pixel.G =...
by Ats
Wed Oct 30, 2024 10:35 am
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

Is it possible that setting Pixel.R (G or B) can crash if it's under 0 or over 1?

I'm still getting some scarce random crashes, so I started sanitizing everything, just in case.
For example:
Pixel.R = max(0, min(GroundColor[0][0,0] + offset, 1));
by Ats
Tue Oct 29, 2024 10:40 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 106
Views: 304767

Re: 3D Physics with ZgeBullet

I tested every setting from rado1's ZGEBullet examples: Demo 1: float t = App.DeltaTime; zbtStepSimulation(t, 0, 0); Demo 2: float t = App.DeltaTime; zbtStepSimulation(t, 3, t/2); Demo 3: float t = App.DeltaTime; zbtStepSimulation(t, 1, t); Demo 4: zbtStepSimulation(App.DeltaTime, 0, 0); zbtStepSimu...
by Ats
Tue Oct 29, 2024 2:42 pm
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

So I just tried the manual division per zero with SetExceptionMask deactivated, it doesn't change anything. The app is crashing in Android Studio, and running just fine on the real hardware. Nevermind :roll: I saw that you validated my commits, but I forgot to add the modification to avoid division ...
by Ats
Mon Oct 28, 2024 4:47 pm
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

I just played Omeganaut for an hour without any crashes. The only two division-by-zero errors were due to BitmapExpression not handling bitmaps with a width or height of 1 on Android 64-bit in libzegandroid. A very specific issue and hard to track down... Normally, I'd let the user’s ZGE app crash o...
by Ats
Mon Oct 28, 2024 1:04 pm
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

Even with that line (+ uses Math ) Android Studio doesn't appreciate the division per zero in OnUpdate. The real device doesn't seem to be affected. But it was crashing often before with the division per zero on the bitmap width. It behaves exactly the same without the addition of that line. <?xml v...
by Ats
Mon Oct 28, 2024 12:24 pm
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

And the problem comes from Task.YStep := 1/(H-1); in procedure TBitmapExpression.ProduceOutput(Content : TContent; Stack: TZArrayList); var SourceB,B : TZBitmap; H,W,I : integer; Pixels,P : PColorf; TaskCount,RowsLeft : integer; TaskList : pointer; Task : PPixelTask; TaskH : integer; begin SourceB :...
by Ats
Mon Oct 28, 2024 12:16 pm
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

All right, the problem seems to be coming from here: <Bitmap Name="BitmapSpaceColors" Width="5" Height="1"> <Producers> <BitmapExpression> <Expression> <![CDATA[float c1 = cos(X + 1); float c2 = cos(X - 1); Pixel.R = NebulaeColor1.R * c1 + NebulaeColor2.R * c2; Pixel.G ...
by Ats
Mon Oct 28, 2024 11:31 am
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

float x=1, y=0, z=x/y; doesn't seem to bother the phone, but it crashes on Android Studio if it is located in OnUpdate. It doesn't crash if it is calculated only once at start. Shouldn't this be handled by ZPlatform_Android.inc ? Math.SetExceptionMask([exZeroDivide,exOverflow,exUnderflow,exPrecisio...
by Ats
Sun Oct 27, 2024 9:27 am
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 106
Views: 304767

Re: 3D Physics with ZgeBullet

I have a technical question regarding the update of the bullet simulation. I always used it like this: float t = App.DeltaTime; zbtStepSimulation(t, 0, 0); But the documentation is talking about: @fn void zbtStepSimulation( float timeStep, int maxSubSteps, float fixedTimeStep) @brief Proceed the sim...
by Ats
Sat Oct 26, 2024 11:28 am
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

I already asked this before , but is it normal that JNI_OnLoad isn't found at startup? It is defined in jni.pas function JNI_OnLoad(vm:PJavaVM;reserved:pointer):jint;{$ifdef mswindows}stdcall;{$else}cdecl;{$endif} const curVM:PJavaVM=nil; curEnv:PJNIEnv=nil; implementation function JNI_OnLoad(vm:PJ...
by Ats
Fri Oct 25, 2024 4:46 pm
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 236
Views: 43365

Re: Google Play New problem : 64bits

So I reverted every test I made for the last few days, and just added the modification to calculate XStep, and now the circles are fine. I'm going to play for a while and see if there are other surprises :wink: Edit: I played for a long while and only got it to bug once, the bug with the unhelpful m...