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

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

 [1/6] 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]

 [2/6] from: antonr:lexicon at: 31-Mar-2004 13:15


I see the crash here. I used a cleaned up version of the script, which you can find at bottom. Anton.
> If you use read/lines inside a "does" routine and read/lines > fails a couple
<<quoted lines omitted: 14>>
> Could you confirm the BUG too ? > Giuseppe Chillemi
REBOL [ Author: "Giuseppe Chillemi" Description: "read/lines BUG Catcher" Notes: {modified by Anton Rolls} ] logfile: %Activity.log log: func [string][ write/append/lines logfile reform [now/time string] ] write logfile "" ; create new logfile log "start" read-page: [ bug?: no until [ if error? set/any 'err try [ my-page: read/lines my-url ][ print [now/time "! Read Error on page" my-url mold disarm err] bug?: yes ] log "Point 0" bug? ] log "Point 1" ] activate-search: does [ my-url: http://www.google.com log "Point 2" print [now/time "Looping..."] log "Point 3" do read-page log "Point 4" ] loop 100 [activate-search] halt

 [3/6] from: antonr:lexicon at: 31-Mar-2004 13:32


Here is a more reduced version. It crashes as soon as I engage internet lock. -Anton REBOL [ Author: "Giuseppe Chillemi" Description: "read/lines BUG Catcher" Notes: {modified by Anton Rolls} ] logfile: %Activity.log log: func [string /local ts][ write/append/lines logfile ts: reform [now/time string] ts ] write logfile "" ; create new logfile log "start" loop 100 [ my-url: http://www.google.com log "Point 1" print log "Looping..." log "Point 2" ; read-page bug?: no until [ if error? set/any 'err try [ my-page: read/lines my-url ][ print log rejoin ["! Read Error on page: " my-url mold disarm err] bug?: yes ] log "Point 3" bug? ] log "Point 4" ] halt

 [4/6] from: brett:codeconscious at: 31-Mar-2004 17:55


Hi Giuseppe and Anton,
> Here is a more reduced version. > It crashes as soon as I engage internet lock.
I tried this test - I had no problems. On one machine I don't have zone alarm installed. Instead I turn my cable modem off and on. I used view 1.2.8 On another machine I used Norton's to block internet traffice - again no problems. I used latest view experimental 1.2.41 Perhaps you should try pulling the plug on your internet connection instead of using zone alarm - to see if you get different results. Regards, Brett. ----- Original Message ----- From: "Anton Rolls To: <[rebol-list--rebol--com]> Sent: Wednesday, March 31, 2004 1:32 PM Subject: [REBOL] Re: ANNOUNCE: I have catched the source of the read/lines bug !

 [5/6] from: gchillemi:aliceposta:it at: 31-Mar-2004 12:22


Hi Brett, Rebol/View version 1.2.1.3.1, the latest official release, show the BUG. Try the script using that version. Giuseppe Chillemi [gchillemi--aliceposta--it]

 [6/6] from: antonr:lexicon at: 1-Apr-2004 3:04


That's interesting. I have found my version of ZoneAlarm to be buggy with the internet lock before; it didn't always "unlock" again. I will ask henrick if he is using ZoneAlarm. But, I tried the test on latest view beta: 1.2.41.3.1 Anton.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted