Force Close

Zate

Member
I've created a simple game, but every time I click on the start button the app closes... I don't know what to do or what happened, I didn't do anything that might generate force close. I attached all the b4a files.
P.S. Inizia means start
EDIT: SOLVED
 
Last edited:

Zate

Member
I opened an old version of b4a source and tried to copy and paste the new things. I detected the error (timer intervals, I don't know why) and changed them.
 
Upvote 0

pappicio

Active Member
Licensed User
Longtime User
I opened an old version of b4a source and tried to copy and paste the new things. I detected the error (timer intervals, I don't know why) and changed them.

I tried your game, and starts well, but when I kill the first "zanzara", then appen that the game forces itself close
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
There's a null pointer exception being thrown in a Timer object. It's probably be due to this Timer bug. Setting the interval starts the Timer ticking and if this is done before the Timer is Initialized then a null pointer error occurs when the Timer tick occurs.

EDIT:- Strictly the exception occurs if the Timer is not Initialized between the interval being set and the tick occurring, so it can appear as a timing related bug.

Also, though not part of this problem, Timers should be declared as Process_Globals otherwise odd things can happen on Pause and Resume.
 
Last edited:
Upvote 0
Top