#263 BUG with "address system with stem"

closed-duplicate
5
2012-10-16
2008-02-06
cniggeler
No

Hi,

I am experiencing problems using the 3.4 address system with input stem and/or output stem. It is an intermittent failure using the data in the stem: sometimes it works, sometimes it produces errors (resulting from missing data), and sometimes no output at all happens. This occurs BOTH using rexx.exe 3.4 and using regina (which I assume invokes dynamic library regina.dll).

The failure rate is about 4 in 5! Note that I CANNOT get the problem to occur using Rexx 3.3 or the regina.dll from that build.

Unfortunately, my test cases are quite large but I'm hopeful this description can help narrow down the problem. Please advise if a test case is necessary.

Thanks for your attention,
Chris

Discussion

  • neko

    neko - 2008-02-08

    Logged In: YES
    user_id=1045108
    Originator: NO

    I can confirm about this bug. In addition it is not only stem related. Same problem with stream as input (not sure about FIFO/LIFO).

    Sample code to reproduce this bug 100% (at less on my system):

    Create text file "testfile.txt" with size > 64k. (in my case it was just "dir /s c:\" output) With smaller file it sometime work as expected.

    test.rexx
    ------------
    /* -- run this -- */
    ADDRESS SYSTEM regina stdintest.rexx with INPUT STREAM "testfile.txt"

    i = 0
    DO UNTIL CHARS("testfile.txt") = 0
    i = i + 1 ; teststem.i = LINEIN("testfile.txt")
    end
    teststem.0 = i
    ADDRESS SYSTEM regina stdintest.rexx WITH INPUT STEM teststem.

    ------------

    stdintest.rexx
    ------------
    /* -- called by test.rexx -- */
    DO i=1 UNTIL LINES()==0
    PARSE LINEIN line
    IF line\="" THEN SAY line
    END
    -------------

    Output from both "addess system" calls shows only first ~4k of input text. input after first ~4k is lost.

    OS used: Windows XP SP2

    This problem is new in regina 3.4 - there is no such problems in ver 3.3

    Uldis

     
  • cniggeler

    cniggeler - 2008-02-08

    Logged In: YES
    user_id=1774519
    Originator: YES

    Thanks to Uldis for the test case. I have modified them somewhat and then tried the modified versions on both 3.3 and 3.4. The program works 100% of the time using 3.3, and ***errors*** 100% of the time on 3.4:

    --- Modified test.rexx ---
    myfile="foo.txt"
    'regina -v'
    'rexx -v'
    pause

    ADDRESS SYSTEM "rexx stdintest.rexx" with INPUT STREAM myfile
    call close(myfile)
    pause

    teststem. = "<NIL>"
    address system "type "myfile with output stem teststem.
    DO i=1 while teststem.i <> "<NIL>"
    say i teststem.i
    end
    pause

    teststem.0 = i-1
    ADDRESS SYSTEM "rexx stdintest.rexx" WITH INPUT STEM teststem.

    --- Modified stdintest.rexx ---
    /* -- called by test.rexx -- */
    DO i=1 while LINES()
    PARSE LINEIN line
    SAY i"..."line
    END

    For "myfile", the test file I used has 1667 lines, 74,253 characters. All three outputs are correct using Rexx 3.3.

    Using Rexx 3.4 only the middle output is correct. The two printouts from stdintest.rexx (the top and bottom printouts of test.rexx) always end in the middle of line 1657, the magic character count being 73,728.

     
  • Mark Hessling

    Mark Hessling - 2012-10-14
    • labels: --> Interpreter
    • assigned_to: nobody --> rexx
    • status: open --> pending-duplicate
     
  • Mark Hessling

    Mark Hessling - 2012-10-14

    Duplicate of 3400513 which will have a solution in v3.7

     
  • Mark Hessling

    Mark Hessling - 2012-10-16
    • status: pending-duplicate --> closed-duplicate
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks