Grasshopper - 2.0 connector error

Tried a reboot and gettign the error consistently on every startup.
There is no speckle toolbar in rhino nor in Grasshopper.
First install of speckle worked for me. upon updating rhino and speckle it stopped working.

This is my components folder in gh.

1 Like

Just did a remove and install on rhino and grasshopper connectors for speckle.
rhino works just fine.
grasshopper same error.

Rhino 6 works just fine, both in gh and in rhino.
its rhino 7 with latest update that doesnt work.

1 Like

Dang. We’ll look into this… Probably a minor case of dependency hell that we’re in at the moment.

3 Likes

Currently, it’s being tracked here: Gh Bug: error initializing connector · Issue #414 · specklesystems/speckle-sharp · GitHub

@Ionut_Anton if you’r bored this weekend, maybe you could zip your components folder and send it to us, that’ll help us try to replicate it!

3 Likes

I got the error again, this time only a reboot of Rhino solved it. Yesterday I didn’t got the error but as far as I know nothing changed.

It appears to be quite random, which was also the case in the topic below. Let me know if it would be useful to run practically the same script with and without the error. I could run the script like this:

A = AppDomain.CurrentDomain.GetAssemblies().Select(o => o.FullName).ToList();

Link to the other topic:

Hey @JdB_RHDHV, sorry you’re also experiencing this… That may be useful, although it may be quite a long list!! :sweat_smile: I think this may be caused by Grasshopper choosing the order in which it loads the components.

Are you getting the error consistently? If so, can you try modifying the Load Mechanism for Speckle2 in the Grasshopper Settings, and set it to Disk? (See pic)

1 Like

Hi Alan, thank you I’ve changed the setting. I’ll let you know if I get the error again.

As a test I’ve been closing and reopening Rhino and GH today (instead of just leaving it on when I don’t need it). Sometimes I get the error, sometimes I don’t. It appears to be quite random.

Since it might be useful, I’ve listed the differences between lists of assemblies. “Txt_working” and “Txt_working_2” contain a list when Speckle 2.0 is working fine (the list differs after a restart of Rhino and GH) and “Txt_error” is the list of assemblies when I get the error. If you’d like me to post the whole lists let me know.

Hopefully this information is a bit clear (and useful). If not, please let me know and I’ll try to clarify.

3 Likes

wow! many thanks for this @JdB. I’m going to look into it but I’m unable to reproduce it… From the lists you sent us nothing really stands out :thinking:

how big is your Grasshopper Libraries folder? Could you share a screenshot of what’s installed?

Is it viable to zip it and send it to us? You can send me a link privately if you prefer :wink:

That way we can be sure we have 100% the same dlls and maybe get it to reproduce in my computer.

On a similar approach, if you remove ALL the components in the folder except the Speckle2, do you still get the error? (just drag them to a temporary folder so you can set them back as they were)

Sorry for the many questions/requests :angel:

Hi @JdB and @Ionut_Anton. Thanks again for reporting this and helping us fix it, I’ve been hacking around trying to find a solution, but since I cannot reproduce it locally, I’m not sure it actually addresses the underlying problem. So this is what I came up with:

In order to know if these changes fix the issue, I added the fix to the Object Management nodes only, and published a new beta version of the GH connector (2.1.4-beta). You should already see it in your Manager.

So, in theory, if the fix works, you should be getting all the Object Management nodes properly loaded without any issues. And probably the following ones should still throw an error:

  • Send/Receive
  • Send local/ Receive Local
  • Convert ToNative
  • Convert ToSpeckle

This way, we can still detect when the issue occurs and, when it does, if the fix I added actually works in that case.

Let me know if you can reproduce the error with the new version and if everything works as expected I’ll apply the patch to everything else.

3 Likes

Hi there.
Just updated the beta speckle connector for grasshopper and it works just fine. all of it, including send/receive. didint get any errors.
Also i can confirm that the error i am getting is due to latest rhino update.
tried today on a second computer to install speckle. all worked, both rhino and grasshopper. updated rhino to latest version and speckle for grasshopper stopped working. updated speckle for grasshopper to its beta version and it started working again.

Cheers for all the effort put into it!

2 Likes

Great idea!

