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 

Stats.mod Crashing Error

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


Joined: 27 Apr 2002
Posts: 265
Location: Manchester, England

PostPosted: Tue Jan 03, 2006 10:20 am    Post subject: Stats.mod Crashing Error Reply with quote

Hi,

Using eggdrop 1.6.17 and using Stats.mod 1.3 (not touched the new one yet).

Found an error, which crashes the bot completely.

.schannel <channel>

If i put a channel in, it dies horribly.

this is the error recorded in debug mode:

Quote:

[14:17] tcl: builtin dcc call: *dcc:schannel Weirdo 13 ##uno##
[14:17] #Weirdo# (#catgirls) schannel ##uno##
[14:17] * Last context: stats:userrec.c/535 []
[14:17] * Please REPORT this BUG!
[14:17] * Check doc/BUG-REPORT on how to do so.
[14:17] * Wrote DEBUG
[14:17] * BUS ERROR -- CRASHING!
Bus error (core dumped)



Debug file
Quote:

Debug (eggdrop v1.6.17) written Tue Jan 3 14:17:50 2006
Full Patch List:
Tcl library: /usr/local/lib/tcl8.4
Tcl version: 8.4.7 (header version 8.3.5)
Compile flags: gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H
Link flags: gcc -pipe
Strip flags: touch
Context: tclhash.c/688, []
tclhash.c/680, []
tclhash.c/684, [Tcl proc: *raw:irc:msg, param: $_raw1 $_raw2 $_raw3]
tclhash.c/680, []
tclhash.c/684, [Tcl proc: *pubm:stat, param: $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
stats:userrec.c/29, []
stats:datahandling.c/1004, []
tclhash.c/688, []
tclhash.c/688, []
tclhash.c/680, []
tclhash.c/684, [Tcl proc: *raw:PRIVMSG, param: $_raw1 $_raw2 $_raw3]
tclhash.c/688, []
tclhash.c/680, []
tclhash.c/684, [Tcl proc: *dcc:schannel, param: $_dcc1 $_dcc2 $_dcc3]
stats:dcccmds.c/166, []
stats:userrec.c/535 []

SOCK ADDR PORT NICK HOST TYPE
---- -------- ----- --------- ----------------- ----
3 C3F2D525 1600 (telnet) * lstn 1600
4 00000000 0 (dns) dns (ready)
6 DEADF00D 4060 livestats * lstn port
9 550DFB12 6667 (server) irc.rizon.net serv (lag: 0)
13 5164F250 64443 Weirdo broadband.ntl.com chat flags: cpTep/0

Compiled without extensive memory debugging (sorry).
Open sockets: 3 (listen), 4 (passed on), 6 (listen), 9, 13, 14 (file), done.


Furthermore, its occuring only on commands in channels where stats is monitored, but not outputted. IE no !stat or livestats. I am thinking it may be data corruption.

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


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

PostPosted: Tue Jan 03, 2006 11:13 pm    Post subject: Reply with quote

you might want to report this to the author, although I don't believe this thing is still being developed
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Weirdo
Master


Joined: 27 Apr 2002
Posts: 265
Location: Manchester, England

PostPosted: Wed Jan 04, 2006 5:32 am    Post subject: Reply with quote

What seems to have fixed it is a stats reset.

Looks like it must have been caused by a dead or corrupted file. Ill pass it on.
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed Jan 04, 2006 2:11 pm    Post subject: Reply with quote

Strange thing. I checked the source code of the function, but the only thing the looked suspincious could not be confirmed by me (stats usernames bigger than HANDLEN, because it might have been lead to set a negative array element).

Code:
static int cmd_schannel(struct userrec *u, int idx, char *par)
{
  char *chname, spaces[50], *user, ubuf[2];
  struct stats_chanset *chan;
  struct stats_memberlist *m;
  int len = 0;

 
  ubuf[0] = '*';
  ubuf[1] = 0;
#if EGG_IS_MIN_VER(10500)
  len = nick_len;
#else
  len = NICKLEN;
#endif
  chname = newsplit(&par);
  putlog(LOG_CMDS, "*", "#%s# (%s) schannel %s", dcc[idx].nick,
    dcc[idx].u.chat->con_chan, chname);
  if (!chname[0])
    chname = dcc[idx].u.chat->con_chan;
  chan = findschan(chname);
  if (!chan) {
    if (!findchan_by_dname(chname))
      dprintf(idx, "Invalid channel: %s\n", chname);
    else
      dprintf(idx, "Channel %s is inactive\n", chname);
    return 0;
  }
  dprintf(idx, "%d users on channel:\n", countmembers(chan->members));
  sprintf(spaces, "                                                ");
  spaces[len - 4] = 0;
  dprintf(idx, "NICK%s", spaces);
  spaces[len - 4] = ' ';
  spaces[HANDLEN - 4] = 0;
  dprintf(idx, "  USER%s", spaces);
  dprintf(idx, "  UHOST\n");
  spaces[HANDLEN - 4] = ' ';
  for (m = chan->members; m; m = m->next) {
    if (m->user)
      user = m->user->user;
    else
      user = ubuf;
    spaces[len - strlen(m->nick)] = 0;
    dprintf(idx, "%s%s", m->nick, spaces);
    spaces[len - strlen(m->nick)] = ' ';
    spaces[HANDLEN - strlen(user)] = 0;
    dprintf(idx, "  %s%s", user, spaces);
    spaces[HANDLEN - strlen(user)] = ' ';
    dprintf(idx, "  %s\n", m->uhost);
  }
 
  return 0;
}

I am too lazy to unbind channels from !stats and livestats just to confirm if it is really because of such a silly thing.

Just to make sure... you are taking about stats.mod 1.3.3dev1 ?!
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
Weirdo
Master


Joined: 27 Apr 2002
Posts: 265
Location: Manchester, England

PostPosted: Wed Jan 04, 2006 2:16 pm    Post subject: Reply with quote

No, using the 1.3 version that comes with Eggdrop 1.6.16 (I didnt like all the new fangled features of the newest release).

If it helps, handlen is set to 30 on my bot. Edited the eggdrop.h to allow long handle lengths before compiling.
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed Jan 04, 2006 2:32 pm    Post subject: Reply with quote

There is no stats.mod provided with any official eggdrop versions. So any package including stats.mod HAS been modified Smile.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
Weirdo
Master


Joined: 27 Apr 2002
Posts: 265
Location: Manchester, England

PostPosted: Wed Jan 04, 2006 2:45 pm    Post subject: Reply with quote

Mmmm,

Perhaps its one i downloaded a long long long time ago and just kept?

Which, is also highly likely.

Its reported in the bot as Version 1.3, however, on examination of the files i used to compile her with, it IS 1.3.3 Dev1 it seems.

Sorry for the confusion.
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