apoplexy v3.0 released

Windows and Linux editor of PoP1 (for DOS and SNES) and PoP2 (for DOS).

Moderator: English Moderator Team

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3018
Joined: April 9th, 2009, 10:58 pm
Contact:

apoplexy v3.0 released

Postby Norbert » February 4th, 2016, 6:01 pm

I've just released version 3.0 of apoplexy.

The GNU/Linux version is available here.
The Windows version can be downloaded here.

No new features, just the final 3.0 version, as promised. :)

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3018
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: apoplexy v3.0 released

Postby Norbert » October 1st, 2016, 5:28 pm

I've found a bug.

This image of the ddd debugger in action shows the problem:

https://s15.postimg.org/mx1630hiz/bug.png
http://i.imgur.com/dnC9TuZ.png

When moving a PoP1/2 for DOS room, ShowRooms() is being called with iRoom -1, and subsequently "iDone[-1] = 1;" will set iZSNES to 1 out of nowhere.

The resulting warning on the console - because it never expects DOS will have iZSNES 1 - is:
-----
[ WARN ] SDL_RenderCopy (imgzsnes): Invalid texture
-----
This can be replicated by moving a room, but only after recompiling.
Either gcc or SDL has changed, or my PC just happens to be in a new state where it decides to modify the memory area that contains iZSNES.

Regardless, this is clearly a bug.
I won't be fixing it so I haven't looked thoroughly into what could be a proper solution (I'd have to re-familiarize myself with the code), but a workaround seems to be:
if (iRoom != -1) { iDone[iRoom] = 1; }

David
The Prince of Persia
The Prince of Persia
Posts: 1399
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: apoplexy v3.0 released

Postby David » October 2nd, 2016, 11:00 am

Norbert wrote:When moving a PoP1/2 for DOS room, ShowRooms() is being called with iRoom -1,

I found this line: (line 14859)

Code: Select all

            ShowRooms (-1, iMovingNewX, iMovingNewY, 0);

Here, iRoom is explicitly -1.

Norbert wrote:a workaround seems to be:
if (iRoom != -1) { iDone[iRoom] = 1; }

There is already an "if (iRoom != -1)" a few lines above (line 15435), the assignment could be moved into that.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3018
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: apoplexy v3.0 released

Postby Norbert » October 2nd, 2016, 4:36 pm

David wrote:
Norbert wrote:When moving a PoP1/2 for DOS room, ShowRooms() is being called with iRoom -1,

I found this line: (line 14859)

Code: Select all

            ShowRooms (-1, iMovingNewX, iMovingNewY, 0);

Here, iRoom is explicitly -1.


Yeah, that's the call I meant.

David wrote:
Norbert wrote:a workaround seems to be:
if (iRoom != -1) { iDone[iRoom] = 1; }

There is already an "if (iRoom != -1)" a few lines above (line 15435), the assignment could be moved into that.


Maybe, yes.


Return to “apoplexy”

Who is online

Users browsing this forum: No registered users and 1 guest