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
➜ clean_obj_queue crash
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Sun 01 Aug 2004 10:45 PM (UTC) |
Message
|
#0 0x42074d91 in calloc () from /lib/i686/libc.so.6
#1 0x42075bcc in free () from /lib/i686/libc.so.6
#2 0x080d05c0 in clean_obj_queue () at handler.c:3571
#3 0x0812ede2 in update_handler () at update.c:2099
#4 0x080a966a in game_loop () at comm.c:690
#5 0x080a8f61 in main (argc=8, argv=0xbffff7e0) at comm.c:304
#6 0x42015967 in __libc_start_main () from /lib/i686/libc.so.6
I haven't changed anything to do with those functions. I don't know why it crashed. null obj, perhaps?
void clean_obj_queue()
{
OBJ_DATA *obj;
while ( extracted_obj_queue )
{
obj = extracted_obj_queue;
extracted_obj_queue = extracted_obj_queue->next;
STRFREE( obj->name );
STRFREE( obj->description );
STRFREE( obj->short_descr );
STRFREE( obj->action_desc );
DISPOSE( obj );
--cur_qobjs;
}
}
|
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sun 01 Aug 2004 11:49 PM (UTC) |
Message
| It can't very well be null, the if test if for it to be not null. Corrupted maybe? If it keeps happening put a breakpoint on it and see what is in obj. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #2 on Mon 02 Aug 2004 12:29 AM (UTC) |
Message
| Corrupted was my second thought, and so far, its happened twice. Only problem is, no idea when it will happen. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Samson
USA (683 posts) Bio
|
Date
| Reply #3 on Mon 02 Aug 2004 03:30 AM (UTC) |
Message
| In your backtrace, why is frame 1 calling free() and frame 0 calling calloc() again right after? That doesn't seem right to me. I would suggest you take a look at your DISPOSE macro and make sure nothing fishy is happening there. | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #4 on Mon 02 Aug 2004 03:53 AM (UTC) |
Message
|
#define DISPOSE(point) \
do \
{ \
if (!(point)) \
{ \
bug( "Freeing null pointer %s:%d", __FILE__, __LINE__ ); \
fprintf( stderr, "DISPOSEing NULL in %s, line %d\n", __FILE__, __LINE__ ); \
} \
else \
{ \
free((point)); \
(point) = NULL; \
} \
} while(0)
Doesn't look wrong to me. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #5 on Sun 08 Aug 2004 09:35 PM (UTC) |
Message
| Actually it happened again, but I was away on vacation when it happened, so this is only from the core.
#0 0x420751d1 in calloc () from /lib/i686/libc.so.6
#1 0x42074827 in calloc () from /lib/i686/libc.so.6
#2 0x42074544 in calloc () from /lib/i686/libc.so.6
#3 0x080a8c8f in write_to_pager (d=0x83784b8, txt=0x816cb84 "\e[0;32m", length=7)
at color.c:1134
#4 0x080a8bfe in set_pager_color (AType=82, ch=0x839ab98) at color.c:1112
#5 0x08062034 in do_help (ch=0x839ab98, argument=0xbfffdd45 "RULES") at act_info.c:1951
#6 0x080d486c in interpret (ch=0x839ab98, argument=0xbfffdd45 "RULES") at interp.c:557
#7 0x080a9d03 in game_loop () at comm.c:671
#8 0x080a9631 in main (argc=8, argv=0xbfffe160) at comm.c:304
#9 0x42015967 in __libc_start_main () from /lib/i686/libc.so.6
Someone did help rules, but write_to_pager had problems, it seems. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #6 on Fri 20 Apr 2007 01:54 PM (UTC) |
Message
| Erk, I was thinking it someone fixed itself. Haven't seen it for at least a year. Suddenly it crashes again.
#0 0x000000316c4301b5 in raise () from /lib64/libc.so.6
#1 0x000000316c431b20 in abort () from /lib64/libc.so.6
#2 0x000000316c46766b in __libc_message () from /lib64/libc.so.6
#3 0x000000316c46ea30 in _int_free () from /lib64/libc.so.6
#4 0x000000316c47214c in free () from /lib64/libc.so.6
#5 0x000000000049be4c in clean_obj_queue () at handler.c:3905
#6 0x0000000000517de5 in update_handler () at update.c:2858
#7 0x0000000000478d31 in game_loop () at comm.c:1276
#8 0x000000000047a7d2 in main (argc=<value optimized out>, argv=<value optimized out>) at comm.c:606
|
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Gohan_TheDragonball
USA (183 posts) Bio
|
Date
| Reply #7 on Sat 21 Apr 2007 12:31 AM (UTC) |
Message
|
void clean_obj_queue()
{
OBJ_DATA *obj;
while ( extracted_obj_queue )
{
obj = extracted_obj_queue;
extracted_obj_queue = extracted_obj_queue->next;
if ( obj->name )
STRFREE( obj->name );
if ( obj->description )
STRFREE( obj->description );
if ( obj->short_descr)
STRFREE( obj->short_descr );
if ( obj->action_desc )
STRFREE( obj->action_desc );
DISPOSE( obj );
--cur_qobjs;
}
}
thats what mine looks like | Top |
|
Posted by
| Gatewaysysop2
USA (146 posts) Bio
|
Date
| Reply #8 on Sat 28 Apr 2007 03:44 PM (UTC) |
Message
| Have you guys not put in this fix? I dug into my old code (been patching all the fixes in since FUSS 1.4) and found that I'm consistent with the fix in this posting:
http://www.fussproject.org/index.php?a=topic&t=762
I have yet to even once encounter this crash either, although given the time it takes to surface, that may be a fluke too.
Just tossing that out in case it helps anyone. It appears that this is the way the code is in FUSS as of 1.7 as well.
Hope that helps!
|
"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence | Top |
|
Posted by
| Samson
USA (683 posts) Bio
|
Date
| Reply #9 on Wed 02 May 2007 02:19 PM (UTC) |
Message
| Wow, talk about resurrecting the past :P
Anyway, yes. That's exactly the kind of mysterious crash that fix was intended to prevent. You most likely ran into one of the dangling pointers. Crashing doesn't happen that often with this particular problem, but when it does the headscratching is usually the common reaction :) | 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.
28,640 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top