Assertion in image cache while loading first barbarian campaign

Bug #1132774 reported by Nicolai Hähnle on 2013-02-25
This bug affects 2 people
Affects Status Importance Assigned to Milestone

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/ virtual const Image* {anonymous}::ImageCacheImpl::insert(const Image*): Assertion `!has(image->hash())' failed.

#5 0x088a283b in (anonymous namespace)::ImageCacheImpl::insert (this=0x8b88a38, image=0xb9d1420)
    at /home/nha/dev/widelands/repo/soldiers/src/graphic/
#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/
#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/
#8 0x088b2927 in Widelands::Game_Map_Data_Packet::Read_Complete (this=0xbfffba68, game=...)
    at /home/nha/dev/widelands/repo/soldiers/src/game_io/
#9 0x08743ea9 in Widelands::Game_Loader::load_game (this=0xbfffbad0, multiplayer=false)
    at /home/nha/dev/widelands/repo/soldiers/src/game_io/
#10 0x086bc54f in Widelands::ReplayWriter::ReplayWriter (this=0x9d860b8, game=..., filename=...)
    at /home/nha/dev/widelands/repo/soldiers/src/logic/
#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/
#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/

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.

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
SirVer (sirver) wrote :

Will look into this soonish.

SirVer (sirver) wrote :

Fixed in r6521.

Changed in widelands:
status: Triaged → Fix Committed
assignee: SirVer (sirver) → nobody
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  Edit
Everyone can see this information.

Other bug subscribers