DKUI - Rhino 8 Python 3 crashing Rhino/GH with solver locked

OK - this is a strange but slightly slightly ongoing problem that one of my DKUI users is having.

SOME DKUI components - which are all built in GH Python3 and compiled with the Script Editor - have not worked on his machine or sometimes work on his machine. The errors codes are not much help and I’ve not been able to replicate the issue at ALL on my own machine.

The component error looks like this:

Which I’ve not had much luck in figuring out what this means:

That component uses these libraries:

import urllib.parse
import rhinoscriptsyntax as rs
import scriptcontext as sc
import ghpythonlib.components as ghlib
import Grasshopper as gh

So apart from urllib.parse nothing that is not shipped with Rhino.

TODAY, the user rang to say that DKUI is now crashing is Rhino when he opens his GH code - even with the solver turned off??!!

With DKUI uninstalled he can open his GH file, but of course all the DKUI components are missing.

I did a tiny update to DKUI yesterday, in a component he is not using, but now even going back to the older DKUI version, Rhino crashes on opening his GH file.

Another strange symptom - his Rhino now has too many Script menus:

sysinfo file from his machine is attached.

I’m at a loss as to what in particular with his setup is causing this strange set of errors.

systemfile Rhino.txt (3.0 KB)

To safely get something from a dictionary it is best to use .get:

mydict = dict()
data = mydict.get('the_one_key', None)
if data is not None:
    # do smart things
    pass

Instead of defaulting to None you could of course return something more useable that might negate the need for an if.

@jesterking

Thing is - I’m not doing any Dict access in my code.

I’ll send you the source for that component in a DM.

Cheers

DK

More symptoms:

I’m really feeling that he has a major issue with his Rhino install - and DKUI is just highlighting it.

Cheers

DK

And once they have their Rhino running again have them disable the two third_party plugins.

1 Like

Fresh install of Rhino 8.25 is on his machine, no 3rd party rhino plugins, loaded GH plugins one by one, DKUI loaded OK with no crashes.

Then this:

Which is strange as it should be built in.

However he is now open with out a crash - I’ll send updates as I get them.

Cheers

DK

OK - he seems to have tracked the problem down to being an in-compatibility with the Swordfish plugin.

For now he is removing Swordfish and will contact them for further support.

Cheers

DK

OK - spoke too soon - nope, still crashing with DKUI installed and the solver disabled.

THAT MAKES ZERO SENSE - as DKUI can’t run with the solver off.

Its not making any crash reports either - just a hard stop.

Any ideas anyone?

Cheers

DK

OK, I have an example file from the user that is showing the issue on my Windows machine.

ie Open the GH file with the solver locked and Rhino/GH closes after about 5 secs with no error dialogue.

Interestingly I can open the file on my Intel MacOS machine without issue.

Ive PM’d the file to @jesterking but if any other McNeel dev would like to have a look please DM me.

I spent a big part of today trying to isolate the issue, but removing pretty much ANY part of the file has it opening fine, it just seems to this total size/connection that crash.

Cheers

DK

Just bumping this back up - any McNeel dev able to open the GH file in there debugger for me today? I would just like a heads up on where to look for this issue.

Cheers

DK

Bumping this back up, client is firmly of the opinion that the issue is in DKUI, but without tools ‘above my pay grade’ I cannot isolate the issue.

In my last back and forth with the client he advised:

“I had to re-install python3.12 as Cursor didn’t accept the python interpreter that came with grasshopper”

That does not sound right to me?

@nathanletwory
@scottd
@dale
@Gijs
@eirannejad

2511028_2 YS_HullFairing rig only.gh (1.3 MB)

Can the client post here directly?

Did he try a Rhino repair?

Hi @Gijs

That file in the above post is from him - it s a “cut down” file that shows the symptom.

It was the first thing he could provide me that would crash my Rhino/GH on opening with the solver locked - on windows only, MacOS does not show the issue.

@cerfdude is the client - he might be able to supply more info.

Cheers

DK

more background here:

Cheers

DK

If I open the file you posted above, I get a warning of missing plugins, but after that the file opens without issues (as in: no crashing) in both Rhino 8 and 9

Hi @Gijs

Thank you for this progress.

You are correct, without DKUI installed this file opens ok.

The problem is with DKUI installed it crashes. And this has become my problem to fix. However I suspect it is interaction with the AI coded python components in this file, as I have no other similar reports from my other 2000 DKUI users.

Could you install DKUI and test again for us?

Thanks

DK

with DKUI installed Rhino crashes. It will take me some time to analyze this further.

I will first test if this crashes in an earlier version of Rhino 8.

1 Like

this is interesting, in 8.21 it opens fine, but I get this unrecognized object message:

1 Like

@Gijs thank you so much for helping here, I look forward to finding out more about the issue and maybe being able to fix it.

Cheers

DK

Still digging. 8.24 also opens it fine, same warning as above as expected