bugGlobulation 2 - Bugs: bug #19542, repair of a building leads to...

 
 

bug #19542: repair of a building leads to crash in alpha22

Submitted by:  None
Submitted on:  Sat 07 Apr 2007 08:45:32 AM UTC  
 
Severity: 5 - BlockerStatus: Fixed
Assigned to: NoneOpen/Closed: Closed
Release: NoneOperating System: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 15 Apr 2007 09:36:03 PM UTC, comment #7:

I click repair, but never cancel it. I let it run through then all of a sudden:

ConfigVector::get(4294967295) : warning : id is not valid, returning default
glob2: ConfigFiles.h:181: T* ConfigVector<T>::get(size_t) [with T = BuildingType]: Assertion `false' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread -1225648400 (LWP 8444)]
0xbfffe410 in __kernel_vsyscall ()
(gdb) bt
#0 0xbfffe410 in __kernel_vsyscall ()
#1 0xb7abffc0 in raise () from /lib/i686/libc.so.6
#2 0xb7ac1851 in abort () from /lib/i686/libc.so.6
#3 0xb7ab953b in __assert_fail () from /lib/i686/libc.so.6
#4 0x0805a465 in ConfigVector<BuildingType>::get ()
#5 0x080e15a4 in Building::removeForbiddenZoneFromUpgradeArea ()
#6 0x080e5ac5 in Building::updateBuildingSite ()
#7 0x080e66c9 in Building::update ()
#8 0x080e6887 in Building::addRessourceIntoBuilding ()
#9 0x08230b4b in Unit::handleDisplacement ()
#10 0x0823290b in Unit::endOfAction ()
#11 0x08232c5c in Unit::syncStep ()
#12 0x0821f06a in Team::syncStep ()
#13 0x08117a79 in Game::syncStep ()
#14 0x0810e2fc in Engine::run ()
#15 0x081484f3 in Glob2::run ()
#16 0x08148ce1 in main ()

I'm going to remove the text cancel from the bug topic, as it seems to crash when ever you use repair.

Kieran <k776>
Project Administrator
Thu 12 Apr 2007 12:14:53 PM UTC, comment #6:

Okay, hopefully I am now really adding my save game that is about to crash. When I tried before it was rejected as too big by Savannah, so I am compressing it.

Joe

(file #12475)

Anonymous
Thu 12 Apr 2007 10:56:07 AM UTC, comment #5:

I am attaching another save game that triggers this bug.

In this case, there is a hospital "building site" being repaired.

However, the "building site" was formerly a "building", so something else has also gone wrong.

Joe

Anonymous
Tue 10 Apr 2007 08:41:45 PM UTC, comment #4:

I've also experienced this bug, but I wasn't in the process of cancelling a building repair. I've attached my own autosave, which crashes for me after just 15sec or so of letting it run.

My game version:
Globulation 2 - 0.8.22

Compiled on Apr 8 2007 at 13:25:37

Compiled with SDL version 1.2.11
Linked with SDL version 1.2.11

Featuring :

  • Map version 57
  • Maps up to version 23 can still be loaded
  • Network Protocol version 22
  • YOG Protocol version 5

(file #12461)

Anonymous
Sat 07 Apr 2007 09:56:15 PM UTC, comment #3:

I've investigated this bug a bit. The problem is that a building site must never be in repair state. We must find in which condition this hapens. There is probably a buggy decision somewhere in the game logic.

Stephane Magnenat <nct>
Project Administrator
Sat 07 Apr 2007 05:28:12 PM UTC, comment #2:

crash can be avoided by removing the assertion as in the following code:
ConfigFiles.h:180
std::cerr << "ConfigVector::get(" << static_cast<unsigned int>(id) << ") : warning : id is not valid, returning default" << std::endl;
//assert(false);
return &defaultEntry;

as "return &defaultEntry;" is unreachable code i guess there is work in progress. removing the assertion leads to strange worker assignments (1 worker here) but no further crash in local games.

Leo Wandersleb <giszmo>
Project Member
Sat 07 Apr 2007 09:06:17 AM UTC, comment #1:

If you pause the game and destroy the pool construction site on the lower left corner of the map. It does not crash.
If you instead cancel the upgrade glob2 crashs.
If you do nothing glob2 crashs.

Also weird:
glob2 tells me that I have won before the pool has a chance to be repaired. I can't remember having seen this message in the original game. Maybe something is wrong with our victory conditions too.

Tip: rename the game. Auto_save.game will be overwritten if you
destroy the constuction site.

Kai Antweiler <snth>
Project Administrator
Sat 07 Apr 2007 08:45:32 AM UTC, original submission:

Sometimes when you repair a building glob2 will crash:

ConfigVector::get(4294967295) : warning : id is not valid, returning default
glob2: ConfigFiles.h:181: T* ConfigVector<T>::get(size_t) [with T = BuildingType]: Assertion `false' failed.

