Autodesk-AutoCAD / AutoLispExt

Visual Studio Code Extension for AutoCAD® AutoLISP
https://marketplace.visualstudio.com/items?itemName=Autodesk.autolispext
Apache License 2.0
83 stars 29 forks source link

Access Violation in debugging when attempting to read a very long string #192

Open dmcdonoughwick opened 2 years ago

dmcdonoughwick commented 2 years ago

Describe the bug Attempting to step through reading a very long string and setting to a variable causes an "Access Violation" and the debugging stops. This currently does not happen in VLIDE.

To Reproduce Steps to reproduce the behavior:

  1. Point the "Crash.lsp" to where the "ReallyBigFile.txt" is located
  2. Start debugging "Crash.lsp" with a breakpoint on the "(setq ReallyLongString (read-line OpenFile))"
  3. Issue the command "CrashFunc" and AutoCAD will instantly generate an access violation error and quit debugging.

Expected behavior In VLIDE the process takes approximately 3 minutes to complete (on my system) but does not cause an access violation and continues debugging. If that's not possible a more descriptive error would be desirable as it was very difficult to narrow down.

Screenshots Snag_274c2f3

Desktop (please complete the following information):

Additional context

(defun c:CrashFunc ( / )
  (progn
    (setq FileName "C:\\Projects\\ReallyBigFile.txt")
    (setq OpenFile (open FileName "r"))
    (setq ReallyLongString (read-line OpenFile))    
    (close OpenFile)
    (princ "Test Complete")
  )
)

ReallyBigFile.zip

dmcdonoughwick commented 2 years ago

This may be related to JDSComm's comment in ticket #182

dmcdonoughwick commented 1 year ago

This is only one way to trigger this error. It happens so often that the debug is essentially useless to me and I still rely on VLIDE. I'd be happy to run any tests or send any log files that might be useful for this.

JDSComm commented 1 year ago

See the attached file. First to get VSCode working again perform the steps in "SOLUTION 2". Then, If this ever happens again, all you have to do is "SOLUTION 3" or "SOLUTION 3 Update".

Hope this works for you as well. I was about to give up on VSCode because of this but now I'm not having any issues with it.

VSCode - Unwind skipped on exception error if breakpoint in code.txt