Ticket #234 (closed bug: fixed)

Opened 10 years ago

Last modified 7 years ago

PARPG crashes if you try to move on a map with no objects

Reported by: kaydeth_parpg Owned by: parpg
Priority: major Milestone: Techdemo 1
Component: scripts Version: trunk
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by kaydeth_parpg) (diff)

If you create a map that only has the PC and no other object than the game will crash when you hover the mouse over the PC character.

File "C:\Users\Kaydeth\Desktop\Projects\PARPG\FIFE engine\clients\parpg\", line 160, in _pump

File "C:\Users\Kaydeth\Desktop\Projects\PARPG\FIFE engine\clients\parpg\scripts\", line 357, in pump


File "C:\Users\Kaydeth\Desktop\Projects\PARPG\FIFE engine\clients\parpg\scripts\", line 279, in highlightFrontObject

front_obj = self.getObjectAtCoords(self.last_mousecoords)

File "C:\Users\Kaydeth\Desktop\Projects\PARPG\FIFE engine\clients\parpg\scripts\", line 313, in getObjectAtCoords


File "C:\Users\Kaydeth\Desktop\Projects\PARPG\FIFE engine\clients\parpg\scripts\", line 207, in objectActive


File "C:\Users\Kaydeth\Desktop\Projects\PARPG\FIFE engine\clients\parpg\scripts\", line 39, in getObjectsFromMap

return [i for i in self.objects[map_id].values() if map_id in self.objects]

KeyError?: 'map2'


Change History

comment:1 Changed 10 years ago by kaydeth_parpg

  • Description modified (diff)

comment:2 Changed 10 years ago by Kaydeth_parpg

  • Status changed from new to closed
  • Resolution set to fixed

(In [432]) Ticket #234. Patch by Kaydeth. Added some error checking to the getObjectsFromMap method in GameState?. This way it can return an empty list if the given map_id doesn't exist in the GameState?. closes #234

comment:3 Changed 7 years ago by anonymous

Is this really the way it suppose to work? By the what could mean error fatal error access to undeclared static property ?


Add a comment

Modify Ticket

as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.