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

[REBOL] ANNOUNCE: I have catched the source of the read/lines bug !

From: gchillemi::aliceposta::it at: 30-Mar-2004 17:42

If you use read/lines inside a "does" routine and read/lines fails a couple of times Rebol will probably crash at the returning from the routine block. To reproduce the BUG used the following script + ZONE ALARM (needed to STOP internet activity by hand). Do this: Run the script Stop the internet activity with the aid of the "lock" of Zone Alarm. Mantain the lock closed until the script prints an error message. Restart the internet activity and wait for the script to cointinue its looping. Then stop internet activity again. Do this until Rebol will crash (this happen before 5 or 6 locks/unlocks) The script provides logging at /c/activity.log As you can see the last logged line is "Point 3" which is written just before the routine "read-page". All the loggin which happens inside the read-page loop is written before "Point 3". "Point 4", which is written after returning from "read-page", is never written if the bug occurs. REBOL [ Author: "Giuseppe Chillemi" Description: "BUG Catcher" ] write/lines %/c/Activity.log reform [now/time ""] read-page: does [ go-on: 0 until [ either error? read-result: try [my-page: read/lines to-url my-url] [ print [now/time now/time "! Read Error on page" my-url] ] [ go-on: 1 ] write/append/lines %/c/Activity.log reform [now/time "Point 0"] go-on = 1 ] write/append/lines %/c/Activity.log reform [now/time "Point 1"] ] activate-search: does [ my-url: rejoin["http://www.google.com"] ;rejoin should not be needed write/append/lines %/c/Activity.log reform [now/time "Point 2"] print [now/time "Looping..."] write/append/lines %/c/Activity.log reform [now/time "Point 3"] read-page write/append/lines %/c/Activity.log reform [now/time "Point 4"] ] loop 100 [activate-search] halt I have reported everything to the Rebol people and waiting for an answer. Could you confirm the BUG too ? Giuseppe Chillemi [gchillemi--aliceposta--it]