We have a couple customers experiencing some odd behaviour with Rhino 6 and we’re struggling to find the issue.
Our plugin runs in both Rhino 5 and Rhino 6 with only minor code changes between them where the SDK has evolved, or in OpenGL where you have to supply the MVP matrix yourself for Rhino 6.
On 90% of machines everything runs fine, however we have a small number of people where nothing is drawn at all in Rhino 6 in any window. Rhino 5 on the same machine runs fine. The plugin loads fine, no errors are thrown and data is loaded into the plugin fine… just the rendering fails to render anything in any window… but only in Rhino 6.
These are clean machines with only our plugin loaded. The GPU drivers are up to date and so is Rhino (6.2). Our plugin is built against the 6.2 libraries too.
As we can’t recreate it and the same code runs fine in Rhino 5 I’m kind of banging my head against a brick wall.
Any suggestions on where to look next?
What kinds of GPUs are these suffering machines using? Their _SystemInfo would be useful to know.
They are all nVidia cards, latest one with an issue is a GTX770.
Doing some remote debugging the “problem machine” in question also didn’t receive valid “document” objects on new/open document calls and therefore our “currentDoc” variable was NULL.
It’s almost as if the plugin has not got registered completely with Rhino 6. Although the UI loads anything it does to try and interact with the Rhino subsystem fails…
It’s frustrating as we can’t reproduce this at all on our own machines!
Perhaps you can instruct users on these machines to add their e-mail address in the field presented in the
Help > Check for Updates dialog and have them ensure the system is set up to allow updates and statistics. If internal code is throwing exceptions that don’t crash Rhino they get logged to our exception database. You could send us in a private message the e-mail addresses for the users who have the problem, then we can start tracking them in the system to see what goes wrong.
I’ll get the customer to do as you suggested and PM you their details as and when I receive the info.
Ok, we’ve managed to resolve this issue at last and I thought it best to detail our findings so as to help others who may run into related issues!
Firstly, it wasn’t the Conduit which was at fault… nor was it OpenGL. The main culprit can be attributed to Rhino 6’s need to create new plugin UI elements for every document.
This is what we found…
Plugins in Rhino5 get created and initialised at startup (if specified in their code) and that’s the first and last time the “init” code is ever called. The UI elements are constructed at this point.
In Rhino6 the UI elements are only constructed at startup IF your plugin UI is the first tab window and therefore visible. If it’s 2nd, last, etc tab then the UI is hidden apart from the tab… then the UI init code is not called by Rhino6 UNTIL you click on that tab and show your UI.
So we had some code in our UI that relied on receiving a Rhino Initialisation message at startup, however that only works in Rhino6 IF your UI is a prominent visible window… otherwise it’s not called until you click on the UI and of course by that point the Rhino INIT message is never going to be raised by Rhino.
We’ve redone our code now so that we no longer rely on the Rhino INIT message and that’s fixed the issue… but I essentially stumbled across this issue by accident as we managed to recreate our customers issue, but only by moving our UI panel from the first place in the tab window.
Hope this is of some help and I’ve explained things clearly enough?