This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

eggdrop crashing after dprintf

Discussion of Eggdrop's code and module programming in C.
Post Reply
g
greensheep
Voice
Posts: 1
Joined: Mon Mar 07, 2005 5:24 am
Location: Italy

eggdrop crashing after dprintf

Post by greensheep »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

it's more likely your code has a bug

post gdb bt full output of a crash and relevant parts of your code
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

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.
Post Reply