The game works perfectly fine from the editor and when export debug is enable.
But, when I export with this option disabled, my game crashes at a very specific moment.
The problem is that I can't get any output from the exe file... even the log files are very strange as the output is corrupted and in the wrong order (compared to debug mode). Also the most important ones are missing (I mean my print() messages)
Game FPS: 1
Game FPS: 32
Loading resource: res://scenes/mode-menu.tscn
Loading resource: res://postprocess-effects/CRTeffect_layer.tscn
Loading resource: res://scripts/mode-menu.gdc
Game FPS: 59
Loading resource: res://scenes/Team-deathmatch.tscn
Loading resource: res://classes/subMarine.gdc
Loading resource: res://classes/torpedo.gdc
Loading resource: res://classes/weapon.gdc
Loading resource: res://VirtualJoystick/Joystick.tscn
Loading resource: res://VirtualJoystick/joystick_background.png
Loading resource: res://VirtualJoystick/joystick_handle.png
So i've identified that the game crashes when ether the player or the AI dies.
After LOTS of tests I suspect to have found the problem (and of course it's at the worst place :') )
queue_free() to delete ai and player nodes. I have mutliple check like that everywhere in my code
if player != null:
# do player related things
So for me, the exe code doesn't execute in the same way than with the editor and causes this
queue_free() to mess something, do you think that it will solve the problem if instead of deleting nodes I "disable" them to respawn somewhere else ?
Or is it something obvious that I have missed ?
I mean, it's frustrating that it works on debug but not on release as I may have to modify all the game now ^^
I cleaned ALL my code of all those
!= null check. It basically uses signals and boolean variables
Now it works