Page 1 of 1

(fixed) [0.66] Crash on Invalid slave pointer

Posted: Mon Feb 08, 2016 3:42 pm
by kaypy
While trying to get a reproducible version of my last crash, I have found another one:
logfile wrote: PROGRAM CRASH!
Location: 0 20 1
Reason: Invalid slave pointer to pointerize (inst 10024 dir -2)
Stack Dump:
DSBmain
DSBgameloop
gameloop.process_tick
run_timers
monster_acts
monster_move
lua.sys_ai_far
lua.dsb_ai
ai_msg_handler
lmon_dirmove
mon_rotateteam
mon_rotate2wide
pointerize
pointerize_slave
This one is relatively reproducible. I can't get a short example (maybe lots of objects is part of the cause?) but I have a formerly random dungeon that has had anything nonstandard excised, paring it down to a dungeon.lua with only standard components. Nothing left in there even has any exvars. But it you start a game and rest for bit then you get the crash.

http://en.file-upload.net/download-1128 ... n.zip.html

Re: [0.66] Crash on Invalid slave pointer

Posted: Tue Feb 09, 2016 12:07 am
by Sophia
That error is thrown when a size 2 monster (e.g., a worm) tries to rotate into a position that can't support it due to the back half "hanging off" into another tile, like being in the southern half of a tile and facing north. I thought I mostly fixed the circumstances that could be causing this so I'll look into why that could be happening now...

Re: [0.66] Crash on Invalid slave pointer

Posted: Tue Feb 09, 2016 11:48 am
by kaypy
Hmm.

Let me check if I'm spawning them in dumb initial positions. (But if so, why wasn't 0.65 crashing?)

[hack hack hack]

Hmm

Is this related: I made a tiny test dungeon to try to put critters in wacky locations, including a teleporter to see if spinning them might break stuff. I am not seeing the crash, but I am getting
logfile wrote: LUA ERROR: base/triggers.lua:909: Invalid slave tile (inst 20 pos 1 dir 1 targdir 2)
Very small dungeon:

Code: Select all

dsb_text2map(0, 10, 10, 100, 1, {
"1101100000",
"0101101000",
"0100001000",
"0111111000",
"0000000000",
"0000000000",
"0000000000",
"0000000000",
"0000000000",
"0000000000"} )
dsb_level_wallset(0, wallset.default)
dsb_add_champion(1, "zfsdg", "port_mophus", "ZFSDG", "", 1000, 1000, 1000, 400, 400, 400, 400, 400, 400, 400, {0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0})
ch_exvar = {
}
dsb_spawnburst_begin(21)
dsb_spawn(1, "invisiblewall", 0, 2, 1, 4)
dsb_spawn(21, "worm", 0, 3, 0, 1)
dsb_spawn(20, "worm", 0, 3, 1, 3)
dsb_spawn(5, "teleporter", 0, 4, 1, 4)
dsb_spawn(4, "invisiblewall", 0, 5, 1, 4)
dsb_spawn(2, "invisiblewall", 0, 3, 2, 4)
dsb_spawn(3, "invisiblewall", 0, 4, 2, 4)
exvar = {
[5] = { y = 1,
x = 3,
opby_monster = true,
spin = 1 },
}
dsb_spawnburst_end()
EDITOR_FLAGS = 255
dsb_champion_toparty(0, 1)
dsb_party_place(0, 3, 3, 0)

Re: [0.66] Crash on Invalid slave pointer

Posted: Tue Feb 09, 2016 11:22 pm
by Sophia
Try this version of DSB.exe (0.66a) that should fix both of these bugs.

Re: (fixed) [0.66] Crash on Invalid slave pointer

Posted: Wed Feb 10, 2016 11:03 am
by kaypy
Awesome! My party can starve to death without the game crashing!

Now to try to replicate the previous crash! Unfortunately saves dont seem to be compatible, so its going to be a little tricky. Hopefully if I move some of the broken items and set up a teleporter to the right area (and clear out the monsters) I should be able to trigger it again.