Assertion in image cache while loading first barbarian campaign

Bug #1132774 reported by Nicolai Hähnle
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

How to reproduce: Simply start the first barbarian campaign ("Eyes in the dark") in bzr6515.

The result is the following assertion:
widelands: /home/nha/dev/widelands/repo/soldiers/src/graphic/image_cache.cc:112: virtual const Image* {anonymous}::ImageCacheImpl::insert(const Image*): Assertion `!has(image->hash())' failed.

Backtrace:
#5 0x088a283b in (anonymous namespace)::ImageCacheImpl::insert (this=0x8b88a38, image=0xb9d1420)
    at /home/nha/dev/widelands/repo/soldiers/src/graphic/image_cache.cc:112
#6 0x088601df in Widelands::Map_Extradata_Data_Packet::Read (this=0xbfffb9d0, fs=..., egbase=..., skip=false)
    at /home/nha/dev/widelands/repo/soldiers/src/map_io/widelands_map_extradata_data_packet.cc:81
#7 0x0885b853 in Widelands::WL_Map_Loader::load_map_complete (this=0xa07dfe8, egbase=..., scenario=true)
    at /home/nha/dev/widelands/repo/soldiers/src/map_io/widelands_map_loader.cc:199
#8 0x088b2927 in Widelands::Game_Map_Data_Packet::Read_Complete (this=0xbfffba68, game=...)
    at /home/nha/dev/widelands/repo/soldiers/src/game_io/game_map_data_packet.cc:59
#9 0x08743ea9 in Widelands::Game_Loader::load_game (this=0xbfffbad0, multiplayer=false)
    at /home/nha/dev/widelands/repo/soldiers/src/game_io/game_loader.cc:80
#10 0x086bc54f in Widelands::ReplayWriter::ReplayWriter (this=0x9d860b8, game=..., filename=...)
    at /home/nha/dev/widelands/repo/soldiers/src/logic/replay.cc:249
#11 0x086d467d in Widelands::Game::run (this=0xbfffcd64, loader_ui=0xbfffbbb8, start_game_type=Widelands::Game::NewSPScenario)
    at /home/nha/dev/widelands/repo/soldiers/src/logic/game.cc:543
#12 0x086d2eb8 in Widelands::Game::run_splayer_scenario_direct (this=0xbfffcd64, mapname=0x9651d5c "campaigns/t01.wmf")
    at /home/nha/dev/widelands/repo/soldiers/src/logic/game.cc:256

Inspection in the debugger reveals that image->hash() is "map:chieftain.png". So it looks like this is a regression related to how scripted scenario images are handled after the graphics refactoring.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Reproducible in r6517. In fact this is the case for any campaign map.

Considering this sounds fairly similar to bug 1132774, someone should probably go through and make sure all images are loadable.

Changed in widelands:
status: New → Confirmed
tags: added: campaign
Changed in widelands:
status: Confirmed → Triaged
Revision history for this message
SirVer (sirver) wrote :

Will look into this soonish.

Revision history for this message
SirVer (sirver) wrote :

Fixed in r6521.

Changed in widelands:
status: Triaged → Fix Committed
assignee: SirVer (sirver) → nobody
Revision history for this message
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.