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 

bot crashing wtf

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
BadAssWright
Voice


Joined: 14 Aug 2005
Posts: 8

PostPosted: Fri Apr 27, 2007 1:01 pm    Post subject: bot crashing wtf Reply with quote

Well i have my debug script and i been trying to use .debug in dcc chat but this is all i get


[10:01:35] <BaW> .debug memory
[10:01:35] <BotServ> [12:00] #BaW# debug
[10:01:35] <BotServ> Compiled without extensive memory debugging (sorry).
[10:01:35] <BotServ> Open sockets: 3 (listen), 4 (passed on), 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, done.

I dont understand it should have alot more detail in that right?


Also this is my debug report i been looking at the script and still nothing right now Sad




Debug (eggdrop v1.6.1Cool written Fri Apr 13 18:24:26 2007
Full Patch List:
Tcl library: /usr/local/lib/tcl8.4
Tcl version: 8.4.13 (header version 8.4.13)
Compile flags: gcc -pipe -mwin32 -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H
Link flags: gcc -pipe -mwin32
Strip flags: strip
Context: tclhash.c/684, [Tcl proc: *raw:PRIVMSG, param: $_raw1 $_raw2 $_raw3]
tclhash.c/695, []
tclhash.c/680, []
tclhash.c/684, [Tcl proc: *raw:irc:mode, param: $_raw1 $_raw2 $_raw3]
tclhash.c/680, []
tclhash.c/684, [Tcl proc: cl_mode, param: $_kick1 $_kick2 $_kick3 $_kick4 $_kick5 $_kick6]
tclhash.c/695, []
tclhash.c/680, []
tclhash.c/684, [Tcl proc: deopreport, param: $_kick1 $_kick2 $_kick3 $_kick4 $_kick5 $_kick6]
tclhash.c/680, []
tclhash.c/684, [Tcl proc: bs_part, param: $_p1 $_p2 $_p3 $_p4 $_p5]
tclhash.c/695, []
tclhash.c/680, []
tclhash.c/684, [Tcl proc: ban:jp, param: $_p1 $_p2 $_p3 $_p4 $_p5]
tclhash.c/695, []
tclhash.c/695 []

SOCK ADDR PORT NICK HOST TYPE
---- -------- ----- --------- ----------------- ----
3 4B7E73A3 6521 (telnet) * lstn 6521
4 00000000 0 (dns) dns (ready)
5 4B7E73A3 6000 BotServ PRIAVTE bot flags: pucosgwliA
6 4296DB05 6667 (server) PRIVATE serv (lag: 0)

Compiled without extensive memory debugging (sorry).
Open sockets: 3 (listen), 4 (passed on), 5, 6 (inbuf: 0054), 7 (file), done.



I know you guys wnat to look at my code but its really to big to put on here, over 400kb
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Apr 27, 2007 1:23 pm    Post subject: Reply with quote

Read here about how to load scripts without them crashing the bot:
http://forum.egghelp.org/viewtopic.php?p=63899#63899

And read here about how to use .set errorInfo to get meaningful debug output: http://forum.egghelp.org/viewtopic.php?t=10215
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Apr 27, 2007 1:37 pm    Post subject: Reply with quote

.debug is only used to track down memleaks and such in the core application (and modules); and is pretty useless for debugging tcl-scripts. And since your bot (precompiled windrop?) was compiled without debugging symbols, .debug really does'nt provide much more info than that.

If you're trying to debug a tcl-script, considder implementing the bgerror reporting mechanism, as it will allow you to trigger code whenever an unhandled (script)error occurs and allows you to gather extensive information at the moment of the error (contrary to the ".set errorInfo" method that is improperly used/recommended by many ppl on this forum).

This example should demonstrate the proper use of the errorInfo and errorCode variables:
Code:
proc bgerror {message} {
 putloglev d * "bgError: \"$message\":"
 foreach line [split $::errorInfo "\n"] {
  putloglev d * "  $line"
 }
 putloglev d * "bgError: errorCode: $::errorCode"
}


Edit: Oh, might also wanna check the first link posted by rosc as it gives a good example of using errorCode and errorInfo with inline debugging (using catch)
_________________
NML_375, idling at #eggdrop@IrcNET
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 -> Scripting Help 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