View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003902 | NoesisGUI | Unity3D | public | 2025-01-15 13:53 | 2025-01-21 10:43 |
Reporter | KeldorKatarn | Assigned To | sfernandez | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | assigned | Resolution | open | ||
Product Version | 3.2.5 | ||||
Target Version | 3.2.8 | ||||
Summary | 0003902: Accessing AdornerLayer in derived AdornerDecorator causes crash | ||||
Description | I have the following class. Accessing the AdornerLayer causes the crash public class DialogAdornerDecorator : AdornerDecorator { private readonly DialogHost _dialogHost = new(); public DialogAdornerDecorator() { AddVisualChild(_dialogHost); } /// <summary>Gets the <see cref="Visual"/> children count.</summary> protected override int VisualChildrenCount { get { return base.VisualChildrenCount == 0 ? 0 : base.VisualChildrenCount + 1; } } #if UNITY_5_5_OR_NEWER private AdornerLayer AdornerLayer { get { return GetAdornerLayer(); } } #endif /// <inheritdoc/> protected override Size ArrangeOverride(Size finalSize) { base.ArrangeOverride(finalSize); var finalSizeRect = new Rect(finalSize); _dialogHost.Arrange(finalSizeRect); return finalSize; } /// <inheritdoc/> protected override Visual GetVisualChild(int index) { if (Child == null) { throw new ArgumentOutOfRangeException(nameof(index)); } switch (index) { case 0: return Child; case 1: return AdornerLayer; case 2: return _dialogHost; default: throw new ArgumentOutOfRangeException(nameof(index)); } } /// <inheritdoc/> protected override Size MeasureOverride(Size constraint) { var desiredSize = base.MeasureOverride(constraint); _dialogHost.Measure(constraint); return desiredSize; } } | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
Additional note: Even if I let AdornerLayer return null, using this decorator and then using the Tab key causes a crash as well. Not sure why |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2025-01-15 13:53 | KeldorKatarn | New Issue | |
2025-01-15 13:56 | KeldorKatarn | Note Added: 0010272 | |
2025-01-21 10:43 | sfernandez | Assigned To | => sfernandez |
2025-01-21 10:43 | sfernandez | Status | new => assigned |
2025-01-21 10:43 | sfernandez | Target Version | => 3.2.8 |