Jswan broken in Rhino 8 for MacOS - Newtonsoft.Json issue related?

Hi Guys,

Looking at porting my plugin to Rhino 8 on MacOS and have run into a bug I cannot see how to fix:

I’m getting these error with the Jswan Serialize from Keys and Values component, which is working fine under R7 on the same machine.

Is this related to the Newtonsoft.Json issue:

Cheers

DK

I logged this as RH-78820 Jswan broken in Rhino 8 for MacOS - Newtonsoft.Json issue related?

1 Like

@kiteboardshaper Based on the call stack, this seems to be an internal error in whichever library that contains the code for ColorTable.IsKnownNamedColor.

Is there a way you can share a small grasshopper definition that replicates the error? Jswan code is fairly simple so I have a hunch the incoming data might belong to another plugin and it fails in serialization

Thanks Ehsan, its 5:30am in Cape Town and I’m prepping to head to the beach to caddy for one of the rock star pro riders in this:

https://www.redbull.com/za-en/events/red-bull-king-of-the-air

(biggest event in my industry by FAR…)

I’ll be back in my office Wednesday and I’ll see what I can do to create the same issue in a smaller package.

I do some save some color info into the JSON file but they should just be text by the time they get to the JSwan component.

Also the same code running on the same machine in R7 does not show the error.

Talk Wednesday

Cheers

DK

1 Like

Sounds like a great event! Have a lot of fun and message when you are back.

Hi @eirannejad

HUGE day yesterday, our guy got to the 3 round before being beaten by one of our local favourites.

You note about colour made me go looking and yes, I was passing ‘color’ types into the Jswan component where I should have been sending ‘text’.

I solved the error with this simple fix of casting all my values to txt before hitting the Jswan component:

Funny that only R8 on MacOS has shown the error - with R7 Win, R7 MacOS and R8 Win not complaining.

I’m going to test just passing my colors around everywhere as txt and hope I dont run into type casting issues the ‘other’ way.

Cheers

DK

1 Like

Hopefully. Keep me posted and I would still love to get a GH definition that replicates the error :smiley:

Hi @eirannejad

Please find code sample attached.

Works perfectly as uploaded on:

Rhino 7 Windows
Rhino 8 Windows
Rhino 7 MacOS

On Rhino 8 MacOS it throws the error above and can be fixed adding the txt component between the second merge component and the Values input on the Jswan component.

Cheers

DK

231208_Jswan error sample for McNeel.gh (11.9 KB)