egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

eggdrop crashing after dprintf

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Modules & Programming
View previous topic :: View next topic  
Author Message
greensheep
Voice


Joined: 07 Mar 2005
Posts: 1
Location: Italy

PostPosted: Mon Mar 07, 2005 6:06 am    Post subject: eggdrop crashing after dprintf Reply with quote

hi

(excuse my english)

i'm programming a eggdrop module.
i'm using eggdrop1.6.17 and cygwin (windrop).
my eggdrop crash after a simple call to dprintf function.

...
dprintf(DP_MODE, "privmsg %s :%s\r\n",chan,message);
...

the message is repeated 2 times in the chan with a single function call,
then the bot crashes.

my module can run 6 hours or only 2 minutes.
the crash is unforeseeable, with the same code.

i'm using many contexts for this bug.
but the last context is before a return insturction,
and my typical call is:
dprintf(DP_MODE, "privmsg %s :%s\r\n",chan,mymessagefunc(format,par1,par2,...));

dprintf function is sensible to a particular char sequence or codes?

thanks greensheep
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Mar 07, 2005 3:23 pm    Post subject: Reply with quote

it's more likely your code has a bug

post gdb bt full output of a crash and relevant parts of your code
Back to top
View user's profile Send private message Visit poster's website
Galadhrim
Op


Joined: 11 Apr 2003
Posts: 123
Location: Netherlands, Enschede

PostPosted: Mon Mar 14, 2005 6:52 am    Post subject: Reply with quote

indeed I think your message function has a bug so it won't continue.

also I always use dprintf(DP_SERVER, "privmsg %s: %s\r\n, chan, message); maybe that helps...

i suggest you execute "gdb eggdrop core" and place it here with the code where the bot crashed (gdb shows the file and line number). Be sure to post enough code so we can understand it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Modules & Programming All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber