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 ➜ Hotboot crash - stumped again

Hotboot crash - stumped again

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


Posted by Syriac   (46 posts)  Bio
Date Wed 10 Jun 2009 05:15 PM (UTC)
Message
Program received signal SIGSEGV, Segmentation fault.
0x000000000047e33c in accept_new (ctrl=-1) at comm.c:534
534 FD_SET( ctrl, &in_set );
Missing separate debuginfos, use: debuginfo-install glibc-2.9-3.x86_64
(gdb) bt
#0 0x000000000047e33c in accept_new (ctrl=-1) at comm.c:534
#1 0x000000000047e5f0 in game_loop () at comm.c:592
#2 0x000000000047de8e in main (argc=6, argv=0x7fffffffe748) at comm.c:331

Where crash originates:
---------------------------------------------------
void accept_new( int ctrl )
{
static struct timeval null_time;
DESCRIPTOR_DATA *d;
/* int maxdesc; Moved up for use with id.c as extern */

#if defined(MALLOC_DEBUG)
if ( malloc_verify( ) != 1 )
abort( );
#endif

/*
* Poll all active descriptors.
*/
FD_ZERO( &in_set );
FD_ZERO( &out_set );
FD_ZERO( &exc_set );
--> line 534 FD_SET( ctrl, &in_set );
maxdesc = ctrl;
newdesc = 0;
for ( d = first_descriptor; d; d = d->next )
{


where backtrace takes it---
/* signal( SIGSEGV, SegVio ); */
gettimeofday( &last_time, NULL );
current_time = (time_t) last_time.tv_sec;

/* Main loop */
while ( !mud_down )
{
accept_new( control );
accept_new( control2 );
accept_new( conclient);
// accept_new( conjava );


and of course it goes into game_loop


I'm not sure where to begin with this one at all :(
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Wed 10 Jun 2009 05:42 PM (UTC)
Message
Quote:
#0 0x000000000047e33c in accept_new (ctrl=-1) at comm.c:534

You don't want ctrl to be -1. You need to find out which of the control sockets is -1, and then either fix its creation or remove it from the checking logic.

Also, it's generally helpful if you use the 'code' forum tag to make things easier to read.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Syriac   (46 posts)  Bio
Date Reply #2 on Wed 10 Jun 2009 06:45 PM (UTC)
Message
You got it! Fixed, thanks a lot!
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.


13,826 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.