View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003470 | NoesisGUI | Unity | public | 2024-07-05 19:28 | 2024-10-18 10:03 |
| Reporter | stonstad | Assigned To | sfernandez | ||
| Priority | normal | Severity | crash | ||
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.2.4 | ||||
| Target Version | 3.2.5 | Fixed in Version | 3.2.5 | ||
| Summary | 0003470: Domain Reload Crashing | ||||
| Description | In 3.2.2: In 3.2.4: Notes:
| ||||
| Steps To Reproduce | Editor logs with crash dumps are included for all crashes. 3.2.2 Crash Stack Trace 3.2.4 Crash #1 Stack Trace 3.2.4 Crash #2 Stack Trace | ||||
| Attached Files | MapIndicatorControl.xaml (772 bytes)
<UserControl
x:Class="StellarConquest.Presentation.Unity.UI.MapIndicatorControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions"
xmlns:local="clr-namespace:StellarConquest.Presentation.Unity.UI">
<Viewbox>
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<Rectangle x:Name="_Rectangle" Fill="White" Width="1" Height="1"/>
<local:SCMinimalSVGButton x:Name="_Button" SVG="{StaticResource ship_svg}" Width="40" Height="40" Margin="0, 0, 0, 0"/>
</Grid>
</Viewbox>
</UserControl>
MapIndicatorControl.cs (2,621 bytes)
using Noesis;
using UnityEngine;
using GUI = Noesis.GUI;
using NoesisColor = Noesis.Color;
using NoesisEventArgs = Noesis.EventArgs;
namespace StellarConquest.Presentation.Unity.UI
{
public sealed class MapIndicatorControl : UserControl
{
private View _View;
private FrameworkElement _Root;
private Rectangle _Rectangle;
private SCMinimalSVGButton _Button;
public MapIndicatorControl()
{
if (!Application.isPlaying)
return;
Initialized += OnInitialized;
InitializeComponent();
}
private void InitializeComponent()
{
GUI.LoadComponent(this, "Assets/User Interface/Screens/Game/Static/Map/MapIndicatorControl.xaml");
Loaded += (sender, e) =>
{
_View = View;
_View.Rendering += OnRendering;
};
Unloaded += (sender, e) =>
{
_View.Rendering -= OnRendering;
_View = null;
};
_Root = Content as FrameworkElement;
_Rectangle = _Root.FindName(nameof(_Rectangle)) as Rectangle;
_Button = _Root.FindName(nameof(_Button)) as SCMinimalSVGButton;
}
private void OnInitialized(object sender, NoesisEventArgs args)
{
}
public void SetSVG(NoesisColor color)
{
}
private void OnRendering(object sender, NoesisEventArgs e)
{
if (SessionState.Instance.StarSystem == null)
return;
float scalar = 4;
// position indicator in world space coordinates
float z = (SessionState.Instance.StarSystem.AbsolutePositionZ) * scalar;
GameState.Instance.MapShipIndicatorGameObject.transform.localPosition = new Vector3(
SessionState.Instance.StarSystem.AbsolutePosition.X * scalar,
z,
SessionState.Instance.StarSystem.AbsolutePosition.Y * scalar);
_Rectangle.Visibility = Visibility.Collapsed;
//_Rectangle.Height = z;
//_Rectangle.Margin = new Thickness(0, 0, 0, -z);
// billboard faces camera
Vector3 directionToCamera = GameState.Instance.MapShipIndicatorGameObject.transform.localPosition - InputManager.Instance.CurrentCamera.transform.position;
GameState.Instance.MapShipIndicatorGameObject.transform.localRotation = Quaternion.LookRotation(directionToCamera);
}
}
} | ||||
| Platform | Any | ||||
| related to | 0003723 | resolved | sfernandez | Frequent Unity Editor Crashes |
|
|
|
Encl. associated scene. The white starship indicator is a World Space UI instance. |
|
|
Here is a separate crash dump w/ stack trace for 3.2.4. I'm including it because it is a new stack trace location related to GC finalizers. I'm hoping it is diagnostically useful. |
|
|
This may or may not be related. Prior to a crash, I started seeing random layout bugs. XAML hierarchies that have been stable and working across all versions of Noesis suddenly show incorrect margins and elements are cut off. I'm seeing unusual ASCII characters in the textblock, which looks like a buffer overflow or out of bounds condition. Here is an example: Normal.jpg |
|
|
|
|
Bugged.jpg. Shows buffer overflow characters. This is new to 3.2.4 or 3.2.3. |
|
|
I created a separate ticket for the layout/textblock error, here: https://www.noesisengine.com/bugs/view.php?id=3472 |
|
|
All 3.2.2 crashes refer to this callstack: Noesis.dll!Noesis::VGLContext::PackDownsample Line 3553 C++ Symbols loaded. There are different issues in the 3.2.4 crashes, two of them point to corrupted mono state. Is there a way for you to reproduce this in a deterministic way? It would be very useful if you can provide a project we can debug to find what is corrupting the mono state. The other crash dump is related to some text layout, here is the callstack: > Noesis.dll! |
|
|
RE: 3.2.4: I do not have a deterministic reproduction. A few observations --
I can give you a compiled / playable version of the game, which externalizes Noesis.dll. But I haven't seen this behavior outside of Unity. I saw the debug library on the other issue. I'll start using it immediately. |
|
|
Received a failed assertion using the debug library. There was NO XAML changes or reload -- it just crashed the editor during playback with an otherwise stable scene. [NOESIS/E] Assertion failed: left <= right, at Rect.inl(320) ========== OUTPUTTING STACK TRACE ================== 0x00007FFA08AA1674 (Noesis) ArcSegment_SweepDirectionProperty_get It's at runtime (Unity playback) with a scene and XAML hierarchy that works, but failed this time. RE: corrupted mono state which is likely a separate issue than the attached dmp/stack trrace. I am using the same version of Unity with Noesis 3.2.2 and 3.2.4. Noesis app domain reloads are suspicious to me here. |
|
|
A separate crash, which again is assertion related, outputs: [NOESIS/E] Assertion failed: i < mSize, at Vector.inl(143) Why am I getting these crashes? What does this stack trace mean? Why so many SweepDirectionProperty getters? ========== OUTPUTTING STACK TRACE ================== 0x00007FF93135244F (Noesis) ArcSegment_SweepDirectionProperty_get |
|
|
|
|
RE: left <= right Rect.inl, WorldSpaceUI. This makes sense, as it is a relatively new addition to the game and it aligns with when the crashes started. I don't have a reproduction workflow -- it is highly random, despite game state being constant. A screenshot of how I am using WorldSpaceUI elements is included. RE: i < mSize. I am using BackgroundEffectBehavior extensively in the user interface. Most UI elements implement it. The background source is shared. I don't have a repeatable workflow -- it is random. But one thing I notice is that a crash is more likely to happen if the background effect is enabled/disabled. That failure rate is relatively high. The best case scenario is still an instrumented DLL. I leave it in place and then when a crash occurs, I share telemetry. The problem with providing a small repro is that it is highly random and likely only happens with all of these moving parts in place. Yesterday, there were 24 crashes. Today, it hasn't crashed once. I imagine that you don't want to start/stop the player over several hours to try to reproduce it. But for me, I can start/stop all day long because it is part of my daily grind. |
|
|
From above (" A screenshot of how I am using WorldSpaceUI elements is included.") |
|
|
From above (" A screenshot of how I am using WorldSpaceUI elements is included.") |
|
|
This is a candidate for closure due to crash fixed in https://www.noesisengine.com/bugs/view.php?id=3723. I |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2024-07-05 19:28 | stonstad | New Issue | |
| 2024-07-05 19:28 | stonstad | File Added: MapIndicatorControl.xaml | |
| 2024-07-05 19:28 | stonstad | File Added: MapIndicatorControl.cs | |
| 2024-07-05 19:28 | stonstad | File Added: 3.2.4 Crashes.zip | |
| 2024-07-05 19:28 | stonstad | File Added: 3.2.2 Crashes.zip | |
| 2024-07-05 19:31 | stonstad | Note Added: 0009743 | |
| 2024-07-05 19:31 | stonstad | Note Added: 0009744 | |
| 2024-07-05 19:31 | stonstad | File Added: Screenshot 2024-07-05 123141.jpg | |
| 2024-07-05 19:32 | stonstad | Note Edited: 0009743 | |
| 2024-07-05 19:56 | stonstad | Note Added: 0009749 | |
| 2024-07-05 19:56 | stonstad | File Added: Crash_2024-07-05_175404666.zip | |
| 2024-07-05 20:29 | jsantos | Assigned To | => sfernandez |
| 2024-07-05 20:29 | jsantos | Status | new => assigned |
| 2024-07-05 20:29 | jsantos | Target Version | => 3.2.5 |
| 2024-07-07 17:07 | stonstad | Note Added: 0009755 | |
| 2024-07-07 17:07 | stonstad | File Added: Normal.jpg | |
| 2024-07-07 17:08 | stonstad | Note Added: 0009756 | |
| 2024-07-07 17:08 | stonstad | Note Edited: 0009756 | |
| 2024-07-07 17:09 | stonstad | Note Added: 0009757 | |
| 2024-07-07 17:09 | stonstad | File Added: Bugged.jpg | |
| 2024-07-07 17:10 | stonstad | Note Edited: 0009755 | |
| 2024-07-07 17:11 | stonstad | Note Edited: 0009757 | |
| 2024-07-07 17:11 | stonstad | Note Edited: 0009755 | |
| 2024-07-07 23:57 | stonstad | Note Added: 0009758 | |
| 2024-07-09 12:49 | sfernandez | Note Added: 0009768 | |
| 2024-07-09 17:22 | stonstad | Note Added: 0009770 | |
| 2024-07-11 11:05 | sfernandez | Note Edited: 0009768 | |
| 2024-07-11 17:26 | stonstad | Note Added: 0009799 | |
| 2024-07-11 17:26 | stonstad | File Added: Crash_2024-07-11_152210606.zip | |
| 2024-07-11 17:28 | stonstad | Note Edited: 0009799 | |
| 2024-07-11 17:41 | stonstad | Note Edited: 0009799 | |
| 2024-07-11 17:41 | stonstad | Note Edited: 0009799 | |
| 2024-07-12 00:57 | stonstad | Note Added: 0009800 | |
| 2024-07-12 00:57 | stonstad | File Added: Crash_2024-07-11_225355786.zip | |
| 2024-07-12 12:05 | sfernandez | Note Added: 0009803 | |
| 2024-07-12 12:06 | sfernandez | Status | assigned => feedback |
| 2024-07-12 17:00 | stonstad | Note Added: 0009805 | |
| 2024-07-12 17:00 | stonstad | Status | feedback => assigned |
| 2024-07-12 17:01 | stonstad | Note Added: 0009806 | |
| 2024-07-12 17:01 | stonstad | Note Added: 0009807 | |
| 2024-07-12 17:01 | stonstad | File Added: a.jpg | |
| 2024-10-04 16:30 | sfernandez | Relationship added | related to 0003723 |
| 2024-10-17 21:22 | stonstad | Note Added: 0010021 | |
| 2024-10-18 10:03 | sfernandez | Status | assigned => resolved |
| 2024-10-18 10:03 | sfernandez | Resolution | open => fixed |
| 2024-10-18 10:03 | sfernandez | Fixed in Version | => 3.2.5 |
| 2025-10-10 13:29 | jsantos | Category | Unity3D => Unity |