[SOL]Pressing 'K' in editor / killing a monster causes crash
Posted: Fri Mar 15, 2013 6:12 pm
I'm having an issue all of a sudden, pressing the instakill key within the editor, and killing monsters. I have added two snails and one herder, and killing (or pressing 'K' when in the editor) one of them always causes a crash, both in the editor and the exported game. The monster death that causes the crash can be different every time. I have no idea what's going on here.
Here's the error.log when pressing 'K' in the editor:
And the killed monster crash in the exported version:
Does anyone have any ideas, or (or has anyone seen this before)?
[EDIT:} Ok, I'm not quite ready to mark this as solved yet, but I had a script like this:
I had named one snail visitora, and a herder visitorb. I've deleted the "visitorb:addItem(message)" line and it seems to be working, although I cringe everytime I press 'K." I'll test it a few more times, because at one point I did kill both of them successfully (and had both scrolls in my inventory).
[EDIT: Calling this solved. Don't spawn one scroll and put it in two places.
It might work, but, mostly...no.]
Here's the error.log when pressing 'K' in the editor:
SpoilerShow
[string "Map.lua"]:0: entity already added to map
stack traceback:
[C]: in function 'assert'
[string "Map.lua"]: in function 'addEntity'
[string "Monster.lua"]: in function 'die'
[string "GameMode.lua"]: in function 'keyPressed'
[string "DungeonEditor.lua"]: in function 'preview'
[string "DungeonEditor.lua"]: in function 'update'
[string "Grimrock.lua"]: in main chunk
OS Version 6.1
OEM ID: 0
Number of processors: 2
Page size: 4096
Processor type: 586
Total memory: 6050 MB
Free memory: 1842 MB
Display device 0:
Device name: \\.\DISPLAY1
Device string: Intel(R) HD Graphics Family
State flags: 00000005
Display device 1:
Device name: \\.\DISPLAY2
Device string: Intel(R) HD Graphics Family
State flags: 08000000
Display device 2:
Device name: \\.\DISPLAYV1
Device string: RDPDD Chained DD
State flags: 00000008
Display device 3:
Device name: \\.\DISPLAYV2
Device string: RDP Encoder Mirror Driver
State flags: 00200008
Display device 4:
Device name: \\.\DISPLAYV3
Device string: RDP Reflector Display Driver
State flags: 00200008
stack traceback:
[C]: in function 'assert'
[string "Map.lua"]: in function 'addEntity'
[string "Monster.lua"]: in function 'die'
[string "GameMode.lua"]: in function 'keyPressed'
[string "DungeonEditor.lua"]: in function 'preview'
[string "DungeonEditor.lua"]: in function 'update'
[string "Grimrock.lua"]: in main chunk
OS Version 6.1
OEM ID: 0
Number of processors: 2
Page size: 4096
Processor type: 586
Total memory: 6050 MB
Free memory: 1842 MB
Display device 0:
Device name: \\.\DISPLAY1
Device string: Intel(R) HD Graphics Family
State flags: 00000005
Display device 1:
Device name: \\.\DISPLAY2
Device string: Intel(R) HD Graphics Family
State flags: 08000000
Display device 2:
Device name: \\.\DISPLAYV1
Device string: RDPDD Chained DD
State flags: 00000008
Display device 3:
Device name: \\.\DISPLAYV2
Device string: RDP Encoder Mirror Driver
State flags: 00200008
Display device 4:
Device name: \\.\DISPLAYV3
Device string: RDP Reflector Display Driver
State flags: 00200008
SpoilerShow
[string "Map.lua"]:0: entity already added to map
stack traceback:
[C]: in function 'assert'
[string "Map.lua"]: in function 'addEntity'
[string "Monster.lua"]: in function 'die'
[string "Monster.lua"]: in function 'damage'
[string "Combat.lua"]: in function 'damageTile'
[string "ProjectileSpell.lua"]: in function 'onProjectileHit'
[string "Projectile.lua"]: in function 'update'
[string "ProjectileSpell.lua"]: in function 'update'
[string "Map.lua"]: in function 'updateEntities'
[string "Dungeon.lua"]: in function 'updateLevels'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk
OS Version 6.1
OEM ID: 0
Number of processors: 2
Page size: 4096
Processor type: 586
Total memory: 6050 MB
Free memory: 1848 MB
Display device 0:
Device name: \\.\DISPLAY1
Device string: Intel(R) HD Graphics Family
State flags: 00000005
Display device 1:
Device name: \\.\DISPLAY2
Device string: Intel(R) HD Graphics Family
State flags: 08000000
Display device 2:
Device name: \\.\DISPLAYV1
Device string: RDPDD Chained DD
State flags: 00000008
Display device 3:
Device name: \\.\DISPLAYV2
Device string: RDP Encoder Mirror Driver
State flags: 00200008
Display device 4:
Device name: \\.\DISPLAYV3
Device string: RDP Reflector Display Driver
State flags: 00200008
stack traceback:
[C]: in function 'assert'
[string "Map.lua"]: in function 'addEntity'
[string "Monster.lua"]: in function 'die'
[string "Monster.lua"]: in function 'damage'
[string "Combat.lua"]: in function 'damageTile'
[string "ProjectileSpell.lua"]: in function 'onProjectileHit'
[string "Projectile.lua"]: in function 'update'
[string "ProjectileSpell.lua"]: in function 'update'
[string "Map.lua"]: in function 'updateEntities'
[string "Dungeon.lua"]: in function 'updateLevels'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk
OS Version 6.1
OEM ID: 0
Number of processors: 2
Page size: 4096
Processor type: 586
Total memory: 6050 MB
Free memory: 1848 MB
Display device 0:
Device name: \\.\DISPLAY1
Device string: Intel(R) HD Graphics Family
State flags: 00000005
Display device 1:
Device name: \\.\DISPLAY2
Device string: Intel(R) HD Graphics Family
State flags: 08000000
Display device 2:
Device name: \\.\DISPLAYV1
Device string: RDPDD Chained DD
State flags: 00000008
Display device 3:
Device name: \\.\DISPLAYV2
Device string: RDP Encoder Mirror Driver
State flags: 00200008
Display device 4:
Device name: \\.\DISPLAYV3
Device string: RDP Reflector Display Driver
State flags: 00200008
[EDIT:} Ok, I'm not quite ready to mark this as solved yet, but I had a script like this:
SpoilerShow
local message = spawn("scroll")
message:setScrollText("VISITOR'S PASS")
visitora:addItem(message)
visitorb:addItem(message)
message:setScrollText("VISITOR'S PASS")
visitora:addItem(message)
visitorb:addItem(message)
[EDIT: Calling this solved. Don't spawn one scroll and put it in two places.