going above and to the left of the level border in supaplex engine crashes the game

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

Moderators: Flumminator, Zomis

Post Reply
ncrecc
Posts: 287
Joined: Thu Jul 12, 2018 12:59 am

going above and to the left of the level border in supaplex engine crashes the game

Post by ncrecc »

4.4.0.0-test-3.
003.level
(664 Bytes) Downloaded 936 times
steps to reproduce:
  1. go up 6 tiles
  2. go left 2 tiles
  3. game crashes
if this is an invalid state for a supaplex level, know that i got here by just resizing a blank level template to 15x15, then changing the engine to supaplex.
User avatar
Holger
Site Admin
Posts: 4278
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: going above and to the left of the level border in supaplex engine crashes the game

Post by Holger »

At least on my Mac, this does not cause a crash (but I can go back to the start position by reversing all movements of step 1 and 2). But this is no indication of _not_ using invalid memory, of course. I will check again on Linux (although crashes in such cases usually are best to be reproduced on Windows systems, which either has smaller memory pages or is generally more picky regarding access to invalid memory, which is a good thing, of course).

In general, what happens here is indeed an emulation of accessing invalid memory in the original DOS version of Supaplex, which was used in some rare edge case levels to reach off-screen bytes which happen to be infotrons just by chance, to solve such weird levels. In R'n'D, this _should_ be emulated in a crash-safe way, using off-screen playfield areas surrounded by an inaccessible steel wall border (as the native Supaplex engine does not do playfield boundary checking).

However, I assume that this does not work correctly with non-standard playfield sizes (compared to original Supaplex), so invalid memory can be reached, causing a crash. I'll check and (hopefully) fix this.

Thanks for reporting this critical bug.
Post Reply