kNoResource crashes game when querying DBG info on empty field

Bug #1533183 reported by TiborB
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Critical
TiborB

Bug Description

This looks like a consequence of latest editor rework. When you click on field with no resources (like field with mined out water) the game crashes.

backtrace points to game_debug_ui.cc:

  str += (boost::format("Resource: %s\n")
      % ibase().egbase().world().get_resource(ridx)->name().c_str()).str();

I presume the culprit is new kNoResource index that cannot be resolved to name. If it is true, the fix should be relatively simple.

Related branches

Revision history for this message
TiborB (tiborb95) wrote :

Well, try dry riverbed map and click on sand and select DBG - you should get a crash......

As for vicinity of wells - sometimes it crashes, sometimes it correctly shows 0/10 or so. Weird a bit.....

Revision history for this message
TiborB (tiborb95) wrote :

I attached the savegame, try field 8x23

SirVer (sirver)
Changed in widelands:
status: New → Confirmed
milestone: none → build19-rc1
importance: Undecided → Critical
TiborB (tiborb95)
Changed in widelands:
assignee: nobody → TiborB (tiborb95)
SirVer (sirver)
Changed in widelands:
status: Confirmed → Fix Committed
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

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.