codefori / vscode-rpgle

RPGLE language tools for VS Code
MIT License
39 stars 18 forks source link

Problems after update 2023-11-11 #278

Closed SpiderEkb closed 9 months ago

SpiderEkb commented 10 months ago

Today the extension asked for an update. Lots of errors after update.

`s [Error]: Unhandled method memberResolve at c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\server.js:1:51163 at c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\server.js:1:51457 at Immediate. (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\server.js:1:51819) at process.processImmediate (node:internal/timers:476:21) { code: -32601, data: undefined }

Node.js v18.15.0 [Error - 10:08:36 AM] Connection to server got closed. Server will not be restarted. [Error - 10:08:36 AM] Request textDocument/documentSymbol failed. Error: Connection got disposed. at Object.dispose (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:57991) at Object.dispose (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:138077) at T.handleConnectionClosed (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:138290) at T.handleConnectionClosed (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:198643) at t (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:136379) at r.invoke (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:59604) at o.fire (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:60365) at Y (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:47249) at r.invoke (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:59604) at o.fire (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:60365) at d.fireClose (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:68246) at ChildProcess. (c:\Users\victo.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\extension.js:1:79207) at ChildProcess.emit (node:events:525:35) at maybeClose (node:internal/child_process:1091:16) at ChildProcess._handle.onexit (node:internal/child_process:302:5)`

The RPGLE language client server crashed 5 times in the last 3 minutes. The server will not be restarted.

This is just the end of a very long list. As a result, outline view (and possibly something else) doesn't work.

After launching VSCode outline view appears. After a second or two, a bunch of errors from RPGLE pop up and the outline view stops working. Rolling back to a previous version of the extension does not help...

VSCode Info:

Version: 1.84.2 (user setup) Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e Date: 2023-11-09T10:51:52.184Z Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045

worksofliam commented 10 months ago

Any chance you can share which version of vscode-rpgle this is and perhaps some source code if it was happening on a small file?

SpiderEkb commented 10 months ago

vscode-rpgle version 0.23.0 - the latest one.

It's hard to say on which specific file it breaks. I’ll add that VSCode works without connecting to an AS/400 server, in offline mode - perhaps the problem is that it is trying to parse some copy sources to which there is no access? Just in case, I have attached the full output in the Output window

output.zip

SpiderEkb commented 9 months ago

I discovered that my issue is completely similar to The RPGLE language client server crashed 5 times in the last 3 minutes. The server will not be restarted (unfortunately, when I opened it, it was not in the list). The situation is the same as JonFP: "Haven't experienced this myself but had some weird things happen when working with a source that includes a /Copy or /Include and I have no IBM I connection active. I notice that this appears to match the situation described by the OP. " And, as in the case of JDubbTX: v0.20.2 was the last working version of the extension for me.

worksofliam commented 9 months ago

Some interesting points from the log.

Not a clue as to why these files are being reporting with spaces in them. Looks totally odd:

Validating file from server: member:/EQCPYLESRC/PLPVD_C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Call%20%20%20plist%20prompt/validate%20driver%20PLPVD%20%20EQMAIN.rpgleinc

This looks to be an issue deep in the code which I will look into today:

TypeError: Cannot read properties of undefined (reading 'keywords')
    at N.getDocs (c:\Users\victo\.vscode\extensions\halcyontechltd.vscode-rpgle-0.23.0\out\server.js:1:220229)
worksofliam commented 9 months ago

@SpiderEkb I think I've found the issue but I'd love to see the contents of EQCPYLESRC/PLPVD_C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Call%20%20%20plist%20prompt/validate%20driver%20PLPVD%20%20EQMAIN.rpgleinc so I can verify it.

Do you know what that path is?

SpiderEkb commented 9 months ago

These are some very old copysources Includes like this:

    // Parameter lists
    /COPY EQCPYLESRC,PLRECV_B                  PLIST for recovery&external inp

    /COPY EQCPYLESRC,PLUPT_SB                  Call   plist update program ESF

    /COPY EQCPYLESRC,PLMSG                     Plist for calling message sever

    /COPY EQCPYLESRC,PLPVD_C                   Call   plist prompt&validate dr

    /COPY EQCPYLESRC,PLM14                     Plist for sending messages to p

PLPVD_C.zip

worksofliam commented 9 months ago

I release 0.24.0 which hopefully resolves a majority of the issues you were having. Thank you!

SpiderEkb commented 9 months ago

@worksofliam great thanks! Everything seems to be working!