I want to get DaJAngband 1.0.98 released, but I've introduced a crash bug somehow and I just can't figure out what's causing it. And I've been real stupid not to make backups of my code often. I'm getting really frustrated with this bug because I've been trying to figure it out for three days now.
So far I've figure out that it seems to only happen in the town, and I'm pretty sure it's some part of update_stuff, redraw_stuff or window_stuff. I tried to look at everywhere it refers to the monster level or player depth to be sure it's not dividing by 0 and didn't find anywhere it did that.
I put
#if isthisit
#endif
around suspect recent pieces of my code, but that didn't help.
I wrote a little function that looks like this:
to try to find out where it's crashing but that didn't help. I've tried deleting the .o files and recompiling. I even tried restarting my computer. I wish my compiler would tell me what's causing the crash.
</venting>
So far I've figure out that it seems to only happen in the town, and I'm pretty sure it's some part of update_stuff, redraw_stuff or window_stuff. I tried to look at everywhere it refers to the monster level or player depth to be sure it's not dividing by 0 and didn't find anywhere it did that.
I put
#if isthisit
#endif
around suspect recent pieces of my code, but that didn't help.
I wrote a little function that looks like this:
Code:
void did_it_crash_yet(int where) { /* I know it's crashing in the town */ if (p_ptr->depth) return; msg_format("crash yet? %d", where); save_player(); }
</venting>
Comment