I Attach the auto saved game. It quickly crashs.
Here comes the gdb output:

# gdb --args src/glob2 -nox games/Auto_save.game 0 1
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /home/snth/prog/cvs/glob2-release/src/glob2 -nox games/Auto_save.game 0 1
[Thread debugging using libthread_db enabled]
[New Thread 46923816833952 (LWP 4704)]
nox::running 1 times 0 steps:
nox::game started
ConfigVector::get(4294967295) : warning : id is not valid, returning default
glob2: ConfigFiles.h:181: T* ConfigVector<T>::get(size_t) [with T = BuildingType]: Assertion `false' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 46923816833952 (LWP 4704)]
0x00002aad4ca1d885 in raise () from /lib/libc.so.6
(gdb) bt
#0 0x00002aad4ca1d885 in raise () from /lib/libc.so.6
#1 0x00002aad4ca1eb3e in abort () from /lib/libc.so.6
#2 0x00002aad4ca17266 in __assert_fail () from /lib/libc.so.6
#3 0x00000000004657ee in Building::removeForbiddenZoneFromUpgradeArea (this=0x96ac00) at ConfigFiles.h:181
#4 0x000000000046601c in Building::updateBuildingSite (this=0x96ac00) at Building.cpp:888
#5 0x0000000000584562 in Unit::handleDisplacement (this=0x790c20) at Unit.cpp:1047
#6 0x0000000000587c42 in Unit::endOfAction (this=0x790c20) at Unit.cpp:2214
#7 0x0000000000588bcb in Unit::syncStep (this=0x790c20) at Unit.cpp:526
#8 0x000000000057a7b8 in Team::syncStep (this=0x93f3d0) at Team.cpp:1071
#9 0x0000000000493dce in Game::syncStep (this=0x7fff5f3127b0, localTeam=0) at Game.cpp:1174
#10 0x000000000048c725 in Engine::run (this=0x7fff5f3127b0) at Engine.cpp:485
#11 0x00000000004bdb48 in Glob2::runNoX (this=<value optimized out>) at Glob2.cpp:113
#12 0x00000000004be5b9 in Glob2::run (this=0x7fff5f33c387, argc=5, argv=0x7fff5f33c468) at Glob2.cpp:270
#13 0x00000000004befe5 in main (argc=0, argv=0x6) at Glob2.cpp:491

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #12475:  about-to-crash.game.gz added by None (48KiB - application/x-gzip - save game that is about to crash - Joe)
file #12461:  Auto_save.game.bz2 added by None (41KiB - application/octet-stream - No cancel build required to trigger bug)
file #12422:  Auto_save.game.bz2 added by None (24KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by genixpro (Updated the item)
  • -unavailable- added by k776 (Posted a comment)
  • -unavailable- added by nct (Posted a comment)
  • -unavailable- added by giszmo (Posted a comment)
  • -unavailable- added by snth (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 18 Apr 2007 05:02:13 PM UTCgiszmoDependencies-=>bugs #19607 is dependent
    Mon 16 Apr 2007 02:28:25 AM UTCgenixproStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Sun 15 Apr 2007 09:36:03 PM UTCk776Summarycancel repair of a building leads to crash in alpha22=>repair of a building leads to crash in alpha22
    Thu 12 Apr 2007 12:14:53 PM UTCNoneAttached File-=>Added about-to-crash.game.gz, #12475
    Tue 10 Apr 2007 08:41:45 PM UTCNoneAttached File-=>Added Auto_save.game.bz2, #12461
    Sat 07 Apr 2007 05:28:12 PM UTCgiszmoStatusConfirmed=>In Progress
      Summaryrepairing a building can crash alpha22=>cancel repair of a building leads to crash in alpha22
    Sat 07 Apr 2007 08:48:16 AM UTCsnthSeverity3 - Normal=>5 - Blocker
      StatusNone=>Confirmed
    Sat 07 Apr 2007 08:45:32 AM UTCNoneAttached File-=>Added Auto_save.game.bz2, #12422

    Back to the top


    Powered by Savane 3.1-cleanup1