Skip to main content
David Wolverton
Participating Frequently
Apr 13, 2023 8:24 AM UTC

Path Length Allowed in UD VOC

We had an unusual issue where it APPEARS Attb 2 of a DIR VOC type cannot exceed a certain length.

LIST / SELECT both work as expected.

However, AE using an Active SELECT list or just 'raw' would return "New Item" and anything Filed would issue a WRITE error (Status =1) with a 'check for triggers' message -- which cannot be true on UD DIR types.

After a while of not figuring out the issue, we moved the folder to make Attb2 of the VOC shorter and viola - the issue resolved.

Does anyone know the character count allowed in attribute 2 of a DIR VOC type?  And more weirdly, why is only AE was impacted?  We might have found the issue earlier if SELECT and LIST did not work either -- as it was, we were running down to see if there were some weird permissions issues - and was about 30 minutes in when we realized the path was much longer than usual do to where the folder had been nested.



------------------------------
David Wolverton
Independent
Sunset Programming Inc
Waltham MA US
------------------------------

    13 replies

    Participating Frequently
    Apr 14, 2023 11:52 AM UTC

    Thanks for this find Jonathan!   And really interesting this is just showing up after 20+ years!  The best bugs are well hidden!

    I will watch release notes with interest!!

    David W.



    ------------------------------
    David Wolverton
    Independent
    Sunset Programming Inc
    Waltham MA US
    ------------------------------

    Amazing the little critters skittering around where we (for some insane reason) never looked!
    Great find and great sleuthing to you both.



    ------------------------------
    Susan Joslyn
    MultiValue Dreamer
    SJ+ Systems Associaes, Inc.
    North Las Vegas, NV
    sjoslyn@sjplus.com
    ------------------------------
    Brian Paige
    Participating Frequently
    Apr 14, 2023 12:25 PM UTC

    @Susan Joslyn @David Wolverton  ... So I can confirm the problem is not limited to AE and I have managed to produce the problem outside of AE and it is a strange one and I will be raising a bug ticket for it.

    The description of the problem can be broken down to :-

    If a directory file variable exceeds the maximum item id length and that file variable is used in any UniBasic operation that requires a lock check to be done (so WRITEU, MATWRITEU and READ are not affected as no lock operation is required) the file variable will become truncated and then cannot be used a second time or may write to an incorrect location if the truncation still points to a location.

    In the case of AE , the READU of the record works correctly the first time but truncates the file variable and when it hits the WRITE statement it fails. I got lucky where the truncation happens on a "\\".  

    The following simple program shows the problem. After the debugger call at line 12, note the file variable has been truncated.


    001: OPEN "LONGDIRTEST" TO F.FILE ELSE STOP
    002: TD = TIMEDATE()
    003: R.FILE = TD
    004: DEBUG
    005: WRITEU R.FILE ON F.FILE,"JDS"
    006: DEBUG
    007: READ R.FILE FROM F.FILE,"JDS" ELSE NULL
    008: IF R.FILE = TD THEN CRT "SAME" ELSE CRT "DIFFERENT"
    009: DEBUG
    010: READU R.FILE FROM F.FILE,"JDS" ELSE NULL
    011: IF R.FILE = TD THEN CRT "SAME" ELSE CRT "DIFFERENT"
    012: DEBUG
    013: CRT "DONE"
    014: END

    :RUN BP TEST45
    ***DEBUGGER called at line 4 of program BP\\_TEST45
    !\\F.FILE
    an unidata file; filename = C:\\MASTER\\SOFTVERSION1\\SOFTVERSION2\\SOFTVERSION3\\SOF
    TVERSION4\\SOFTVERSION5\\SOFTVERSION6\\SOFTVERSION7\\SOFTVERSION8\\SOFTVERSION99999
    !G
    ***DEBUGGER called at line 6 of program BP\\_TEST45
    !\\F.FILE
    an unidata file; filename = C:\\MASTER\\SOFTVERSION1\\SOFTVERSION2\\SOFTVERSION3\\SOF
    TVERSION4\\SOFTVERSION5\\SOFTVERSION6\\SOFTVERSION7\\SOFTVERSION8\\SOFTVERSION99999
    !G
    SAME
    ***DEBUGGER called at line 9 of program BP\\_TEST45
    !\\F.FILE
    an unidata file; filename = C:\\MASTER\\SOFTVERSION1\\SOFTVERSION2\\SOFTVERSION3\\SOF
    TVERSION4\\SOFTVERSION5\\SOFTVERSION6\\SOFTVERSION7\\SOFTVERSION8\\SOFTVERSION99999
    !G
    DIFFERENT
    ***DEBUGGER called at line 12 of program BP\\_TEST45
    !\\F.FILE
    an unidata file; filename = C:\\MASTER\\SOFTVERSION1\\SOFTVERSION2\\SOFTVERSION3\\SOF
    TVERSION4\\SOFTVERSION5\\SOFTVERSION6\\SOFTVERSION7\\SOFTVERSION8\\SOFTVERSION99
    !G
    DONE
    :

    I am also going to see if this only applies to directory type files and the UniData bug I raise will cover that if required as well.



    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    Nice work!

    Does this happen in UniVerse too, or just UniData?

    Brian
    Jonathan Smith
    Rocketeer
    Apr 14, 2023 12:33 PM UTC
    Nice work!

    Does this happen in UniVerse too, or just UniData?

    Brian

    I haven't tested it in UniVerse



    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    Rocket Software - Senior Principal Technical Support Engineer - UniData ATS