Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Monaco editor line count gets out of sync with stored session lines #1356

@rikedyp

Description

@rikedyp

Describe the issue you are having

Sometimes I will be tracing functions and running expressions in the session, and the session suddenly become unresponsive even though I can still use the tracer.

Using F12 reveals an error in

    return [11, 14].includes(this.lines[line - 1].type);

In the current head (af56d94) this errors even at startup. I worked around this by changing to line - 2 for the time being (see rikedyp@af56d94#commitcomment-166867888), but the target seems to have moved. I was at one point where this.lines contained 1113 items, but line was at 1116. Somehow the Monaco Editor line counter isn't matching up with the number of stored lines.

Did you connect to an already running interpreter or start the interpreter from Ride?

Both

How do you reproduce the issue?

Except at start up, not sure yet, will try to reduce the repro.

Paste the contents of Help → About (Shift+F1)

IDE:
  Version: unknown
  Electron: 34.5.5
  Chrome: 132.0.6834.210
  Node: 20.19.1
  Platform: linux-x64
  Date: unknown
  Git commit: unknown
  Preferences:{
    "defaultConfig":"DCMS",
    "kbdLocale":"en_GB",
    "keys":"{\"FX\":[\"Ctrl+S\"],\"IT\":[\"Ctrl+T\"],\"VAL\":[\"Ctrl+Alt+Enter\"]}",
    "presetsCreated":"[\"/opt/mdyalog/20.0/64/unicode/mapl\",\"/opt/mdyalog/19.0/64/unicode/mapl\",\"/opt/mdyalog/18.2/64/unicode/mapl\"]",
    "selectedExe":"/opt/mdyalog/20.0/64/unicode/mapl",
    "zoom":"1"
  }

Interpreter:
  Version: 20.0.52544
  Platform: Linux-64
  Edition: Unicode/64
  Date: Sep 30 2025 at 02:02:55

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions