Missing hex-menu on saved game load (campaign), crash soon afterwards

Our old place to report Bugs, it's not used anymore. To report bugs, please read this topic.

Missing hex-menu on saved game load (campaign), crash soon afterwards

Postby borgcube » 23 May 2007, 11:04

Warzone2100 Version
2.0.6
SVN - revision 1328

Operating System
Gentoo Linux x86_64

Hardware Information
AMD64 2800+
ATI Radeon 9600 (RV350AQ)
SB Audigy LS
Asus K8N motherboard

Warzone2100 Configuration
http://rafb.net/p/O28AsP27.html

Bug Description
When I try to load attached save-game 2 things occur:
1. the game loads without the hex-menu in the lower left
2. the game crashes about half a minute later: i click the blinking button in the top left to make the transport continue and on the new map the game crashes with
Code: Select all
~ $ warzone2100
error   : widgSetButtonState: Couldn't find button/click form from ID
error   : Assert in Warzone: widget.c:1213 : widgSetButtonState (FALSE), last script event: 'startEvnt'
warzone2100: widget.c:1213: widgSetButtonState: Assertion `(0)' failed.
warzone2100: No such file or directory.
Saved dump file to '/tmp/warzone2100.gdmp'
Aborted


This issue is reproducible, spitting out
http://rafb.net/p/XUBr1457.html
http://rafb.net/p/UhhPki92.html
Attachments

[The extension rar has been deactivated and can no longer be displayed.]

borgcube
Greenhorn
 
Posts: 11
Joined: 22 May 2007, 19:36

Re: Missing hex-menu on saved game load (campaign), crash soon afterwards

Postby Giel » 23 May 2007, 18:07

It seems you've compiled without debuging symbols or simply stripped your binary. This means both of those dumps are useless to us (the one in your skirmish report included). Could you try to recompile with CFLAGS=-g on the configure line.

E.g.:
Code: Select all
CFLAGS=-g ./configure your-other-config-options-go-here


PS Updating to r1329 should also work, since I've now enabled debugging symbols for all builds. (So a simple ./configure should do just fine)
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
User avatar
Giel
Regular
Regular
 
Posts: 725
Joined: 26 Dec 2006, 19:18

Re: Missing hex-menu on saved game load (campaign), crash soon afterwards

Postby borgcube » 23 May 2007, 20:59

Ok, so I'll just recompile the new version and everything will be alright?

PS: My compiler's flags are set to
Code: Select all
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="$CFLAGS"
LDFLAGS="-Wl,-O1"
Is that alright? Or will I have to use another setup here?
borgcube
Greenhorn
 
Posts: 11
Joined: 22 May 2007, 19:36

Re: Missing hex-menu on saved game load (campaign), crash soon afterwards

Postby Giel » 23 May 2007, 22:02

borgcube wrote:Is that alright? Or will I have to use another setup here?

Should be good in combination with my change in r1329.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
User avatar
Giel
Regular
Regular
 
Posts: 725
Joined: 26 Dec 2006, 19:18

Re: Missing hex-menu on saved game load (campaign), crash soon afterwards

Postby borgcube » 23 May 2007, 23:41

ok.
here comes a new trace.

seems like the widget-stuff is not causing segfaults anymore, still it crashes pretty soon in this mission. but apparently i don't get the hex-menu the first time i load *any* campaign-savegame. also the resource bar at the bottom is missing.

console output:
http://rafb.net/p/LLNBTY45.html

backtrace:
http://rafb.net/p/8AtEJ626.html
borgcube
Greenhorn
 
Posts: 11
Joined: 22 May 2007, 19:36

Re: Missing hex-menu on saved game load (campaign), crash soon afterwards

Postby borgcube » 25 May 2007, 04:46

ah, well, finally enabled proper backtracing.
and with devurandom's help i tried some tracing myself.

1. description:
- i load earlier attached savegame
- game gets loaded but without the hex-menu (lower left) and the energy bar
- i reload attached savegame
- game gets loaded with the hex-menu but still without the energy bar
- i hit the fly button in the top left and the transport leaves for the next map
- i order any unit to fire somewhere and the game crashes on projectile impact (which is not drawn)

2. attempt to trace the issue:
#3  0x0000000000566d9d in pie_Draw3DShape2 (shape=0x0  [...] at piedraw.c:347
was the starting point. finally i ended up with that code block:

Code: Select all
   if(GetGameMode() == GS_NORMAL)
      {

         psStats->pMuzzleGraphic = (iIMDShape *) resGetData("IMD", muzzleGfx);
         if (psStats->pMuzzleGraphic == NULL)
         {
            debug( LOG_ERROR, "Cannot find the muzzle PIE for record %s", getStatName(psStats) );
            abort();
            return FALSE;
         }


         psStats->pInFlightGraphic = (iIMDShape *) resGetData("IMD", flightGfx);
         if (psStats->pInFlightGraphic == NULL)
         {
            debug( LOG_ERROR, "Cannot find the flight PIE for record %s", getStatName(psStats) );
            abort();
            return FALSE;
         }

         psStats->pTargetHitGraphic = (iIMDShape *) resGetData("IMD", hitGfx);
         if (psStats->pTargetHitGraphic == NULL)
         {
            debug( LOG_ERROR, "Cannot find the target hit PIE for record %s", getStatName(psStats) );
            abort();
            return FALSE;
         }

         psStats->pTargetMissGraphic = (iIMDShape *) resGetData("IMD", missGfx);
         if (psStats->pTargetMissGraphic == NULL)
         {
            debug( LOG_ERROR, "Cannot find the target miss PIE for record %s", getStatName(psStats) );
            abort();
            return FALSE;
         }

         psStats->pWaterHitGraphic = (iIMDShape *) resGetData("IMD", waterGfx);
         if (psStats->pWaterHitGraphic == NULL)
         {
            debug( LOG_ERROR, "Cannot find the water hit PIE for record %s", getStatName(psStats) );
            abort();
            return FALSE;
         }
         //trail graphic can be null
         if (strcmp(trailGfx, "0"))
         {
            psStats->pTrailGraphic = (iIMDShape *) resGetData("IMD", trailGfx);
            if (psStats->pTrailGraphic == NULL)
            {
               debug( LOG_ERROR, "Cannot find the trail PIE for record %s", getStatName(psStats) );
               abort();
               return FALSE;
            }
         }
         else
         {
            psStats->pTrailGraphic = NULL;
         }
      }


Extending the if-check to GS_SAVEGAMELOAD apparently fixes that issue.


PS: 2 dumps of that issue:
http://rafb.net/p/zfnz5y95.html
http://rafb.net/p/HKWfXN30.html

PPS: Attached is proposed patch.

PPPS: The issue with missing Hex-Menu (on first load) and missing energy-bar (on any campaign savegameload) remains.
Attachments

[The extension has been deactivated and can no longer be displayed.]

borgcube
Greenhorn
 
Posts: 11
Joined: 22 May 2007, 19:36

Re: Missing hex-menu on saved game load (campaign), crash soon afterwards

Postby DevUrandom » 25 May 2007, 12:16

I can't even load that savegame:
(gdb) p psSaveDroid->numWeaps
$2 = 4281295360

That really is not a sane amount...
User avatar
DevUrandom
Regular
Regular
 
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Missing hex-menu on saved game load (campaign), crash soon afterwards

Postby borgcube » 25 May 2007, 21:52

ok. as you told me, i completely removed the parenting if-conditions and left the child-if-conditions alone. seems to run fine without any problems. seems to be just an extra-mile for the software.
borgcube
Greenhorn
 
Posts: 11
Joined: 22 May 2007, 19:36

Re: Missing hex-menu on saved game load (campaign), crash soon afterwards

Postby DevUrandom » 26 May 2007, 16:02

This should be fixed in r1347.
The problem was that before my mainloop refactoring the gamemode was set to GS_NORMAL when loading a savegame. The GS_SAVEGAMELOAD status was only used to enter savegameloading, but reset as soon as the real loading started.
I reverted to the original behavior.
User avatar
DevUrandom
Regular
Regular
 
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Missing hex-menu on saved game load (campaign), crash soon afterwards

Postby UrbanVoyeur » 26 May 2007, 16:39

borgcube wrote:PPPS: The issue with missing Hex-Menu (on first load) and missing energy-bar (on any campaign savegameload) remains.


I've seen the missing energy bar on loading games saved under previous trunk versions for some time (since 127x), plus a boatload of other crashes,  but I assumed it was because of changes that made games saved under earlier versions incompatible, since new games did not exhibit these behaviors.
UrbanVoyeur
Trained
Trained
 
Posts: 50
Joined: 10 Mar 2007, 05:03
Location: NYC


Return to Bug reporting