Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot, Google

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » Bad area scripts causing erro...
Forum Rules | Mark all | Recent Posts

Bad area scripts causing errors?
< Newer Topic :: Older Topic > Log: [*****] bug: str_cmp: null ast

Pages:<< prev 1 next >>
Post is unread #1 Aug 9, 2002, 8:05 am
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

I added a bunch of Rolander areas I found on the net, and am now getting this error repeatedly scroll across my screen. Does anyone know if bad area scripts could cause this? How would I go about finding the bad part. I even tried saving them all with ORB with the hope that ORB would eliminate any bad parts.

This bug check is in db.c

Log: [*****] BUG: Str_cmp: null astr.

My system_bugs file shows this.

[*****] BUG: Rvnum
[*****] BUG: Load_corpses: # not found.
[*****] BUG: Str_cmp: null astr.
[*****] BUG: Fread_obj: no match.
[*****] BUG: Rvnum
[*****] BUG: Load_corpses: # not found.


Any help would be appreciated.

Vladaar
       
Post is unread #2 Aug 9, 2002, 9:53 am   Last edited Nov 24, 2007, 4:48 pm by Samson
Go to the top of the page
Go to the bottom of the page

kilroy
Magician
GroupMembers
Posts122
JoinedMay 1, 2002

My 2 cents
it seems as though (have not tried it since the update) when you do an areaconvert there do tend to be a lot of things that need to be checked within orb first.
IE. remove all object resets - this is something that I found out - I could create the area in ORB, but if I had an obj reset specified, the mud crashed
yet remove the obj reset and the area converted just fine.

Kilroy
       
Post is unread #3 Aug 9, 2002, 12:11 pm
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

Thanks Kilroy,

But I am using smaug1.4a and these are smaug1.4 files I uploaded. I am guessing they have did something with the code before creating the areas. However, Im not that good with area scripts, so I was checking to see if someone can enlighten me.

Thanks

Vladaar
       
Post is unread #4 Aug 9, 2002, 8:37 pm   Last edited Nov 24, 2007, 4:49 pm by Samson
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

[*****] BUG: Rvnum
[*****] BUG: Load_corpses: # not found.
[*****] BUG: Str_cmp: null astr.
[*****] BUG: Fread_obj: no match.
[*****] BUG: Rvnum
[*****] BUG: Load_corpses: # not found.

Any time you see something like this you should check out the log file to see what it was loading. It is going to be someones corpse since its Load_corpses: when checking the log files you will notice that the bugs will show up after it has whos corpse it was loading and above the bugs it will show what line it had the problem on. From the looks of it there is something in a corpse file that starts with Rvnum (something that is added with hotboot) if you took out hotboot but never checked the corpse files made when hotboot was in then the corpse file still has the Rvnum in it and it doesn't know what to do with the Rvnum.

As for this one
This bug check is in db.c

Log: [*****] BUG: Str_cmp: null astr.

You should make it give more info because this can come from almost any file in the code. This is the part of the code that has that bug. Change it to something like this so it gives a little more info.
I found my bug later in the do_who file but don't remember what the problem was it only popped the bug up when certian things were wrong for some reason. When you see the bug again just have everyone redo what they right before the bug (at seperate times of course) Then take a look in what ever command it is that is causeing it and look for any str_cmp stuff and just go one by one until you get it fixed.
This str_cmp should at least give you some info about not only what was nulled but what the other part was like since yours is a null astr this will tell you what bstr is helps you check it a little bit.

bool str_cmp( const char *astr, const char *bstr )
{
    char buf[MAX_STRING_LENGTH];

    if ( !astr || !bstr )
    {
    sprintf( buf, "Str_cmp: null astr. %s or null bstr. %s", astr, bstr );
    bug( buf );
    }

    if ( !astr )
    {
	bug( "Str_cmp: null astr." );
	if ( bstr )
	  fprintf( stderr, "str_cmp: astr: (null)  bstr: %s\n", bstr );
	return TRUE;
    }

    if ( !bstr )
    {
	bug( "Str_cmp: null bstr." );
	if ( astr )
	  fprintf( stderr, "str_cmp: astr: %s  bstr: (null)\n", astr );
	return TRUE;
    }

    for ( ; *astr || *bstr; astr++, bstr++ )
    {
	if ( LOWER(*astr) != LOWER(*bstr) )
	    return TRUE;
    }

    return FALSE;
}


Hope this helps out on the problems.
       
Post is unread #5 Aug 10, 2002, 10:04 am
Go to the top of the page
Go to the bottom of the page

kilroy
Magician
GroupMembers
Posts122
JoinedMay 1, 2002

so you are using smaug not AFK?
okay then I am afraid that I dont know
sorry

What my example was for was to try to get smaug areas into afk

Kilroy
       
Post is unread #6 Aug 11, 2002, 5:26 am   Last edited Nov 24, 2007, 4:49 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

This bug check is in db.c

Log: [*****] BUG: Str_cmp: null astr.

bool str_cmp( const char *astr, const char *bstr )
{
    char buf[MAX_STRING_LENGTH];

    if ( !astr || !bstr )
    {
    sprintf( buf, "Str_cmp: null astr. %s or null bstr. %s", astr, bstr );
    bug( buf );
    }

    if ( !astr )
    {
	bug( "Str_cmp: null astr." );
	if ( bstr )
	  fprintf( stderr, "str_cmp: astr: (null)  bstr: %s\n", bstr );
	return TRUE;
    }

    if ( !bstr )
    {
	bug( "Str_cmp: null bstr." );
	if ( astr )
	  fprintf( stderr, "str_cmp: astr: %s  bstr: (null)\n", astr );
	return TRUE;
    }

    for ( ; *astr || *bstr; astr++, bstr++ )
    {
	if ( LOWER(*astr) != LOWER(*bstr) )
	    return TRUE;
    }

    return FALSE;
}


Hope this helps out on the problems.

That's not going to help. When it informs you you have a NULL astr, then trying to append it to a buffer for output is going to cause you to crash and burn, or at the very least be outputting junk information. This is why the bug report isn't as informative as it could be. Best to just not mess with it.

As for why Vladaar is getting those, it's no doubt because of the same problems in the load_corpses stuff since there are other bugs being generated there.
       
Post is unread #7 Aug 11, 2002, 10:36 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Actualy it does tend to help a little like since I was getting the null astr from do_who it would give the players name and considering that in do_who it could be from almost anything in there the name at least told me that it was something about that players name that the rest didn't have showing up on do_who in which it did help find the problem some. It doesn't crash or at least it never has on me using it like that.
It will probably show something like this
Str_cmp: null astr. NULL or null bstr. khalam

At least mine showed that way because it has something to do with what it tried to show with khalams name on do_who

And dont think it was from the corpse files because the corpse bugs were being made when it was loading the corpses
on startup.

Its up to him if he wants to try adding that or not. I guess as with most codes it could mess up or work fine.
       
Pages:<< prev 1 next >>