Merge lp://staging/~widelands-dev/widelands/formerbuildings_index into lp://staging/widelands
Proposed by
cghislai
Status: | Merged |
---|---|
Merged at revision: | 6718 |
Proposed branch: | lp://staging/~widelands-dev/widelands/formerbuildings_index |
Merge into: | lp://staging/widelands |
Diff against target: |
404 lines (+72/-65) 10 files modified
src/logic/building.cc (+2/-2) src/logic/building.h (+6/-6) src/logic/constructionsite.cc (+7/-3) src/logic/dismantlesite.cc (+10/-8) src/logic/militarysite.cc (+4/-4) src/logic/player.cc (+9/-8) src/logic/player.h (+9/-9) src/logic/playercommand.cc (+1/-1) src/map_io/widelands_map_building_data_packet.cc (+1/-2) src/map_io/widelands_map_buildingdata_data_packet.cc (+23/-22) |
To merge this branch: | bzr merge lp://staging/~widelands-dev/widelands/formerbuildings_index |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nasenbaer | Approve | ||
Review via email: mp+179570@code.staging.launchpad.net |
Description of the change
Previously former building information was stored as Building_Descr pointers.
Here it is stored as building_Index values.
It prevents the crash to happen on Ubuntu 12.04.
To post a comment you must log in.
Generally the changes look good (beside of the already elsewhere mentioned copyright year in the header :) ).
However I tested the change with all my savegames and quite some savegames failed to load. I even got a segfault:
Reading Building Data ... :Player: :tribe (this=0x0) at /home/drehatlas /widelands/ widelands/ src/logic/ player. h:116 :Player: :tribe (this=0x0) at /home/drehatlas /widelands/ widelands/ src/logic/ player. h:116 :DismantleSite: :DismantleSite (this=0xb362150, gdescr=..., egbase=..., c=..., plr=..., loading=true, buildings= std::vector of length 1, capacity 1 = {...}) at /home/drehatlas /widelands/ widelands/ src/logic/ dismantlesite. cc:77 :Editor_ Game_Base: :warp_dismantle site (this=0xbfffc3a4, c=..., owner=1 '\001', loading=true, buildings= std::vector of length 1, capacity 1 = {...}) at /home/drehatlas /widelands/ widelands/ src/logic/ editor_ game_base. cc:349 :Map_Building_ Data_Packet: :Read (this=0xbfffc0dc, fs=..., egbase=..., skip=false, mol=...) /widelands/ widelands/ src/map_ io/widelands_ map_building_ data_packet. cc:91 :WL_Map_ Loader: :load_map_ complete (this=0x956f888, egbase=..., scenario=true) /widelands/ widelands/ src/map_ io/widelands_ map_loader. cc:246 :Game_Map_ Data_Packet: :Read_Complete (this=0xbfffc218, game=...) at /home/drehatlas /widelands/ widelands/ src/game_ io/game_ map_data_ packet. cc:56 :Game_Loader: :load_game (this=0xbfffc340, multiplayer=false) at /home/drehatlas /widelands/ widelands/ src/game_ io/game_ loader. cc:82 :Game:: run_load_ game (this=0xbfffc3a4, filename= "save/Katy. wgf") at /home/drehatlas /widelands/ widelands/ src/logic/ game.cc: 415 :load_game (this=0x920a838) at /home/drehatlas /widelands/ widelands/ src/wlapplicati on.cc:2063 :mainmenu_ singleplayer (this=0x920a838) at /home/drehatlas /widelands/ widelands/ src/wlapplicati on.cc:1650 :mainmenu (this=0x920a838) at /home/drehatlas /widelands/ widelands/ src/wlapplicati on.cc:1567 /widelands/ widelands/ src/wlapplicati on.cc:469 /widelands/ widelands/ src/main. cc:103
Program received signal SIGSEGV, Segmentation fault.
0x087401f4 in Widelands:
116 const Tribe_Descr & tribe() const throw () {return m_tribe;}
(gdb) bt
#0 0x087401f4 in Widelands:
#1 0x0890fb1a in Widelands:
former_
#2 0x089084cf in Widelands:
former_
#3 0x08a2945b in Widelands:
at /home/drehatlas
#4 0x08a1e7a0 in Widelands:
at /home/drehatlas
#5 0x08a739a7 in Widelands:
#6 0x087ee732 in Widelands:
#7 0x0892dc13 in Widelands:
#8 0x086e6cf6 in WLApplication:
#9 0x086e5fd9 in WLApplication:
#10 0x086e5b94 in WLApplication:
#11 0x086e11b2 in WLApplication::run (this=0x920a838) at /home/drehatlas
#12 0x086df695 in main (argc=1, argv=0xbfffed64) at /home/drehatlas
I will send you the savegame I triggered this crash with per mail