ActiveViewport being reported as blank


#1

Hi

I am having a lot of trouble getting the active viewport. doc.Views.ActiveView.ActiveViewport is being return incorrectly for the Perspective viewport (see attached screenshot), but is fine for all other viewports. This is happening on a new scene. This is happening on one particular Rhino installation (my laptop) - fine on other installations.

Paul


#2

This only occurs when you terminate Rhino via the VS Debugger and then restart it. If you shutdown Rhino normally it does not happen. So sounds like terminating Rhino is leaving the Perspective window saved in an uncertain state.


(Steve Baer) #3

I can’t repeat this. Tested with Visual Studio 2010.


#4

For me it is 100% reproduceable if I 1) Start debugging a Rhino C# project in Visual Studio, 2) Once Rhino has started and the plugin loaded, start 4 viewport mode, with the Perspective window active 3) Terminate debugging (with shift-F5 in VS), 4) Restart debugging (F5), click on the Perspect window, then in C# Open a Rhino C# doc.Views.ActiveView.ActiveViewport is corrupt (as above).

Not a showstopper - but slightly concerning that it could happen to a customer using your plugin if Rhino crashes, then they restart it again - they will get a corrupt ActiveViewport in C#.

Paul