Script editor major bug

Hi,

I’m loosing code from time to time and have to go in my backups to retrieve it. When I have one.
Scenario:
I’m editing code and I get something like Wrong indentation or Compile error (with no line number).
I try to find the error and rearrange few lines to see if it is going to compile but it is getting worse.
I save my code, which look ok for me. I reload it and It is a mess around the lines I was editing.
It is like the editor is not showing the real content during modifications.

I can’t reproduce the bug. But it happened few times now.

I will use EditPythonScript until next release cause the new one is really scary.

Regards.

Hello- I have seen exactly this in the past but was unable to repeat it. I have not seen it in several weeks - can you please run SystemInfo in Rhino and copy/paste the results here?
-Pascal

Further observations:

Few lines have been swapped.
First char of several lines have been removes (indentation conversion related ?).
(I’ve struggled a lot lately with tab versus space indentation : issue RH-82525
Only the modified lines and next ones are altered.
Previous lines seems untouched.

systeminfo :

Rhino 8 SR9 2024-6-11 (Rhino 8, 8.9.24163.15301, Git hash:master @ 17c7f1c7c05ff0e0b5b12288d13a911b1f0767b4)
License type: Commercial, build 2024-06-11
License details: Cloud Zoo

Windows 11 (10.0.22631 SR0.0) or greater (Physical RAM: 16GB)
.NET 7.0.19

Computer platform: LAPTOP - Plugged in [100% battery remaining]

Non-hybrid graphics configuration.
Primary display and OpenGL: NVIDIA GeForce RTX 4060 Laptop GPU (NVidia) Memory: 8GB, Driver date: 4-11-2024 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 552.22
> Integrated accelerated graphics device with 4 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port
Primary OpenGL: NVIDIA GeForce RTX 4060 Laptop GPU (NVidia) Memory: 8GB, Driver date: 4-11-2024 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 552.22
> Integrated accelerated graphics device with 4 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port

Secondary graphics devices.
Intel(R) Iris(R) Xe Graphics (Intel) Memory: 128MB, Driver date: 5-12-2024 (M-D-Y).
> Integrated graphics device with 4 adapter port(s)
- There are no monitors attached to this device. Laptop lid is probably closed

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 2x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 4-11-2024
Driver Version: 31.0.15.5222
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 8188 MB

Rhino plugins that do not ship with Rhino
S:\Code\Rhino\plugins\CSCommandOnKey.rhp “CSCommandOnKey” 1.0.0.0
S:\Code\Rhino\plugins\SampleCsDockBar.rhp “SampleCsDockBar” 6.0.0.0

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp “Commands” 8.9.24163.15301
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 8\Plug-ins\RhinoBonusTools.rhp “Rhino Bonus Tools”
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 8.9.24163.15301
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 8.9.24163.15301
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp “MeshCommands” 8.9.24163.15301
C:\Program Files\Rhino 8\Plug-ins\IronPython\RhinoDLR_Python.rhp “IronPython” 8.9.24163.15301
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp “RhinoCycles” 8.9.24163.15301
C:\Program Files\Rhino 8\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 8.9.24163.15301
C:\Program Files\Rhino 8\Plug-ins\RhinoCode\RhinoCodePlugin.rhp “RhinoCodePlugin” 8.9.24163.15301
C:\Program Files\Rhino 8\Plug-ins\export_PDF.rhp “PDF Export” 8.9.24163.15301
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 8.9.24163.15301
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp “SectionTools”
C:\Program Files\Rhino 8\Plug-ins\RhinoRender.rhp “Legacy Rhino Render”

@lahos I am sorry for the frustration this caused. I am looking deeper at this now. It is probably a race condition somewhere in the code source update logic.

I’ll first try to replicate this and see if I can make it break consistently.

Any information about your scripts would help:

  • Running in Grasshopper or Rhino main editor?
  • How large are the scripts? a few hundred lines?

Hi,

Running in Grasshopper or Rhino main editor?
   Mainly Rhino. I use a lot grasshopper scripts but not lately.

How large are the scripts? a few hundred lines?
   ~3000-4000 lines each.

Regards

1 Like

Okay. I’ll make a long script like those and test. Thank you for reporting this

RH-82722 Text Patch is buggy in large scripts