Noesis GUI crashes Unity in ArrangeOverride/MeasureBaseCallback
Hi,
Noesis GUI silently crashes Unity when calling "measureBaseCallback" in ArrangeOverride - at least that's the last point where I can trace it before it crashes.
I'm pretty sure that the cause for this is on my side, but nevertheless it shouldn't crash Unity I believe. This way it's pretty difficult to find out what the problem is.
I can upload the solution if necessary.
Sorry, I forgot: I'm using Noesis 3.
Noesis GUI silently crashes Unity when calling "measureBaseCallback" in ArrangeOverride - at least that's the last point where I can trace it before it crashes.
Code: Select all
protected virtual Size ArrangeOverride(Size finalSize)
{
Size renderSize = new Size(0.0f, 0.0f);
if (_measureBaseCallback != null)
{
_measureBaseCallback(swigCPtr, ref finalSize, ref renderSize);
}
return renderSize;
}
I can upload the solution if necessary.
Sorry, I forgot: I'm using Noesis 3.
Re: Noesis GUI crashes Unity in ArrangeOverride/MeasureBaseCallback
I could narrow it down a bit. I'm using a TextBox style + template - as soon as I remove the PART_ContentHost name tag, it doesn't crash anymore; but of course then the TextBox doesn't work anymore either...
Code: Select all
<Style TargetType="{x:Type TextBox}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Padding" Value="3" />
<Setter Property="MinHeight" Value="25" />
<Setter Property="AllowDrop" Value="true" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Margin" Value="3" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Background" Value="#28000000" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBoxBase}">
<Border
x:Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="Transparent"
BorderThickness="1"
SnapsToDevicePixels="True">
<ScrollViewer
x:Name="PART_ContentHost"
Margin="0"
VerticalScrollBarVisibility="Hidden" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource BlueAccentBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Re: Noesis GUI crashes Unity in ArrangeOverride/MeasureBaseCallback
I just found that something similar was already reported as a bug: https://www.noesisengine.com/bugs/print ... b736c5b7a4, reported by "Sergey".
If I replace the ScrollViewer with a border, the exception is gone.
by the way: the xrash only happens when the game is run.
If I replace the ScrollViewer with a border, the exception is gone.
by the way: the xrash only happens when the game is run.
Re: Noesis GUI crashes Unity in ArrangeOverride/MeasureBaseCallback
I think I found the problem. Giving the ScrollViewer a default template - I do not use the themes - eliminates the crash.
Nevertheless: Unity shouldn't crash on this...
Nevertheless: Unity shouldn't crash on this...
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Noesis GUI crashes Unity in ArrangeOverride/MeasureBaseCallback
Yes, this is related to the indicated bug report: #1968
We already solved it for the next release.
We already solved it for the next release.
Who is online
Users browsing this forum: No registered users and 3 guests