View Revisions: Issue #1599

Summary 0001599: Unity Hard Loop/Lock on Visual Tree Update
Revision 2019-12-12 14:33 by stonstad
Description Updated: -- User Error, Please Ignore

I don't know how to provide the telemetry you need for this one -- your guidance/help on getting you what you need is requested. I have a UI that causes Unity to hard lock (loop?) with high processor utilization. Breakpoints don't fire and I am forced to terminate Unity. A freeze occurs after the UI is initialized and a subsequent change is made. Sometimes the UI disappears, but most of the time it is a lock. The visual tree is as follows:

Grid
   Grid
      Grid
         ViewBox
            Grid (which forces a specific size based on user's preferred UI 'size')
               Grid
                  Grid
                     Grid
                        HeaderedContentControl
                           Grid
                              StackPanel
                                 ScrollViewer
                                    WrapPanel
                                       UserControl w/ LayoutTransform & ScaleTransform
                                          Grid
                                             Image 1
                                             Image 2
                                             Text 1
                                             StackPanel
                                                Image 1
                                                Image N
                                             Grid (Focused 9-Slice Grid w/ Image)
                                             Grid (Unfocused 9-Slice Grid w/ Image)
                                             Grid (Over 9-Slice Grid w/ Image)
                                             Grid (Down 9-Slice Grid w/ Image)

There are 75+ UserControl instances in that wrap panel. I found that if the focused grid had negative margin (so that it extends outside of its parent) I get a hard lock every time the scrollviewer hits 0.

Clearing the wrap panel can also cause a hard lock. This could be Unity, it could be me. I'm not aware of anything I am doing to cause a layout cycle, but hey, I've done incorrect things before.

What kind of information can I provide to help us diagnose if this is a Noesis thing?

Encl. screenshots of UI and unresponsive process.

Revision 2019-12-12 14:09 by stonstad
Description I don't know how to provide the telemetry you need for this one -- your guidance/help on getting you what you need is requested. I have a UI that causes Unity to hard lock (loop?) with high processor utilization. Breakpoints don't fire and I am forced to terminate Unity. A freeze occurs after the UI is initialized and a subsequent change is made. Sometimes the UI disappears, but most of the time it is a lock. The visual tree is as follows:

Grid
   Grid
      Grid
         ViewBox
            Grid (which forces a specific size based on user's preferred UI 'size')
               Grid
                  Grid
                     Grid
                        HeaderedContentControl
                           Grid
                              StackPanel
                                 ScrollViewer
                                    WrapPanel
                                       UserControl w/ LayoutTransform & ScaleTransform
                                          Grid
                                             Image 1
                                             Image 2
                                             Text 1
                                             StackPanel
                                                Image 1
                                                Image N
                                             Grid (Focused 9-Slice Grid w/ Image)
                                             Grid (Unfocused 9-Slice Grid w/ Image)
                                             Grid (Over 9-Slice Grid w/ Image)
                                             Grid (Down 9-Slice Grid w/ Image)

There are 75+ UserControl instances in that wrap panel. I found that if the focused grid had negative margin (so that it extends outside of its parent) I get a hard lock every time the scrollviewer hits 0.

Clearing the wrap panel can also cause a hard lock. This could be Unity, it could be me. I'm not aware of anything I am doing to cause a layout cycle, but hey, I've done incorrect things before.

What kind of information can I provide to help us diagnose if this is a Noesis thing?

Encl. screenshots of UI and unresponsive process.