Thanks for all the replys, and sorry for being so tense.

I originally thought, someone might understand, what I'm looking at.

The basic Idea is that I have a client, who knows enogh about director, that
he want's me to trap all alerts with the Alerthook, and log them in a text
file.

So basically, after this, you can go right ahead and copy the code, as I'm
no officially making it OpenSource...
The basic idea is that instead of seeing errors the Application writes
Errors into log file, so when the client has a problem he will be asked to
send the logfile to techsupport for analysis

About the code itself: Lingo, BuddyAPI, FileIO and one own xtra, which
supplies the TimeGetDateTime property.

The AHGeneric - globals stores info about the machine, it's operating system
etc.
In My case the AHgeneric contains the following info: "AMD,Athlon or
Duron,799,1118.6000,Win2000"

The Idea of BDDLog is to create an array which will be written to a
csv-table, one line per error.
The line itself, when written into a final log contains the following Data:
"12062001085526;frame 109 of movie main.dir;Script runtime error;cannot
divide by zero;script;AMD,Athlon or Duron,799,1118.6000,Win2000"
The intended delimiter is naturally ";"
The first item displays the time DDMMYYYYHHMMSS
thye second item log's where the error happened
The following three items stor the data accompanied by the alerthook
arguments
and the last item stores machine Data, to help analysis.

The Script assigned to the alerthook is:

global AHSet, BDDLog, AHGeneric, LogFilePath

on alerthook me, err, msg, type
  errorData = []
  if the runmode = "author" then exit

  -- start checking for possible endless loop
  EndlessLoopSit = 0
  if count(BDDLog) > 2 then
    ThreeBugsBack = BDDLog[count(BDDLog)-2]
    TimeOfthatBug = ThreeBugsBack[1]
    if TimeOfThatBug = TimeGetDateTime() then
      -- four errors inside a second  -- probable endless loop
      EndlessLoopSit = 1

    end if
  end if
  if EndlessLoopSit = 0 then
    -- log data as usual
    errorData[1] = TimeGetDateTime()
    errorData[2] = "frame"&&the frame&&"of movie"&&the moviename
    errorData[3] = Err
    errorData[4] = msg
    errorData[5] = type
    errorData[6] = AHgeneric
    add BDDLog, ErrorData
    SaveLog BDDLog
  else
    errorData[1] = TimeGetDateTime()
    errorData[2] = "frame"&&the frame&&"of movie"&&the moviename
    errorData[3] = Err
    errorData[4] = msg
    errorData[5] = type
    errorData[6] = "Program was terminated due to unrecoverable failure"
    add BDDLog, ErrorData
    SaveLog BDDLog
    stopMovie
    abort
    halt
  end if
  return 1
end

The main Idea here is to :
a# log all errors
b# hide the alerts
While still being able to determine whether the projector is jammed in an
endless loop of scripterrors and quit cleanly.
The first part it does nicely, it detects an endless loop -jam-up by
comparing whether the current error and the error three errors back occurred
during the same second. The other part is the problem.


Now in this case I revamped the code according to the Chief Investigator's
suggestion, and It does not do it.
The problem seems to be, that Director (not Lingo) Is running in such a
tight loop here, that the although (weirdly enough) Lingo can find the time
within this loop to update the array, and save it, Somehow Director cannot
find time to process the other commands.

I've also tried MappRudeQuitTask, and either Masterapp, wont allow you to
crach it's host, or then even that does not get through. The problem is not
of the type either that I would have been to impatient. If I do an alert
"stuff" within a repeatloop from 1 to 1000 the code tries to quit the
Projector after the fourth error, but won't get through befor the loop is
finished, weirdest is that eventhough the quit / halt / ... commands can't
find time to run, I still get a full log.

I'm open to suggestions. I also attach a genuine log example of a custom
alert repeated 10 times, to show that somehow the projector ain't able to
quit...

Pekka

<LOG>
12062001085526;frame 109 of movie main.dir;Script runtime
error;shite;alert;AMD,Athlon or Duron,799,1118.6000,Win2000
12062001085526;frame 109 of movie main.dir;Script runtime
error;shite;alert;AMD,Athlon or Duron,799,1118.6000,Win2000
12062001085526;frame 109 of movie main.dir;Script runtime
error;shite;alert;AMD,Athlon or Duron,799,1118.6000,Win2000
12062001085526;frame 109 of movie main.dir;Script runtime
error;shite;alert;Program was terminated due to unrecoverable failure
12062001085526;frame 109 of movie main.dir;Script runtime
error;shite;alert;Program was terminated due to unrecoverable failure
12062001085526;frame 109 of movie main.dir;Script runtime
error;shite;alert;Program was terminated due to unrecoverable failure
12062001085526;frame 109 of movie main.dir;Script runtime
error;shite;alert;Program was terminated due to unrecoverable failure
12062001085526;frame 109 of movie main.dir;Script runtime
error;shite;alert;Program was terminated due to unrecoverable failure
12062001085526;frame 109 of movie main.dir;Script runtime
error;shite;alert;Program was terminated due to unrecoverable failure
12062001085526;frame 109 of movie main.dir;Script runtime
error;shite;alert;Program was terminated due to unrecoverable failure
</LOG>





> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Terry R. Schussler
> Sent: 12. kesakuuta 2001 0:42
> To: [EMAIL PROTECTED]
> Subject: Re: <lingo-l> FORCING Projector to quit
>
>
> Have you tried replacing the call to quit with:
>
> stopMovie
> abort
> halt
>
> in that order?
>
> --
>
> ...---===|  Terry R. Schussler  |===---...
> ...---===|  Chief Investigator  |===---...
>
> on visitWebsite yourSelection
>  coolSites = [ \
>    #advancedSeminars : "http://www.macromediaSEMINARS.com/";, \
>    #directorUniversity: "http://www.directorU.com";, \
>    #multiuserUniversity: "http://www.multiuserU.com";, \
>    #flashUniversity: "http://www.flash5U.com";, \
>    #freeBehaviors : "http://www.behaviors.com/";]
>  gotoNetPage coolSites[yourSelection]
> end visitWebsite
>
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
> email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo.  Thanks!]
>


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to