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, Yahoo!, Yandex, Bing

Members: 0
Guests: 7
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 » General Discussions » What did I do wrong here?
Forum Rules | Mark all | Recent Posts

What did I do wrong here?
< Newer Topic :: Older Topic > Pointer fun

Pages:<< prev 1 next >>
Post is unread #1 Aug 28, 2006, 10:00 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Right, so my dev port has been crashing a lot. Backtraces here:
http://www.gammon.com.au/forum/?id=7312&page=999

I narrowed it down to what I think is this. I added two pointers to char_data (ignore the comments):
    //CHAR_DATA *         quest_mob;
    //OBJ_DATA *          quest_item;


In another file:
quest.c:            //if ( ch->questobj > 0 && ch->quest_item )
quest.c:                //ch->quest_item->timer = ch->countdown+2;
quest.c:                //ch->quest_item = NULL;
quest.c:                    //ch->quest_item = NULL;
quest.c:        //ch->quest_item = NULL;
quest.c:        //ch->quest_item = NULL;
quest.c:        //ch->quest_item = NULL;
quest.c:        //ch->quest_item = questitem;
quest.c:                //ch->quest_item = NULL;


handler.c:          //if ( wch->quest_mob && wch->quest_mob == ch )
handler.c:              //wch->quest_mob = NULL;
quest.c:                //ch->quest_mob = NULL;
quest.c:                    //ch->quest_mob = NULL;
quest.c:        //ch->quest_mob = NULL;
quest.c:        //ch->quest_mob = NULL;
quest.c:        //ch->quest_mob = NULL;
quest.c:    //ch->quest_mob = victim;
quest.c:                //ch->quest_mob = NULL;


Now, with those commented out like so and some other few lines deleted, the crashes no longer happen.

Did I do something wrong that you can tell? It must be something to do with this.
       
Post is unread #2 Aug 29, 2006, 3:17 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

That whole quest code is fairly buggy. I already have plans for something similar in my code at a later point when I have areas to work with, but I will be doing it without that snippet. It would likly be easier in alot of ways to simply right your own also. Considering it's a RECREATE issue chances are it's a memory handling issue. This is one snippet you really have to spend alot of time going through and fixing lots of things on.
       
Post is unread #3 Aug 29, 2006, 8:09 am
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Hmm. Well what I added to the snippet was my own doing, so I was thinking it was something I did wrong.
       
Post is unread #4 Aug 29, 2006, 9:23 am   Last edited Aug 29, 2006, 9:23 am by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Hard to find the problem in what you have posted here. Would need all the changes you did, for what you added, that you think might have messed it up.
       
Pages:<< prev 1 next >>