After Solution Exception (Rhino 8)

I’m encountering an issue where my component works fine in Rhino 7 (left), but when loaded in Rhino 8 I get 1. After Solution exception:Object reference not set to an instance of an object.(right)

I’ve tried to run Rhino 8 in debug mode with /netfx switch, but the exception isn’t being caught.

The component is basically a “custom preview component”, it inherits GH_CustomPreviewComponent, so that I can override DrawViewportMeshes and AppendRenderGeometry, I think inheriting GH_CustomPreviewComponent is causing the issue, as I’ve commented out all the code logic so that it’s barebone, and it’s still showing the exception.

Functionally speaking, the component works fine, as far as i can tell, but I would like to know what the exception is.

It seems we are writing about the same problem.

1 Like

Yes, it’s basically the same issue, but for me, after disabling “Enable Just My Code” the exception occurs in the the GH_CustomePreviewComponent class, for some reason the base seems to be null in base.AfterSolveInstance()?

My current temporary fix is to override AfterSolveInstance, and let it do nothing

override protected void AfterSolveInstance()
{ }

Would be nice if there’e a more proper solution.

Hi, I can’t reproduce this problem. Do you have code that you could share?
Thanks

hum, interesting, now I’m not able to reporduce this problem on my personal computer.
I will check again on my work computer tomorrow

here I posted the files with this problem

So I’m having a bit of an interesting situation, on my work computer, this exception shows up
on my personal computer, with the same gh and gha files, everything is fine

Both computers have the latest Rhino 8 installed, I have a bit more plugins installed on my work computer, but I don’t think that would be the cause (maybe)?

Do you have any suggestions on what I can do to pinpoint the issue?

I don’t see what the problem is right now.
I logged the issue here.

Just dropping a note here so I can follow this thread. My plugin is showing this same error in R8.

Cheers

DK

Hi @victorlin,

This will be fixed on the next RC.

3 Likes

out of curiosity, could you briefly explain what the issue is? and why it’s not happening on some computer but not others?

It happens on components that inherit from GH_CustomPreviewComponent and implement BeforeSolveInstance without calling base type implementation but do call AfterSolveInstance base type method.

If you override BeforeSolveInstance and call base type, you should call base type also on AfterSolveInstance or don’t call base type in any of these two overrides.

Previous versions of Rhino where immune to this issue, but calling those methods in pairs or not calling them at all should work on any version of Rhino.

2 Likes

Ok, this sounds exactly the issue we have been seeing, looking forward to testing the new update when available

Cheers

DK

Hi,
Is this working for you now?

Hi Alain,

Tho I first thought this issue was sorted, Unfortunately I’m still getting the error code on loading of my plugin:

Image 523

Any further ideas on where I might be able to find the issue/solution? It does cause my plugin to randomly crash in R8 Win for my test user.

R7 Win/MacOS and R8 MacOS (tho not tested a lot) dont seam to show the issue.

Thanks

DK

OK - After doing the above test Rhino 8 updated itself and I have re tested with NO error coming up.

Image 525

This is the new version that it updated too.

I’m going to test again now - just to be sure.

Cheers

DK

OK - that launched without the display pipeline error! THANKS! Not sure what has changed in the latest version but that is looking good from my end.

Cheers

DK

1 Like

Great! Thanks for reporting back.

1 Like

Opps - spoke to soon - error is back:

This is a new build from today, only changes I’ve done is some clean up in my bake/export code.

The source is edited/built in R7 - I’m going to open the source in R8 now to see if I can find the issue.

Cheers

DK

Hi @kiteboardshaper,

This error is a different one, it happens during the display and not during before-after solution methods.
Do you mind enable stop on Exceptions on Visual Studio and send a screenshot of the call stack when this happens?