Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl

Members: 0
Guests: 13
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,396
629
DarrenPayn
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Color Snippet
Forum Rules | Mark all | Recent Posts

Color Snippet
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 10, 2004, 3:47 pm   Last edited Nov 23, 2007, 11:42 pm by Samson
Go to the top of the page
Go to the bottom of the page

Greven
Magician
GroupMembers
Posts204
JoinedMar 5, 2005

I've recently had a crash involving the custom ansi code. Here is the GDB info:
#5 0x081bfcce in set_char_color (AType=2088, ch=0x9) at color.c:985
985 ch->desc->pagecolor = ch->colors[AType];
(gdb) print ch
$9 = (CHAR_DATA *) 0x9
(gdb) print ch->desc
Cannot access memory at address 0x7d
And here my copy of the function:
void set_pager_color( sh_int AType, CHAR_DATA *ch )
{
   if ( !ch || !ch->desc )
      return;
    
   write_to_pager( ch->desc, color_str( AType, ch ), 0 );
   ch->desc->pagecolor = ch->colors[AType];
}

So, its invalid now, so I have to assume that its write_to_pager screwing it up. Anyone else had a problem with this?
       
Post is unread #2 Mar 10, 2004, 6:22 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

write_to_pager messing it up would be a pretty good guess. Though I'd not have a clue as to why, it's never done that to us. Possible it could have been hosed by whatever made the call to set_pager_color
       
Post is unread #3 Mar 13, 2004, 9:42 am
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

First question - Was anyone using the SWITCH command when this happened?

--X
       
Post is unread #4 Mar 13, 2004, 10:49 am
Go to the top of the page
Go to the bottom of the page

Greven
Magician
GroupMembers
Posts204
JoinedMar 5, 2005

No, no one was switched. I think what we ended up figuring out is that rat will continue through the loop regardless if ch is valid or not.
       
Post is unread #5 Mar 13, 2004, 12:16 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

Hmm. This of course leads one to wonder how do_rat would cause the *ch data to get corrupted. It's certainly possible given the interrelationships involved. Problem comes from the fact that you ended up with 0x9 instead of 0x0 so even testing for ch == NULL wouldn't help.

Perhaps this is actually one of those instances where intercepting SIGSEGV would be handy since it would generate an immediate backtrace in the logs before moving on. You'd at least know which function triggered it, even if the eventual core dump was hosed.
       
Pages:<< prev 1 next >>