View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002417 | NoesisGUI | Unity3D | public | 2022-09-12 23:25 | 2022-09-13 12:28 |
Reporter | Feldruebe | Assigned To | sfernandez | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.1.5 | ||||
Target Version | 3.1.6 | Fixed in Version | 3.1.6 | ||
Summary | 0002417: FlowDirection of WrapPanel crashed Unity | ||||
Description | Use the following Control: xaml: <UserControl x:Class="Testing.TestControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib" x:Name="Root"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> <ItemsControl Grid.Row="0" Grid.Column="0" ItemsSource="{Binding Texts, ElementName=Root}" Width="300"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel VerticalAlignment="Bottom" FlowDirection="RightToLeft" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding }"/> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> <Button Content="Click me" Click="Button_Click" /> <TextBlock Text="{Binding Counter, ElementName=Root, StringFormat='Button clicked {0} time(s)'}" Margin="5,0,0,0" VerticalAlignment="Center" /> </StackPanel> </UserControl> CodeBehind: #if UNITY_5_3_OR_NEWER #define NOESIS using Noesis; #else using System.Windows; using System.Windows.Controls; #endif namespace Testing { using System.Collections.ObjectModel; public partial class TestControl: UserControl { public TestControl() { InitializeComponent(); } public int Counter { get { return (int)GetValue(CounterProperty); } set { SetValue(CounterProperty, value); } } public static readonly DependencyProperty CounterProperty = DependencyProperty.Register( "Counter", typeof(int), typeof(TestControl), new PropertyMetadata(0)); public ObservableCollection<string> Texts { get { return (ObservableCollection<string>)GetValue(TextsProperty); } set { SetValue(TextsProperty, value); } } public static readonly DependencyProperty TextsProperty = DependencyProperty.Register( "Texts", typeof(ObservableCollection<string>), typeof(TestControl), new PropertyMetadata(new ObservableCollection<string>())); #if NOESIS protected override bool ConnectEvent(object source, string eventName, string handlerName) { if (eventName == "Click" && handlerName == "Button_Click") { ((Button)source).Click += this.Button_Click; return true; } return false; } private void InitializeComponent() { NoesisUnity.LoadComponent(this); } #endif private void Button_Click(object sender, RoutedEventArgs args) { Counter++; this.Texts.Add("qwe"); } }; } | ||||
Steps To Reproduce | Click 12 times on the button. Unity crashes | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
Thanks for the report, I was able to reproduce it. We'll fix it for the next release. |
|
Fixed in r11477. | |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-09-12 23:25 | Feldruebe | New Issue | |
2022-09-13 12:22 | sfernandez | Assigned To | => sfernandez |
2022-09-13 12:22 | sfernandez | Status | new => assigned |
2022-09-13 12:22 | sfernandez | Target Version | => 3.1.6 |
2022-09-13 12:22 | sfernandez | Note Added: 0008064 | |
2022-09-13 12:28 | sfernandez | Status | assigned => resolved |
2022-09-13 12:28 | sfernandez | Resolution | open => fixed |
2022-09-13 12:28 | sfernandez | Fixed in Version | => 3.1.6 |
2022-09-13 12:28 | sfernandez | Note Added: 0008065 |