Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Crash in Magic Show 2 (Concerning rock giants and platforms)
New Topic New Poll Post Reply
Poster Message
NoahT
Level: Smitemaster
Avatar
Rank Points: 1133
Registered: 06-17-2003
IP: Logged

File: magicshowcrash.PNG (300.2 KB)
Downloaded 98 times.
License: Public Domain
icon Crash in Magic Show 2 (+1)  
So here's the deal. In the attached screenshot, Beethro is on a platform weighed down by a rock giant right next to him. So, of course, attempting to move the platform results in death by the giant, but doing so always crashes TCB, bringing up the error message within the screenshot.

-Noah

____________________________
And in the end, the love you take is equal to the love you make.

My stuff:
Click here to view the secret text

01-27-2008 at 02:46 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Doom
Level: Smitemaster
Avatar
Rank Points: 3226
Registered: 07-05-2004
IP: Logged
icon Re: Crash in Magic Show 2 (+1)  
Confirmed that this happens and experimented a bit more.

Platforms don't matter at all. Briars neither, since the same works with bombs. What's important is that the giant is killed.

Move Beethro one step down in NoahT's screenshot and everything works properly. Flipping the room vertically and/or horisontally removes this problem as well. Appears to require a very specific situation.
01-27-2008 at 07:56 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
coppro
Level: Smitemaster
Rank Points: 1308
Registered: 11-24-2005
IP: Logged
icon Re: Crash in Magic Show 2 (0)  
I'd be glad to test this (sounds like a corrupt pointer), but I will need a demo to get to that position, as I cannot do so myself.

Thanks!
01-27-2008 at 08:27 AM
View Profile Show all user's posts Quote Reply
NoahT
Level: Smitemaster
Avatar
Rank Points: 1133
Registered: 06-17-2003
IP: Logged

File: MS2 Extra Tricks 2W buggy position.demo (1.7 KB)
Downloaded 44 times.
License: Public Domain
icon Re: Crash in Magic Show 2 (+1)  
Here you go...

-Noah

____________________________
And in the end, the love you take is equal to the love you make.

My stuff:
Click here to view the secret text

01-27-2008 at 09:21 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
larrymurk
Level: Smitemaster
Avatar
Rank Points: 1911
Registered: 12-09-2004
IP: Logged
icon Re: Crash in Magic Show 2 (+1)  
If only architects would test their holds a little more thoroughly..
01-27-2008 at 01:29 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Briareos
Level: Smitemaster
Avatar
Rank Points: 3516
Registered: 08-07-2005
IP: Logged
icon Re: Crash in Magic Show 2 (0)  
larrymurk wrote:
If only architects would test their holds a little more thoroughly..
As if testing ever was able to prove that all bugs were gone - all it can do is find bugs, not prove their absence... :D

np: Vangelis - Mail From India (Blade Runner Trilogy - BR 25 (Disc 3))

