Gumball + selection causing restart of cycles (and others)

As per subject, with gumball activated, I get cycles restarting when selecting certain objects:

I also see the same behavior when I use my own viewport renderer (not loaded in the above video) – my realtime viewport is torn down and reconstructed. However, this behavior is not universal, so you can try to reproduce it using this file:

gumball-vs-raytraced.3dm (315.0 KB)

The behavior should survive save small, with no textures or plugin data, but it does not survive a geometry-only save. That apparently “fixes” the file.

Checked on Windows, Rhino version 7.4.21078.1001, 2021-03-19

Hi JD!

I’m not seeing that here on a daily 7.6. Could you check if the public 7.5 release candidate fixes this?
-wim

Hi Wim, sure thing – I just checked with 7.5.21074.17001, 2021-03-15 and the behavior appears to be unchanged.

Hi JD -

Thanks for testing that!
I’ve put it on the list as RH-63421 to be taken a closer look at.
-wim

1 Like

For what it’s worth, I remembered I also have a realtime display mode in a test plugin, so checked, and that one behaves the same. And secondly, I have now checked and confirm that the same also occurs on mac (version 7.4.21078.01002, 2021-03-19).

Added some logging to that test plugin, and here is what it yields:

Display mode set to "TestRealtimeDisplayMode".
 TestRealtimeDisplayMode() (instance 0)
 TestChangeQueue() (instance 0)
 NotifyBeginUpdates
 NotifyEndUpdates
 ApplyViewChange: name: a
 ApplyEnvironmentChanges: usage: Background
 ApplyEnvironmentChanges: usage: Skylighting
 ApplyEnvironmentChanges: usage: ReflectionAndRefraction
 ApplySkylightChanges: enabled: True
 ApplySunChanges: id: 62ee2cf6-b855-4549-a277-e2bbf609f328, name: sun
 ApplyMeshChanges: delete 0, add 7
 ApplyMeshInstanceChanges: delete 0, add/change 7
 ApplyGroundPlaneChanges: mat id: 3858557068, alt: 1.06586011914637
1 open surface added to selection.
1 closed surface added to selection.
1 open surface added to selection.
1 closed surface added to selection.
 TestChangeQueue.Dispose(true) (instance 0)
1 closed surface added to selection.
 TestRealtimeDisplayMode() (instance 1)
 TestChangeQueue() (instance 1)
 NotifyBeginUpdates
 NotifyEndUpdates
 ApplyViewChange: name: a
 ApplyEnvironmentChanges: usage: Background
 ApplyEnvironmentChanges: usage: Skylighting
 ApplyEnvironmentChanges: usage: ReflectionAndRefraction
 ApplySkylightChanges: enabled: True
 ApplySunChanges: id: 62ee2cf6-b855-4549-a277-e2bbf609f328, name: sun
 ApplyMeshChanges: delete 0, add 7
 ApplyMeshInstanceChanges: delete 0, add/change 7
 ApplyGroundPlaneChanges: mat id: 3858557068, alt: 1.06586011914637
 TestChangeQueue.Dispose(true) (instance 1)
1 closed surface added to selection.
 ~TestRealtimeDisplayMode() (instance 0)
 ~TestChangeQueue() (instance 0)
 TestRealtimeDisplayMode() (instance 2)
 TestChangeQueue() (instance 2)
 NotifyBeginUpdates
 NotifyEndUpdates
 ApplyViewChange: name: a
 ApplyEnvironmentChanges: usage: Background
 ApplyEnvironmentChanges: usage: Skylighting
 ApplyEnvironmentChanges: usage: ReflectionAndRefraction
 ApplySkylightChanges: enabled: True
 ApplySunChanges: id: 62ee2cf6-b855-4549-a277-e2bbf609f328, name: sun
 ApplyMeshChanges: delete 0, add 7
 ApplyMeshInstanceChanges: delete 0, add/change 7
 ApplyGroundPlaneChanges: mat id: 3858557068, alt: 1.06586011914637
 TestChangeQueue.Dispose(true) (instance 2)
1 closed surface added to selection.
 ~TestRealtimeDisplayMode() (instance 1)
 ~TestChangeQueue() (instance 1)
 TestRealtimeDisplayMode() (instance 3)
 TestChangeQueue() (instance 3)
 NotifyBeginUpdates
 NotifyEndUpdates
 ApplyViewChange: name: a
 ApplyEnvironmentChanges: usage: Background
 ApplyEnvironmentChanges: usage: Skylighting
 ApplyEnvironmentChanges: usage: ReflectionAndRefraction
 ApplySkylightChanges: enabled: True
 ApplySunChanges: id: 62ee2cf6-b855-4549-a277-e2bbf609f328, name: sun
 ApplyMeshChanges: delete 0, add 7
 ApplyMeshInstanceChanges: delete 0, add/change 7
 ApplyGroundPlaneChanges: mat id: 3858557068, alt: 1.06586011914637

The interesting bits to note are these:

 TestChangeQueue.Dispose(true) (instance 1)
1 closed surface added to selection.

What occurs there is that we see my change queue being destroyed before Rhino prints the message about the object being selected.

If I had to guess, some detail in how gumball stores data has changed subtly, causing the change queue mechanism to generate a different hash for something or other, and therefore believe that the scene needs updating, and that this is why I see this behavior in common between three different realtime display modes that all make use of the change queue.

@jdhill I can’t repeat this here - sorry. Could you try disabling every plug-in that doesn’t ship with Rhino and see if you can still repeat it?

I have a very similar issue, running Version 7 SR5 (7.5.21082.11001, 2021-03-23).
Clicking the bottom object restarts cycles and does weird glitches to the viewport:

Here is the file as an example:denoisertest.3dm (506.0 KB)

Hi Andy, indeed that is how I have tested it, on both windows & mac. I tried to use safe mode but did not find a way to get cycles running in a viewport after starting in safe mode.

Checking RD3’s file I see similar behavior, but not exactly similar, since with this file I am able to observe cycles restarting regardless whether gumball is enabled.

However, in a further test with RD3’s file, I have saved it small, with geometry only, and no textures or plugin data, and the resulting file does now show similar gumball-dependent behavior, with a cycles restart resulting specifically from selecting the middle object, after having the top object selected, when gumball is enabled. Tested this and see the same behavior on windows & mac.

That is still slightly different than my case, where the file is “fixed” by saving with geometry only (and apparently any combination of other save-as options).

@jdhill and @RD3 - we were able to reproduce that issue on 7.5 and tested more on 7.6. This appears to have been fixed in 7.6. If all goes as planned, 7.5 will be released next week and the first public 7.6 release candidate will then also become available. Let me know if you need it earlier.
-wim

2 Likes

Thanks a lot! (and no early copy needed for me)