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.

Weirdness, Lines of code being skipped randomly ???

Help for those learning Tcl or writing their own scripts.
Post Reply
m
madpinger
Voice
Posts: 12
Joined: Sun Oct 03, 2010 3:06 pm

Weirdness, Lines of code being skipped randomly ???

Post by madpinger »

Ok, the details of the setup.
I'm using the following packages:
base64, tdom, http, sqlite3, mysqltcl

Tcllib 1.2, tcl 8.5.9 and 8.5.8

Eggdrop 1.6.8+sockfix svn snapshot and Eggdrop 1.6.20.

These are two distinct builds running the same script on two sep. servers and having the same weirdness.

In several places, I have statements where only PART of the code
In the following example:

Code: Select all

    set auth "Basic [base64::encode [CoreDB_iceCastUserName]:[CoreDB_iceCastPassWord]]"
    set headerl [list Authorization $auth]
    if { [catch { set tok [http::geturl "http://[CoreDB_iceCastHost]:[CoreDB_iceCastPort]/admin/stats" -headers $headerl] } errmsg] } {
	putlog "icecastproc: Fetching of icecast XML failled with error: $errmsg : Delaying run.";
	dputs "icecastproc: Finnished With Errors";
	utimer 30 icecastproc
	return 1
    }
Some times, it ONLY executes the "putlog" statement and then continues execution of code past the closing curly bracket when it should return. it does not even execute the dputs function or utimer. Yet, I have removed everything but the return, it refuses to execute anything other than the putlog statement when errors like "Connection refused" occur, etc. Other times, it acts as expected, records the error to log and resets the timer.

I have sim issues in a few places and am at a utter loss as to why.
Anyone have an Ideal whats going on ?
User avatar
Pixelz
Voice
Posts: 24
Joined: Wed Jun 15, 2005 9:37 am
Location: EFnet

Re: Weirdness, Lines of code being skipped randomly ???

Post by Pixelz »

Some times, it ONLY executes the "putlog" statement
it does not even execute the dputs function or utimer.
That's just not possible. You sound very confused.
Pixelz @ EFnet, freenode, QuakeNet, Undernet
m
madpinger
Voice
Posts: 12
Joined: Sun Oct 03, 2010 3:06 pm

Re: Weirdness, Lines of code being skipped randomly ???

Post by madpinger »

Pixelz wrote:
Some times, it ONLY executes the "putlog" statement
it does not even execute the dputs function or utimer.
That's just not possible. You sound very confused.
No, I'm not confused. It's weirdness.
Sometimes, it only executes the very first line, others it does not. Regardless it skips the return and continues execution of code past the bracket. Rather bothersome really.
Post Reply