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
➜ DISPOSE 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 13 Feb 2005 02:00 AM (UTC) |
Message
| Argh, so many crashes lately I can't seem to figure out. This was with a disband function I made.
#0 0x008617a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x008a1955 in raise () from /lib/tls/libc.so.6
#2 0x008a3319 in abort () from /lib/tls/libc.so.6
#3 0x008d4f8a in __libc_message () from /lib/tls/libc.so.6
#4 0x008db4f8 in _int_free () from /lib/tls/libc.so.6
#5 0x008dbaca in free () from /lib/tls/libc.so.6
#6 0x080b9309 in do_rmclan (ch=0x8aa9608, argument=0x8a8f4d0 "Our Test Clan") at clans.c:3144
#7 0x080b981c in do_disband (ch=0x8aa9608, argument=0xbfe55f26 "yes") at clans.c:3194
#8 0x080e6f90 in interpret (ch=0x8aa9608, argument=0xbfe55f26 "yes") at interp.c:577
#9 0x080832f2 in do_force (ch=0x8a9e2c0, argument=0xbfe55f1e "disband yes") at act_wiz.c:4689
#10 0x080e6f90 in interpret (ch=0x8a9e2c0, argument=0xbfe55f16 "Mandolo disband yes") at interp.c:577
#11 0x080bc857 in game_loop () at comm.c:688
#12 0x080bc0f9 in main (argc=2, argv=0xbfe56350) at comm.c:317
#6 0x080b9309 in do_rmclan (ch=0x8aa9608, argument=0x8a8f4d0 "Our Test Clan") at clans.c:3144
3144 DISPOSE( clan->motto );
Here's the part of the function that crashed.
UNLINK( clan, first_clan, last_clan, next, prev );
if ( clan->filename && clan->filename[0] != '\0' )
DISPOSE( clan->filename );
STRFREE( clan->name );
if ( clan->motto && clan->motto[0] != '\0' )
DISPOSE( clan->motto );
STRFREE( clan->deity );
STRFREE( clan->leader );
STRFREE( clan->number1 );
STRFREE( clan->number2 );
STRFREE( clan->leadrank );
STRFREE( clan->onerank );
STRFREE( clan->tworank );
STRFREE( clan->badge );
DISPOSE( clan );
Should I just change DISPOSE to STRFREE? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #1 on Sun 13 Feb 2005 02:04 AM (UTC) Amended on Sun 13 Feb 2005 02:05 AM (UTC) by Greven
|
Message
| Depends on how clan->motto is being initialized. If its set via command/read in from the file with stralloc/fread_string respectively, then yes, it needs STRFREE instead of DISPOSE. Just confirm that its being consistent through out the code.
STRALLOC/fread_string uses STRFREE
str_dup/fread_string_nohash uses DISPOSE. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #2 on Sun 13 Feb 2005 02:07 AM (UTC) |
Message
| Whoops, yeah, it was fread_string. Since it followed the filename section, I must have mixed it up. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | 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.
10,087 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top