Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

patching print & probe so they log to a file disk. [logs] [print] [probe]

 [1/5] from: maximo::meteorstudios::com at: 25-Mar-2004 11:30


Hi Giuseppe, I changed subject, in order to get some feedback after a crash, you can add this before running your code: ;--------8<--------- invisible logging --------8<-------- log-file: %/path/to/file.txt *print: :print print: func [data /log][ if not log [*print data] write/append log-file append reform data "^/" ] *probe: :probe probe: func [data /log][ if not log [*probe data] write/append log-file append reform data "^/" ] ;--------8<--------- invisible logging --------8<-------- this wont' cure all your problems, but now, at least, whatever you print or probe, gets logged to a file, so you can print as much info as you can and review what happened AFTER the crash... that's what I do when I get to a point where code becomes unstable. It helped me find my crashing glayout issue. can anyone tell me if there is a function which is used to add trace messages even if only for netword stuff... maybe we can patch that one too so that trace gets silently dumped to a file too... :-) would be nice for off-line stats and access logs too. -MAx --- You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun.

 [2/5] from: gchillemi:aliceposta:it at: 25-Mar-2004 17:56


Hi Maxim, thanks for the modified versions of Print and Probe. They solve my logging needs for the whole script. But, how would you debug this: if error? read-result: try [source-page: read/lines to-url url-to-read] Where the crash is in READ/Lines url-to-read Giuseppe Chillemi

 [3/5] from: moliad:aei:ca at: 26-Mar-2004 0:23


hi Giuseppe, you might want to add : trace on trace/net on in your script and launch it this way: rebol -c -s yourScript.r > test.log this will pipe ALL console messages to the test.log file, including all trace messages... if you are reading the net and it fails, you most probably will get trace errors from the network port... hth! -MAx

 [4/5] from: antonr:lexicon at: 29-Mar-2004 20:52


This looks like a bug we were investigating on Rebol-View Alt-ME world. I and henrikmk did a lot of work isolating the bug. There is more work to do, it is not a totally simple example, but one of the instructions required to show the bug was read/lines. I would appreciate if you made as short as possible bug script file that demonstrates this bug. Use a loop if necessary to force it to crash each time it is run. Copy the web page contents to a file in case it changes and no longer shows the bug later. (In our example, though, the net access was necessary.) Incidentally, it is better if we analyse the bug well before sending loads of debug info to Carl Sassenrath. He really doesn't have time to wade through such data. That said, such rebol-crashing bugs have a high priority to be fixed. Anton.

 [5/5] from: gchillemi:aliceposta:it at: 30-Mar-2004 16:24


> This looks like a bug we were investigating on Rebol-View > Alt-ME world. I and henrikmk did a lot of work isolating the > bug. There is more work to do, it is not a totally simple > example, but one of the instructions required to show the > bug was read/lines.
My program has reached its goal at release 2.1.0 but I have freezed the branch which produced the bug at 2.0.0. In this release I have an procedural BUG which let the program continue even if the read/lines produces the error. For this reason I can confirm what you write: the failure of READ/lines is only one of the ingredients that reproduces this problem. This is told me by the print(screen)/append(to file) logging present in some part of the code. I'll do some further investigation and I'll report to the mailing list ASAP. Giuseppe Chillemi