____________________________
"I'm not anti-anything, I'm anti-everything, it fits better." - Sole
R.I.P. Robert Feldhoff (1962-2009) :(
01-27-2008 at 02:39 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
Alneyan
Level: Smitemaster
Rank Points: 622
Registered: 07-06-2004
IP: Logged
icon Re: Crash in Magic Show 2 (0)  
Now how could you adopt the Curry-Howard isomorphism to DROD holds...
01-27-2008 at 02:50 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged
icon Re: Crash in Magic Show 2 (+3)  
Think I got this one.

The crash occurs during the HandleEventsForPlayerDeath routine at the point where it checks to see which monster performed the kill. It hits problems, however, if the monster happens to have been deleted.

Normal monsters aren't deleted - just moved to a dead monsters list. But a piece of a "big" monster is deleted when the monster is killed, just leaving the parent monster in the dead monster list.

So the problem comes back to Splitter.cpp, where it sets which monster killed the player. Currently, whichever monster "piece" stepped on the player is the killer, and this hits a problem if the piece is then removed (because the Rock Giant is killed).

So I think the fix would probably be the following in Splitter.cpp's MovePiece routine:
	//Did monster step on swordsman?
	if (pMonster && pMonster->IsPiece())
	{
		CMonsterPiece *pPiece = DYN_CAST(CMonsterPiece*, CMonster*, (CMonster*)pMonster);
		pMonster = pPiece->pMonster;
	}
	if (wDestX == wSX && wDestY == wSY)
	{
		if (wDestX == this->pCurrentGame->swordsman.wX &&
			 wDestY == this->pCurrentGame->swordsman.wY)
			CueEvents.Add(CID_MonsterKilledPlayer, pMonster);
		else
			CueEvents.Add(CID_NPCBeethroDied, pMonster);
	}


That should redirect the killer to the main Rock Giant rather than one of the pieces. I don't *think* it matters which piece gets the kill overall, since as far as I can see, the only time it's ever checked is the routine in HandleEventsForPlayerDeath that I mentioned.

===

While I'm looking into this, Rock Giants have another little 'bug' in that if a monster piece gets the kill, the Rock Giant won't do the killing animation.

This is because the "chomp" animation is done by calling SwitchAnimationFrame at Beethro's location, but if a monster piece is there instead of the monster itself, it won't work. (Note: the 'main' location of a Rock Giant is its NW square, so if a Rock Giant kills you with that piece, the animation plays.) It'd probably need another check for Rock Giants in particular and a relocation of the tile location as a result.

Oh, and there seem to be a bunch of NPC Beethro oddities on death (not least when a serpent kills an NPC Beethro - *you're* the one who goes into death spasms, regardless of your player role), but I haven't fully looked into it, so I'll just mention it in passing for now in case someone else wants to check up on it.
01-28-2008 at 03:09 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5058
Registered: 02-04-2003
IP: Logged
icon Re: Crash in Magic Show 2 (0)  
Thanks, TFMurphy! I added your fix to build 58. Now, to make sure we don't forget to take care of the rest of this, I'll repeat it here:
TFMurphy wrote:
While I'm looking into this, Rock Giants have another little 'bug' in that if a monster piece gets the kill, the Rock Giant won't do the killing animation.

This is because the "chomp" animation is done by calling SwitchAnimationFrame at Beethro's location, but if a monster piece is there instead of the monster itself, it won't work. (Note: the 'main' location of a Rock Giant is its NW square, so if a Rock Giant kills you with that piece, the animation plays.) It'd probably need another check for Rock Giants in particular and a relocation of the tile location as a result.

Oh, and there seem to be a bunch of NPC Beethro oddities on death (not least when a serpent kills an NPC Beethro - *you're* the one who goes into death spasms, regardless of your player role), but I haven't fully looked into it, so I'll just mention it in passing for now in case someone else wants to check up on it.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
02-29-2008 at 01:31 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5058
Registered: 02-04-2003
IP: Logged
icon Re: Crash in Magic Show 2 (0)  
TFMurphy wrote:
While I'm looking into this, Rock Giants have another little 'bug' in that if a monster piece gets the kill, the Rock Giant won't do the killing animation.

This is because the "chomp" animation is done by calling SwitchAnimationFrame at Beethro's location, but if a monster piece is there instead of the monster itself, it won't work. (Note: the 'main' location of a Rock Giant is its NW square, so if a Rock Giant kills you with that piece, the animation plays.) It'd probably need another check for Rock Giants in particular and a relocation of the tile location as a result.

Oh, and there seem to be a bunch of NPC Beethro oddities on death (not least when a serpent kills an NPC Beethro - *you're* the one who goes into death spasms, regardless of your player role), but I haven't fully looked into it, so I'll just mention it in passing for now in case someone else wants to check up on it.
Thanks again for reporting these. These should be fixed in build 60.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
03-01-2008 at 05:49 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Crash in Magic Show 2 (Concerning rock giants and platforms)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.