Game Crash when too much fill

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
User avatar
SLAPPYHAPPY2000
Posts: 110
Joined: Wed Jun 03, 2020 10:27 am

Game Crash when too much fill

Post by SLAPPYHAPPY2000 »

When using the fill tool on an area too big, like a 128x128 level, you get a very lovely game crash!
I found this out while making one of my levels and I didn't save it beforehand!
Lol!
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Game Crash when too much fill

Post by Holger »

Argh, that's horrible! :shock:

Indeed I was able to reproduce this inside a Windows 10 VM (while having no problems and no crashes on my Linux box and on my Mac)! :(

I will try to debug and fix this! :|
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Game Crash when too much fill

Post by Holger »

Found and fixed it!

The problem was the recursive flood fill function, which went too deep and exploded the stack on a 128x128 sized level! :shock:

(Did not happen on Linux with its 8 MB stack size, while it blew up the 1 MB stack on Windows. :cry: )

I've replaced the recursive function with an iterative one, which should also work fine on systems with a small stack. :D

Will be available in the next release version.
Post Reply