Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Random Crashes on SWRFUSS

Random Crashes on SWRFUSS

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Jason   (109 posts)  Bio
Date Mon 18 Jun 2012 02:08 AM (UTC)
Message
ok here is what I got... and I don't get why it is crashing... The code is the same as it was on my non fuss code.

My game is crashing at this line of code


   if( fPrompt && !mud_down && d->connected == CON_PLAYING )
   {
      ch = d->original ? d->original : d->character;
[bold]      if( IS_SET( ch->act, PLR_BLANK ) )  THIS LINE HERE CRASHES[/bold]
         write_to_buffer( d, "\r\n", 2 );

      if( IS_SET( ch->act, PLR_PROMPT ) )
         display_prompt( d );
      if( IS_SET( ch->act, PLR_TELNET_GA ) )
         write_to_buffer( d, (const char *)go_ahead_str, 0 );
   }

This is the same as the non-fuss version. it seems to crash upon characters dying... or disconnecting abruptly. not really sure why.

Here is what the core file reads

(gdb) bt
#0  0x080d3ec8 in flush_buffer (d=0x9b42580, fPrompt=true) at comm.c:1186
#1  0x080d2a33 in game_loop () at comm.c:611
#2  0x080d1d15 in main (argc=5, argv=0xbfffe464) at comm.c:252
Current language:  auto; currently c++
Top

Posted by Fiendish   USA  (2,551 posts)  Bio   Global Moderator
Date Reply #1 on Mon 18 Jun 2012 02:46 AM (UTC)
Message
what is d->character right before the crash?

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Jason   (109 posts)  Bio
Date Reply #2 on Mon 18 Jun 2012 03:31 AM (UTC)
Message
0x0
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #3 on Mon 18 Jun 2012 12:01 PM (UTC)
Message
Well then, that is your problem. You can't dereference null. Maybe your problem is somewhere else and it shows here, or this snippet makes wrong assumptions and that causes the crash.
Top

Posted by Jason   (109 posts)  Bio
Date Reply #4 on Mon 18 Jun 2012 10:41 PM (UTC)
Message
Where might i even go about looking for this issue....Maybe the Account snippet I put in?
Top

Posted by Fiendish   USA  (2,551 posts)  Bio   Global Moderator
Date Reply #5 on Sat 30 Jun 2012 06:02 PM (UTC)

Amended on Sat 30 Jun 2012 06:04 PM (UTC) by Fiendish

Message
Maybe. We can't help you with that because we don't know what you're doing. This may be a good time to learn about general debugging techniques.

http://www.drpaulcarter.com/cs/debug.php#4.
http://cs.baylor.edu/~donahoo/tools/gdb/tutorial.html

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,169 posts)  Bio   Forum Administrator
Date Reply #6 on Sat 30 Jun 2012 11:11 PM (UTC)
Message
http://www.gammon.com.au/gdb

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


30,256 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.