Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Development
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
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, Bing

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
634
BlaineNock
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » ch_printf
Forum Rules | Mark all | Recent Posts

ch_printf
< Newer Topic :: Older Topic > Problems with the color V3.0

Pages:<< prev 1 next >>
Post is unread #1 Oct 4, 2003, 1:09 am   Last edited Nov 24, 2007, 12:29 am 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 been doing some work, and apparently my code doesn't like me. This is what I get from my core
#0  0x2ab58c52 in vfprintf () from /lib/libc.so.6
#1  0x2ab65c76 in vsnprintf () from /lib/libc.so.6
#2  0x81c9eca in ch_printf (ch=0x86663c8, fmt=0x82115e0 "&B|| &BF&zirstroom:&w %-6d &BL&zastroom:&w %-6d &BC&zockpit:&w    %-6s

";) at color.c:1192
#3  0x816060a in do_showship (ch=0x86663c8, argument=0x7ffff4f9 "mc-90";) at space.c:3558
#4  0x80f601d in interpret (ch=0x86663c8, argument=0x7ffff4f9 "mc-90";) at interp.c:354
#5  0x80c2a1b in game_loop () at comm.c:623
#6  0x80c1bb7 in main (argc=2, argv=0x7ffff974) at comm.c:258
#7  0x2ab2baa7 in __libc_start_main () from /lib/libc.so.6
(gdb) frame 2
#2  0x81c9eca in ch_printf (ch=0x86663c8, fmt=0x82115e0 "&B|| &BF&zirstroom:&w %-6d &BL&zastroom:&w %-6d &BC&zockpit:&w    %-6s

";) at color.c:1192
1192         vsnprintf( buf, MSL*4, fmt, args );
(gdb) print buf
$1 = "&B|| &BF&zirstroom:&w 6700   &BL&zastroom:&w 6787   &BC&zockpit:&w    cked by:&w None

�00

�00ter

�00200¶*�~¿*i­�34234224ÿ177R213¶*�224ÿ177@�24%�00�00�00�00�00�00�00�00�~¿*200225ÿ177«O¶*�224ÿ177�v�37°225ÿ177�224ÿ177@�24%ÿÿÿÿ@�24%�224ÿ177�00�00�00�00�~¿*��*l!%�00�00�00�00�~¿*"...
(gdb) 
All the code is is a ch_printf, and it will only crash on certain ships that I target, others it will work just fine, and never crash. I though it might be the ship, but thats not what GDB seems to be saying. I assume that buf is not supposed to have this stuff in it, any idea why it might?
       
Post is unread #2 Oct 4, 2003, 3:04 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

#3 0x816060a in do_showship (ch=0x86663c8, argument=0x7ffff4f9 "mc-90";) at space.c:3558

The line referenced here would be of more help in diagnosing the problem since this is really where it's coming from.
       
Post is unread #3 Oct 4, 2003, 11:12 am
Go to the top of the page
Go to the bottom of the page

Greven
Magician
GroupMembers
Posts204
JoinedMar 5, 2005

Never mind, I'm a total retard. Stupid newbie mistake that I would have noticed had it not been 3 in the morning. Sorry to bug you.
       
Pages:<< prev 1 next >>