Login
User Name:

Password:



Register

Forgot your password?
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
Users Online
AhrefsBot, Google

Members: 0
Guests: 27
Stats
Files
Topics
Posts
Members
Newest Member
489
3,791
19,644
596
Elwood

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » General » Smaug Snippets » Little problem
Forum Rules | Mark all | Recent Posts

Little problem
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Oct 13, 2009 3:00 am   
Go to the top of the page
Go to the bottom of the page

Lares
Fledgling
GroupMembers
Posts13
JoinedSep 29, 2009

 
This is a problem with overland I just found... Seems to be crashing my mud, though I hadn't used minvoke till now. Appreciate any help you can give me.

The GDB Backtrace:

#0  0x081b4dcd in fix_maps (ch=0x87cadf8, victim=0x40190001) at overland.c:630
630                xSET_BIT( victim->act, ACT_ONMAP );
(gdb) bt
#0  0x081b4dcd in fix_maps (ch=0x87cadf8, victim=0x40190001) at overland.c:630
#1  0x080cadc7 in do_minvoke (ch=0x87cadf8, argument=0xbfb1c6f5 "1200") at act_wiz.c:3160
#2  0x0816de98 in interpret (ch=0x87cadf8, argument=0xbfb1c6f5 "1200") at interp.c:548
#3  0x0812193e in game_loop () at comm.c:864
#4  0x081237b1 in main (argc=5, argv=0xbfb1cbe4) at comm.c:533



The piece of code at line 630 overland.c (As you can see, I've been trying some stuff.)

      if( IS_NPC( victim ) && xIS_SET( victim->act, ACT_ONMAP) )
           xSET_BIT( victim->act, ACT_ONMAP );
/*         REMOVE_ACT_FLAG( victim, ACT_ONMAP ); */
      else if( !IS_NPC( victim ) && xIS_SET( victim->act, PLR_ONMAP ) )
         REMOVE_ACT_FLAG( victim, PLR_ONMAP );



So, my understanding is that this is supposed to check if the victim is being loaded on the map then it needs to ACT/PLR flags as such.

I am getting crashes when loading a mobile into a non-map room.

Post is unread #2 Oct 13, 2009 3:48 am   Last edited Oct 13, 2009 3:48 am by Kayle
Go to the top of the page
Go to the bottom of the page

InfiniteAxis
Off the Edge of the Map
GroupAdministrators
Posts1,200
JoinedMar 21, 2006

 
Just the backtrace provided isn't really helpful. There are several lines before the actual backtrace that actually tell you exactly what the issue is.

I'll admit, I'm not entirely familiar with the Overland system (mainly because I don't like that type of system in general), but if you're trying to load a mob into a non-map room. I don't think you want to be setting the ACT_ONMAP flag on them. Also, that check is making sure that they have the flag. So, if they already have it, why exactly would you want to set it on them?

Post is unread #3 Oct 13, 2009 4:14 am   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,685
JoinedJan 1, 2002

 
#0 0x081b4dcd in fix_maps (ch=0x87cadf8, victim=0x40190001) at overland.c:630

That's enough to know that something is corrupting the "victim" pointer. 0x40190001 doesn't appear to be a valid address. do_minvoke is likely passing it data that's not been properly initialized.

Post is unread #4 Oct 13, 2009 1:16 pm   
Go to the top of the page
Go to the bottom of the page

Lares
Fledgling
GroupMembers
Posts13
JoinedSep 29, 2009

 
Thanks for the assist. I fixed the crashing by going into Minvoke and adding checks around the fix_maps call to check in the character doing the minvoke is on a map.

This seems to allow me to minvoke properly without crashing, though I am too afraid of trying it on a map just yet.

Pages:<< prev 1 next >>