[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  DISPOSE crash

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

DISPOSE crash

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Sun 13 Feb 2005 02:00 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #1 on Sun 13 Feb 2005 02:04 AM (UTC)  quote  ]

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
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Reply #2 on Sun 13 Feb 2005 02:07 AM (UTC)  quote  ]
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
[Go to top] 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.


1,170 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]