View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002201 | NoesisGUI | C++ SDK | public | 2021-11-28 09:43 | 2021-12-15 19:53 |
Reporter | asusralis | Assigned To | sfernandez | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.1.1 | ||||
Target Version | 3.1.2 | Fixed in Version | 3.1.2 | ||
Summary | 0002201: Crash when applying style to custom control. | ||||
Description | Unity will crash once the editor imports everything - it doesn't need to use the control in-game. Removing ApplyTemplate() will avoid crashes after importing but will crash when showing the control (I'm pretty sure at least...?). I'm kind of getting random crashes everywhere while using this control. | ||||
Steps To Reproduce | public class ExpeditionMap : Control { public ExpeditionMap() { Loaded += (s, e) => { ApplyTemplate(); }; DataContextChanged += (s, e) => { }; } static ExpeditionMap() { DefaultStyleKeyProperty.OverrideMetadata(typeof(ExpeditionMap), new FrameworkPropertyMetadata(typeof(ExpeditionMap))); } } <Style TargetType="local:ExpeditionMap"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:ExpeditionMap"> <Grid> <TextBlock Text="Hello!" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
Hi, I see in the log the following error message while trying to run the static constructor for Shelter.Views.ExpeditionMap.:[NOESIS/E] DependencyProperty 'NodeStyle' already registered to type 'Shelter.Views.LocationView' Can you verify that the call to DependencyProperty.Register() has all the parameters fine? It seems that you are using typeof(LocationView) as owner instead of typeof(ExpeditionMap). Anyway, I'll check our code to see why it is crashing when trying to register a duplicate property. |
|
I was able to reproduce the crash by defining 2 dependency properties with the same string name. It will be fixed for the next release. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2021-11-28 09:43 | asusralis | New Issue | |
2021-11-28 09:43 | asusralis | File Added: Crash_2021-11-28_083712163.7z | |
2021-11-28 10:21 | asusralis | Description Updated | |
2021-11-28 10:21 | asusralis | Steps to Reproduce Updated | |
2021-11-28 10:24 | asusralis | Description Updated | |
2021-11-29 10:30 | sfernandez | Assigned To | => sfernandez |
2021-11-29 10:30 | sfernandez | Status | new => assigned |
2021-11-29 10:30 | sfernandez | Target Version | => 3.1.2 |
2021-12-15 18:05 | sfernandez | Status | assigned => feedback |
2021-12-15 18:05 | sfernandez | Note Added: 0007676 | |
2021-12-15 19:53 | sfernandez | Status | feedback => resolved |
2021-12-15 19:53 | sfernandez | Resolution | open => fixed |
2021-12-15 19:53 | sfernandez | Fixed in Version | => 3.1.2 |
2021-12-15 19:53 | sfernandez | Note Added: 0007677 |