I’ve installed the beta client and after a bunch of restarts of Rhino I got the error and the result is here below. So most object management things are in there (only the Create Schema Object is missing). And, as you expected, the send/receive is missing so I think this could be it!
image

Full error export:

Object: ToNativeConverterAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ToNativeConverterAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ToSpeckleConverterAsync (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ToSpeckleConverterAsync (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: GetObjectValueByKey (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: GetObjectValueByKey (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ExtendSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ExtendSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ExpandSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ExpandSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: CreateSpeckleObjectByKeyValue (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CreateSpeckleObjectByKeyValue (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: SendComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: SendComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ReceiveComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ReceiveComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: SendLocalComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: SendLocalComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: ReceiveLocalComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: ReceiveLocalComponent (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: CreateSpeckleObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CreateSpeckleObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Object: CreateSchemaObject (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CreateSchemaObject (level 2)
{
  Object reference not set to an instance of an object.
  NullReferenceException
}

Wooohoo!!! :partying_face: seems like we’re getting somewhere… thanks both!

Although, it seems my fix only addresses the issue partially. I was expecting the Object Management nodes to not throw an exception at all and load properly; but it seems like they are able to load now while still throwing the exception :thinking: @JdB, do the CreateSpeckleObject and ExpandSpeckleObject nodes work properly even when you get the error?

This may indicate that the null reference is somewhere else…

1 Like

I just released 2.1.5-beta, which contains some minor fixes that (i hope) will allow the Object Management nodes to load properly and without any exceptions thrown.

It should still throw the error on the other nodes mentioned (including Schema Builder). If you guys could confirm this works properly, I can get the fix for all the nodes released today :smiley:

1 Like

I’ve installed 2.1.5 (I didn’t update the manager to 2.0.25, I kept it on 2.0.22). After a bunch of Rhino reboots I got the error again.

You are right about the not working CreateSpeckleObject and ExpandSpeckleObject nodes. Even all GH nodes (tried all Speckle 2.0 nodes and several standard GH ones, like point, panel, etc.) throw this Grasshopper breakpoint error when I place one on the canvas.

If you find it helpful, we could have a 1on1 call about it next week.

image

image

Oh dear…did I make it worse? :sweat: it looks like I only managed to defer the problem to a later point in the program. I actually just moved some logic from the startup to when it’s added on a document.

The fact that other nodes throw errors when placed in the canvas is super weird… That shouldn’t really affect other nodes at all :man_shrugging: I’m confused… I’ll keep digging at it but it that 1on1 would definitely be helpful just to see it happening live.

Anyway, I can see you still get the “loading errors” on startup for all the Object management nodes, so something else is going on here too…

I’ll keep posting here my findings (or lack thereof).

1 Like

Hi there @JdB and @Ionut_Anton!

Just bugging you guys again to keep you updated with the progress of this. I just published version 2.1.6-beta of the Grasshopper connector which partially fixes the issue (for the third time…) except for the nodes shown below:

Screenshot 2021-04-13 at 13.55.26

Could you install the latest version and check 2 things?

  1. If the errors you get when it happens are the same as the screenshot above. If anything differs could you let me know which?
  2. Once the document is loaded, you should be able to instantiate new ObjectManagement nodes but I am uncertain if they will work. Could you confirm if they work? If not, what’s the error you get?

Thanks for the patience! :smiley: Hopefully this will do the trick and we can finally get it behind us :slight_smile:

1 Like
  1. Noìce, I got these loading errors, which appears to be the same as yours!
    image

  2. These are the available ObjectManagement nodes and they give the same error as yesterday.

PS: this is also a very nice feature in the Speckle Manager!
image

3 Likes

Great! Thanks for testing it.

So it appears I also need to do some minor fixes on the KitManager to prevent it from happening. I’ll ping you back here once it’s published and hopefully you’ll never see this error again :crossed_fingers: :crossed_fingers:

2 Likes

Version 2.1.7-beta of the Grasshopper connector should go live any minute now. My expectation is that it should go back to working 100% of the time, but I still have a doubt on the KitManager fix I just pushed to wrap things up.

Please, let me know if you have any issues with that, such as No default kit was found in this machine or any other error.

I won’t celebrate until you guys can confirm you no longer experience this :crossed_fingers:

1 Like