Grasshopper canvas bug

Does anyone have a clue why this is happening and how to fix it?
My component is outputting a json text.

If I write click on the panel, I can copy data. Also if I zoom in and out on the canvas the components appear but the text is not showing inside the panel.



This also happens trying to add a new panel.


Never seen such a bug, but its suspicious that it happens in between plugin components with a custom data type passed around. Could you post your RH/GH version and the name of the plugin?

Hi Tom,

It’s custom plugin that we have developed internally. What it does under the hood is turning a custom object to json using Newtonsoft and custom converter. Then it just outputs the json as a text.

Update: The issue seems to have gone away atm. What I’ve done was I added [JsonIgnore] to some properties of the object being converted to json! not sure if that’s playing a role but it looks like it’s working now!

Note two things. If your plugin causes an exception, maybe because of unsupported implicit type conversion within text parameter component, you may cause this behaviour as an indirect consequence. Other than that, always be aware that if you pass custom types around, you might introduce problems because you are passing data as reference. You need to ensure that data is deeply copied in places required. Nested data, typical for json data, you might only copy shallow here. In any case, if something is failing, its more a symptom. A good way to debug this is using an debugger like DNSpy which is capable in decompiling all the code involved. You could set a breakpoint within the text parameter component and see why its causing this behaviour underneath.

Thanks for the tips but the component is running with no exception and it’s not passing any custom object with reference. It’s text in text out.

okay, then it might came from a failing conversion, delegating the error upstream. Maybe it came into null state. Again in custom components strings are passed as reference and are not copied like in Script components. I would try to not ignore that and see in how you can provoke this bug. Conversions could fail in many scenario’s. And in such a case, it should not break the canvas then. In case you ever release such an plugin, you’ll introduce bugs people might not immediately associate with your plugin.