AutoLisp - Bug Report

Hello all,

I have encountered a strange bug while coding today. I was stepping through some code by typing it into the Command Window when I encountered this bug. In short, I'm comparing a string from a list with a string variable. However, once I run the comparison, the pointer in the list variable to the string gets corrupted, and starts moving. After some testing (see Test 03 below), if a variable is set to the corrupted location, the original value is given to the variable.

Setup

(progn
    ;; Initializing variables
    (setq sStatus "Completed")
    (setq sFile "C:\\\\DUP\\\\NONAME_ATTRIBUTE BUILD TEMPLATE2.txt")
    (setq lDocuments (list
        "C:\\\\DUP\\\\NONAME_ATTRIBUTE BUILD TEMPLATE2.txt"
        "C:\\\\DUP\\\\1234 Green Bay Packaging - Pinecrest Division Plumerville, AR\\\\1234-01 CDK Control System with GSB for Interfor Eatonton & Thomaston Georgia\\\\Drawings\\\\1234-01-DL-0001.txt"
        "C:\\\\DUP\\\\1234 Green Bay Packaging - Pinecrest Division Plumerville, AR\\\\1234-01 CDK Control System with GSB for Interfor Eatonton & Thomaston Georgia\\\\Drawings\\\\1116-07-PL-0001.txt"
    ));setq<-list
    (setq fcnLambda01 (function (lambda (sEntry)(cons sEntry "Starting process"))))
    (setq fcnLambda02 (function (lambda (lEntry)(if (= (car lEntry) sFile)(cons sFile sStatus) lEntry))))
    
    ;; Functions
    (setq lLines (mapcar 'fcnLambda01 lDocuments))
    
    ;; Blank Space
    (princ "\\n \\n")

    ;; Value checks - Pre error
    (prin1 (assoc sFile lLines))(terpri)
    (prin1 (cdr (assoc sFile lLines)))(terpri)
    (princ)
)

Error Occurance

Note: This line of code itself returns the expected value, but it affects the "lLines" variable. I have not tested this issue with other comparison functions.

(/= sStatus (cdr (assoc sFile lLines)))

Corrupted Results

I have had some consistancy issues in generating the problem visually, but once the comparison occurs, trying to modify the list variable or repeating the comparison will cause DraftSight to crash. Trying to set a variable to the corrupted pointer returns the original value as seen in Test 03.

Test 01:

Command: (/= sStatus (cdr (assoc sFile lLines))) 
T
Command : (assoc sFile lLines)
("C:\\\\DUP\\\\NONAME_ATTRIBUTE BUILD TEMPLATE2.txt" . "跱翼")
Command : (assoc sFile lLines)
("C:\\\\DUP\\\\NONAME_ATTRIBUTE BUILD TEMPLATE2.txt" . "")
Command: (assoc sFile lLines)
("C:\\\\DUP\\\\NONAME_ATTRIBUTE BUILD TEMPLATE2.txt" . "\\001")
Command: (assoc sFile lLines)
("C:\\\\DUP\\\\NONAME_ATTRIBUTE BUILD TEMPLATE2.txt" . "\\001")
Command: (assoc sFile lLines)
("C:\\\\DUP\\\\NONAME_ATTRIBUTE BUILD TEMPLATE2.txt" . "\\001")
Command: (assoc sFile lLines)
("C:\\\\DUP\\\\NONAME_ATTRIBUTE BUILD TEMPLATE2.txt" . "鎰翼")
Command: (assoc sFile lLines)
("C:\\\\DUP\\\\NONAME_ATTRIBUTE BUILD TEMPLATE2.txt" . "鎰翼")
Command: (assoc sFile lLines)
("C:\\\\DUP\\\\NONAME_ATTRIBUTE BUILD TEMPLATE2.txt" . "鎰翼")

Test 02:

Command: (/= sStatus (cdr (assoc sFile lLines)))
T
Command: (cdar lLines)
"崈ﻫ翼"
Command: (cdar lLines)
"崈ﻫ翼"
Command: (cdar lLines)
"\\001"
Command: (cdar lLines)
"穠Ȉ"
Command: (cdar lLines)
"\\001"
Command: (cdar lLines)
""
Command: (cdar lLines)
"陀Ȉ"
Command: (cdar lLines)
"ᏐȈ"
Command: (cdar lLines)
""
Command: (cdar lLines)
""
Command: (cdar lLines)
""
Command: (cdar lLines)
""
Command: (cdar lLines)
""
Command: (cdar lLines)
"" 
...
[Repeating]

Test03:

Command: (/= sStatus (cdr (assoc sFile lLines)))
T
Command: (cdr (assoc sFile lLines))
""
Command: (cdr (assoc sFile lLines))
"\\001"
Command: (cdr (assoc sFile lLines))
"鎰翼"
Command: (cdr (assoc sFile lLines))
"鎰翼"
Command: (cdr (assoc sFile lLines))
"鎰翼"
Command: (cdr (assoc sFile lLines))
"鎰翼"
...
[Repeating - Now testing other variables]
...
Command: (cdr (assoc sFile lLines))
"鎰翼"
Command: (setq sTest (cdr (assoc sFile lLines)))
"Starting process"
Command: (setq sTest (cdr (assoc sFile lLines)))
"Starting process"
Command: (cdr (assoc sFile lLines))
"鎰翼"

Command: (prin1 lLines)(princ)
(("C:\\\\DUP\\\\NONAME_ATTRIBUTE BUILD TEMPLATE2.txt" . "鎰翼") ("C:\\\\DUP\\\\1234 Green Bay Packaging - Pinecrest Division Plumerville, AR\\\\1234-01 CDK Control System with GSB for Interfor Eatonton & Thomaston Georgia\\\\Drawings\\\\1234-01-DL-0001.txt" . "Starting process") ("C:\\\\DUP\\\\1234 Green Bay Packaging - Pinecrest Division Plumerville, AR\\\\1234-01 CDK Control System with GSB for Interfor Eatonton & Thomaston Georgia\\\\Drawings\\\\1116-07-PL-0001.txt" . "Starting process"))

Command: (prin1 sTest)(princ)
"Starting process"

I hope this information is helpful and informative.