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.

bot crashing wtf

Help for those learning Tcl or writing their own scripts.
Post Reply
B
BadAssWright
Voice
Posts: 8
Joined: Sun Aug 14, 2005 6:20 pm

bot crashing wtf

Post by BadAssWright »

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 :(




Debug (eggdrop v1.6.18) 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
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

.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: Select all

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