ScriptEditor Search/Help text box flicker and crashes Rhino

For the last month or so I’ve been having problems with the ScriptEditor, both on its own and in the Grasshopper context. Whenever I open the Search & Replace panel, the window starts flashing and then when I input text, the program freezes (without crashing entirely.) I’ve tried a fresh install and deleting all Rhino-related folders, but it I can’t manage to find a way to solve this. Would love to hear any ideas of what to try next.


ScriptEditor_freak_out

This is so weird. Okay let me look into it. I filed the ticket here and will get it fixed ASAP:

RH-83470 Script editor search prompt is constantly resizing

Which Rhino version are you using btw?

The latest service release candidate, although like I said, I’ve tried uninstalling and reinstalling older versions, to no avail. But if it helps track things down, I do remember it starting directly after an update (probably to service release candidate) about a month ago, although I don’t remember exactly which version.

I appreciate your help on this, Ehsan. I absolutely love the new scripting possibilities with Rhino 8. The ability to write real Python and install libraries and dependencies on the fly is a game changer, especially when it comes to distributing new tools to a larger team. I’ve tried most things I can think of and just want to get back up and running.

Thanks!

1 Like

I’m just checking if there’s any update on this. The issue tracker doesn’t seem to be working.

For the time being I’m using a different text editor, but I miss the integrated one. It’s so handy!

Hi @Nicholas_Desbiens . I am working on a fix. I can replicate this on my machine but one of my colleagues can and I’ll figure out why.

Thanks for the update, @eirannejad!

@eirannejad Just a little update on my end. Not sure why I didn’t think of this earlier, but I just updated to the latest .NET and since then, the script editor in Rhino seems to be working as expected. Fingers crossed! :crossed_fingers:

1 Like

Hmmm…Any changes to your screen configuration? I am still trying different ways of getting to replicate and fix this. I have already sent multiple builds to my colleague @scottd who has this problem on this machine (laptop with high-dpi screen).

I keep working on it but good to know that it started behaving fo you after the .net update

You’re right! I had plugged in a second monitor around the time I made the .NET update. It’s seeming more likely the change had something to do with that, because when I unplug the monitor, the weird resizing behavior comes back.

1 Like

Ok that makes more sense. This is a dpi issue with WPF and the wrapper Eto framework that Rhino is using. Somehow on your display it triggers a continuous resizing of the ui control. I have not been able to replicate this yet even after numerous attempts with different monitor and dpi configurations. I will keep working on it.

One other, possibly related thing I just thought of. When ever I use the Search box in the script editor, I have to be very careful to delete the results from the box before I got back to add or remove text from the main text window, otherwise everything gets incredibly slow. I’m guessing the search is constantly being executed. Also, I have to make sure to take focus away from the Search box while I’m actively coding. It was a small nuisance that I learned to live with, but now that I think of it, I’m guessing it might be related to this other issue we’ve been discussing.

Yeah we made some improvements related to this ‘focus stealing’ behaviour (RH-82513), but the search results keep updating when you type in the editor (it waits for a few milliseconds and then refreshes the results). If this feels like it is slowing down your typing I can add an option to toggle this behaviour.

Hello @eirannejad, the Script Editor crashes (locking Rhino completely) whenever I click the Search or Help tabs. I am running Rhino 8 SR10 on Windows 11 and have updated to the last .NET update. The behaviour appears whether I’m on my main screen or the second screen.

I need to force-close and restart Rhino every time this happens. Sometimes, before crashing I experience the same “flashes” described by Nicholas.

2 Likes

Ok thanks for letting me know. I have made some changes and we are testing this internally right now. Will keep you posted

1 Like

@ale2x72 I put a fix for this in 8.12 SRC if you don’t mind testing

1 Like

For what it’s worth, I’ve been testing it for the past few days and the editor no longer freezes!

It can still be somewhat laggy when entering text into the search when the script is long. I don’t know much about UI stuff, but maybe it would be better if the user had to press enter to begin the search.

Anyway, that’s very minor and I’m so happy not to be pasting code into another window to search. Productivity is way up. The ScriptEditor in Rhino 8 is so good!

1 Like

Ok good to know. Thanks for the feedback. I think right now the search box waits for 200ms or so to update the search results tree

@eirannejad One minor issue that’s somewhat related. When using the search and replace functionality, the action doesn’t seem to enter the undo list. It’s minor, but not great if you’ve accidentally just replaced 100 strings.

You mean undo list in the editor? or in Rhino? It should register an action in the editor undo stack :thinking: