From f8a08fc1205330b379c50155498b56bb51d4f372 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Wed, 23 Oct 2002 14:36:54 +0000 Subject: [PATCH] Melee crash workaround (no real fix). git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@140 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/TODO | 30 ++++++++++++++++++------------ sc2/src/sc2code/tactrans.c | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/sc2/TODO b/sc2/TODO index 889bc6477..6f3f8d671 100644 --- a/sc2/TODO +++ b/sc2/TODO @@ -8,18 +8,6 @@ with no gameplay-altering features added. Serious bugs (crash the game, high priority): - The game crashes when there's no sound driver available -- In melee, after battle, the game crashes. - The ship icon is used when already freed. This happens because the old - 3DO code used to save the entire selection window as one image, while - Chris' new code redraws after each round. - Possible solutions: - - revert to the old behaviour - - delay the free until the memory is really no longer needed. - Make sure that the memory is always freed, so no memory leak is - introduced. - - reload the icon when needed - It looks like the same bug is present for the full game, though it isn't - fatal there (the memory is freed but not yet overwritten). - loading an old game crashes the game (at least on Linux). - Communication screens nonrepeatably but inevitably hang the system. This is probably a deadlock issue. @@ -61,6 +49,24 @@ Glitches (don't crash the game, medium priority): landing position (and so 'flashes' when crossfade ends) - Flashing rects aren't perhaps always exactly the size of actual 3do version, it should be checked (for example when selecting ship in fullgame battle) +- Melnorme graphics are corrupt. +- Shofixti doesn't work in melee. +- In melee, after battle, the game crashes. + The ship icon is used when already freed. This happens because the old + 3DO code used to save the entire selection window as one image, while + Chris' new code redraws after each round. + Possible solutions: + - revert to the old behaviour + - delay the free until the memory is really no longer needed. + Make sure that the memory is always freed, so no memory leak is + introduced. + - reload the icon when needed + It looks like the same bug is present for the full game, though it isn't + fatal there (the memory is freed but not yet overwritten). + Addition 2002-10-23: I commented out the free, so that the game wouldn't + crash anymore. This means the memory will not be freed until after the + complete battle (not just one fight). There's no permanent memory leak + though. Implementation bugs (low priority): - The main thread is still created by a direct all to the SDL function, diff --git a/sc2/src/sc2code/tactrans.c b/sc2/src/sc2code/tactrans.c index 553aa970e..6c0fd80ca 100644 --- a/sc2/src/sc2code/tactrans.c +++ b/sc2/src/sc2code/tactrans.c @@ -140,7 +140,7 @@ new_ship (PELEMENT DeadShipPtr) SetElementStarShip (DeadShipPtr, 0); RestartMusic = OpponentAlive (DeadStarShipPtr); - free_ship (DeadStarShipPtr, TRUE); +// free_ship (DeadStarShipPtr, TRUE); UnbatchGraphics (); if (GetNextStarShip (DeadStarShipPtr, WHICH_SIDE (DeadShipPtr->turn_wait)) && RestartMusic)