Welcome to the Builder Academy

Question GDB core file debug help

More
18 Apr 2016 05:19 - 19 Apr 2016 05:56 #5769 by JTP
GDB core file debug help was created by JTP
Seems my enter portal trigger suddently failed, but why ? Any ideas ?

It has worked just fine for quite some time, but then suddently it crashed my game.
Attachments:
Last edit: 19 Apr 2016 05:56 by JTP.

Please Log in or Create an account to join the conversation.

More
18 Apr 2016 20:14 #5770 by thomas
Replied by thomas on topic GDB core file debug help
It looks like the problem is not with the trigger as such (even though it triggers the bug).
The line failing is github.com/tbamud/tbamud/blob/master/src/dg_comm.c#L184
Code:
for (to = world[IN_ROOM(ch)].people;to; to = to->next_in_room)
To have this part of the code fail means one of two things:
- either your character is "not in a room" when doing the echoaround. This makes no sense - as a character you should always have an "in_room".
- or there's something fishy about the room list of people (world[x].people).

To check it out, when it happens next, go to the innermost frame (command is "frame 0") and studying the variables there.
Try out "print ch", "print ch->in_room", "print world[ch->in_room].people", "print world[ch->in_room].people->next_in_room", "print world[ch->in_room].people->next_in_room->next_in_room" and so on until you find the culprit (Something that gives you an error). It is likely the last "working" char you found is involved somehow.

Please Log in or Create an account to join the conversation.

More
19 Apr 2016 05:47 #5772 by JTP
Replied by JTP on topic GDB core file debug help
Yea it is kinda Strange, i have and can enter that portal 1000 times.

So that player mentioned in the bt, could he be doing this on purpose?

Unfortunately im not very good at debugging, i can just start gdb and bt

When you say command is frame 0, is that in gdb ? And then running the print ch ?

Please Log in or Create an account to join the conversation.

More
19 Apr 2016 18:26 #5777 by rudeboyrave
lets see the trigger though, anyways :)

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

Please Log in or Create an account to join the conversation.

More
19 Apr 2016 19:43 #5783 by thomas
Replied by thomas on topic GDB core file debug help

JTP wrote: So that player mentioned in the bt, could he be doing this on purpose?

When you say command is frame 0, is that in gdb ? And then running the print ch ?


It's highly unlikely he's doing it on purpose. I'm actually unsure whether that's even possible.

You're right about the other assumptions - those commands are for gdb.

Please Log in or Create an account to join the conversation.

More
19 Apr 2016 19:53 #5786 by JTP
Replied by JTP on topic GDB core file debug help
If it crashes Again, ill try run those commands..thanks alot.

How ever iwe tested that portal 1000 times. But lets see hat th bt says NeXT time.

Please Log in or Create an account to join the conversation.

Time to create page: 0.220 seconds