View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001700 | NoesisGUI | C++ SDK | public | 2020-05-27 00:45 | 2020-05-28 17:33 |
| Reporter | steveh | Assigned To | jsantos | ||
| Priority | normal | Severity | major | ||
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.0.0 | ||||
| Target Version | 3.0.1 | Fixed in Version | 3.0.1 | ||
| Summary | 0001700: Crash / memory stomp in SDF generator | ||||
| Description | Hi guys, I'm seeing an assert which is ultimately leading to a memory overwrite in the SDF Generator. We are running at 4k UI and we have a text popup we plays an animation and scales larger than the screen. The text is also drawing to the offscreen buffer, I'm not sure if that makes a difference. The full callstack is as follows:
void SDFGenerator::Begin(int width, int height) In my case, width is 79 and height is 66. If I go back up the stack, the cbox.xMax is 3840 (the width of my render target) and the cbox.xmin is -704. So width ends up being (3840 + 704) >> 6 which is 79, and the height ends up as (2816 + 896) >> 6 which is 66. I tried to reproduce this locally in XamlPlayer but was unable to. I'm attaching something very similar to what we have in game, but it doesn't assert or crash in XamlPlayer. | ||||
| Steps To Reproduce |
| ||||
| Attached Files | test.xaml (1,383 bytes)
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions"
Background="Gray" Width="3840" Height="2160">
<Grid.Resources>
<Storyboard x:Key="zoom" RepeatBehavior="Forever">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Popup" Storyboard.TargetProperty="RenderTransform.ScaleX">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="2"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Popup" Storyboard.TargetProperty="RenderTransform.ScaleY">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="2"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Grid.Resources>
<Grid.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource zoom}"/>
</EventTrigger>
</Grid.Triggers>
<TextBlock Name="Popup" Text="POPUP!" FontSize="1024" TextAlignment="Center" RenderTransformOrigin="0.5,0.5" Opacity="0.5">
<TextBlock.RenderTransform>
<ScaleTransform ScaleX="1.0" ScaleY="1.0" />
</TextBlock.RenderTransform>
</TextBlock>
</Grid> | ||||
| Platform | Any | ||||
|
I've just realised it actually crashes on the stroke. I've added strokes to the test XAML and it doesn't assert, but I do notice some artifacts. It seems the large the text the more noticeable the artifacts. I wonder if it is causing an issue but the compiled XAMLPlayer hasn't got asserts enabled? I'm attaching a new version with a stroke. test2.xaml (1,447 bytes)
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions"
Background="Gray" Width="3840" Height="2160">
<Grid.Resources>
<Storyboard x:Key="zoom" RepeatBehavior="Forever">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Popup" Storyboard.TargetProperty="RenderTransform.ScaleX">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="2"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Popup" Storyboard.TargetProperty="RenderTransform.ScaleY">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="2"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Grid.Resources>
<Grid.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource zoom}"/>
</EventTrigger>
</Grid.Triggers>
<TextBlock Name="Popup" Text="POPUP!" FontSize="512" TextAlignment="Center" RenderTransformOrigin="0.5,0.5" Opacity="0.5" noesis:Text.Stroke="#FFE4E4E4" noesis:Text.StrokeThickness="12" >
<TextBlock.RenderTransform>
<ScaleTransform ScaleX="1.0" ScaleY="1.0" />
</TextBlock.RenderTransform>
</TextBlock>
</Grid> |
|
|
I am able to reproduce this and it's been reported by more clients. It will be fixed in 3.0.1, the artifacts are probably a different thing, I will analyze it carefully and tell you. |
|
|
Artifacts in the stroke are a different thing. That's related to the new SDF algorithm. Please, open a new ticket if after this fix that's still an issue for you. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2020-05-27 00:45 | steveh | New Issue | |
| 2020-05-27 00:45 | steveh | File Added: test.xaml | |
| 2020-05-27 00:52 | steveh | File Added: test2.xaml | |
| 2020-05-27 00:52 | steveh | Note Added: 0006391 | |
| 2020-05-27 01:53 | jsantos | Assigned To | => jsantos |
| 2020-05-27 01:53 | jsantos | Status | new => assigned |
| 2020-05-27 01:53 | jsantos | Target Version | => 3.0.1 |
| 2020-05-27 01:53 | jsantos | Description Updated | |
| 2020-05-27 01:53 | jsantos | Steps to Reproduce Updated | |
| 2020-05-27 01:54 | jsantos | Note Added: 0006392 | |
| 2020-05-28 17:33 | jsantos | Status | assigned => resolved |
| 2020-05-28 17:33 | jsantos | Resolution | open => fixed |
| 2020-05-28 17:33 | jsantos | Fixed in Version | => 3.0.1 |
| 2020-05-28 17:33 | jsantos | Note Added: 0006412 |