Repeatable crash with python script

Hi all,

I have been experiencing consistent crashes with a certain number of Python scripts running on Mac Rhino, they would cause Rhino to crash as soon as I hit run. I have been able to narrow it down to one particular rhinoscript method, although it’s possible there may be more. It’s also possible that this is related to a certain number of rhino-python incompatibilities caused by the update to ironpython 2.7.10 that came with the latest update to Mac OS 10.10.5… One of these crashes also froze the entire system upon trying to restart Rhino… (I know Marlin will say this is not possible, but it did indeed happen). Note these crashes are also happening with the latest Mac Rhino WIP.

Here’s the script:

import rhinoscriptsyntax as rs
print "Hello World"
#folder=rs.BrowseForFolder(rs.WorkingFolder(),"Browse for folder","Dialog title")

Run the script as is first (with the last line commented out). Here it runs fine. Then uncomment the last line and run it again. Here instant crash in both 5.0.2 and WIP.

Anyone else interested in testing? @dan, @Alain, @marlin

Interesting side note: when the release version crashes, I get the message below when trying to re-open:

Except the version I have installed is the latest release version (5A865), and even downloading and re-installing via the links doesn’t change anything… The WIP I have is also the latest - 5B125w.

Thanks,
–Mitch

crashes me too.

i get the same message as well and am using the same versions as you. 5A865 & 5B125w

I’m looking into this …

Thanks! I didn’t check, but it occurred to me this morning that it might also be rs.WorkingFolder() - nested inside BrowseForFolder() that is causing the problem. --Mitch

Edit: it seems that neither method by itself causes the crash, but the nested combination does…

rs.WorkingFolder returns an empty string but that’s not what’s causing the crash but a bug with the Description property of the FolderBrowserDialog in mono. I fixed it locally but for now you should be able to get it to work by not passing a description:

folder=rs.BrowseForFolder("")

No public access to that one… Looks like all of the Rhino.ApplicationSettings.FileSettings…Folder methods all return an empty string.

If I understood correctly, do not pass anything to rs.BrowseForFolder. It looks like it’s the message argument in BrowseForFolder that is actually crashing it… OK.

Too bad that WorkingFolder() isn’t working (pun intended) either… Two bugs with one stone! :bug: :bug: :punch:

you can pass any valid path.

I’ll look that as well. Thanks.

:bug: :bug: :punch: :slight_smile: