RhinoDotNetCrash.txt appears randomly

This is an issue that’s been happening for a while, and it’s not just an isolated case. For some reason, while using Rhino, this file gets dropped on the desktop. I would expect to see something like this if there was a crash, but it’s not related to a crash as Rhino seldom crashes, but these file show up almost daily. I think we’ve all learned to live with it, but I’ve had a few people ask me why, and I can’t answer them.


Here is the file:

RhinoDotNetCrash.txt (4.1 KB)

FYI…We are up-to-date with service releases.



Hi Dan - here too, sometimes - I have not seen this in a while but there was a rash of these some time ago, it went away, and again once in a while recently. I was about to log a bug but it ceased again. - I am not sure it was ever fully diagnosed - @brian will have a better idea.


This specific report looks like the result of a custom python script with some user interface. Does this show up when running some custom python scripts?

I have a few scripts using ETO for the UI. I will see if I can find one (or more) that trigger the creation of this file.



Hi @stevebaer,

I figured out what is causing this error log to be generated. It happens when you cancel a script created with a UI using ETO just after opening a new session of Rhino. Take a look:

Here is a simple script you can test with:

Tester.py (2.5 KB)
It’s important to follow these steps:

1. Open a new session of Rhino.
2. Open a script that uses ETO
3. Close it using the cancel button before doing anything else.

I can repeat the generation of the error log 100% of the time, if I use the cancel button immediately after opening a new Rhino session. If I use the script, then come back to it and cancel the error log doesn’t appear.

FYI… this happens in Rhino 7 too.



Hi @stevebaer, @pascal

Not sure if you saw this yet. I did find the cause of these error logs.



Hi Dan - thanks for the bump and the py file- I 'll test.
Yep - I see that. Hopefully that will give the developers enough to go on to find the underlying cause. (I see this from time to time but with no discernable - to me - connection to a py script… )

RH-61615 DotNet crash file


Hey @DanBayn,

This is happening because you are using exit(), which its implementation throws an exception (ExitScriptException). All uncaught exceptions are logged to the RhinoDotNetCrash.txt file. That being said, this particular exception probably should be caught by Rhino as it appears to be a normal thing to do in python scripts. @Alain might know more about that.

In the meantime, you could gracefully exit your script if the user clicks cancel. Usually you’d do this by using the return value of the Dialog.ShowModal() method, like so:

def Tester():
    dialog = testForm();
    rc = dialog.ShowModal(Rhino.UI.RhinoEtoApp.MainWindow)
    # Only do this if the user clicked on OK.
    if rc:
		something = dialog.GetRadioButton1()
		if something is None: return
		selection = dialog.GetRadioButton2()
		if selection is None: return

You’ll also have to change your OnCloseButtonClick handler to return the false value vs. true:

    def OnCloseButtonClick(self, sender, e):
        # use Close(False) to signify the user cancelled

Hi @curtisw,

Okay, I understand. Should be a quick fix on my end.