The Dink Network

Reply to Re: Dink HD 1.7.1 Beta Report - Initiation

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
September 17th 2017, 07:36 PM
seth.gif
Seth
Peasant He/Him Japan
 
Thanks, that save state was very helpful. Yeah, the crash happens when the magic hits the rock, the rock tries to ask the missile sprite what its script is, but the script doesn't exist, but the sprite doesn't know that and tries to access a null pointer.

I fixed it so it won't crash. (will be in 1.74) From the save state I saved at the "strange machine", carried that save to Dink 1.08 and verified it also did crash with that, so the memory access error was also in the original.

I also found the underlying engine bug that causes it in the first place but I'm afraid to fix it so leaving it commented out for now.

/*
//NOTE: This would fix a bug where a script doesn't properly remove itself from an owner sprite but.. could cause behavior differences so not enabling it for now
if (g_scriptInstance[k]->sprite > 0 && g_scriptInstance[k]->sprite < C_MAX_SPRITES_AT_ONCE)
{
if (g_sprite[g_scriptInstance[k]->sprite].active && g_sprite[g_scriptInstance[k]->sprite].script == k)
{
//um.. guess we should tell the sprite it no longer has an associated script, right?!
g_sprite[g_scriptInstance[k]->sprite].script = 0;
}

}
*/