View Issue Details

IDProjectCategoryView StatusLast Update
0001701NoesisGUIUnity3Dpublic2020-05-28 11:23
ReportersamcAssigned Tosfernandez 
PrioritynormalSeverityblockReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version3.0.0 
Target Version3.0.1Fixed in Version3.0.1 
Summary0001701: Unity crash 50% of the time entering play mode after 3.0.0 upgrade
DescriptionFirst entrance into play mode is almost always ok; but the 2nd time I tried play mode it seems to crash most of the time. Call stack unity gives me looks like this:

0x00007FFD39229491 (Noesis) TemplateBindingExtension_Property_get
0x00007FFD3922952A (Noesis) TemplateBindingExtension_Property_get
0x00007FFD3935688C (Noesis) Noesis_RegisterLogCallback
0x00007FF7C7A107DE (Unity) GfxDeviceWorker::RunCommand
0x00007FF7C7A185FC (Unity) GfxDeviceWorker::RunExt
0x00007FF7C7A189E8 (Unity) GfxDeviceWorker::RunGfxDeviceWorker
0x00007FF7C88AFE53 (Unity) Thread::RunThreadWrapper
0x00007FFDA1BD7BD4 (KERNEL32) BaseThreadInitThunk
0x00007FFDA2E0CE51 (ntdll) RtlUserThreadStart
Steps To Reproduce1) Enter play mode
2) Exit play mode
3) Re-enter play mode
4) Repeat until crash
TagsUnity
PlatformWindows

Activities

samc

samc

2020-05-27 06:22

reporter  

Crash_2020-05-27_041253606.zip (961,611 bytes)
sfernandez

sfernandez

2020-05-27 14:03

manager   ~0006395

Hi Sam, do you have a way to reproduce this with a small sample or one of our samples?
From the callstack I see it is happening when it starts to render, and our view doesn't seem to be correctly initialized.
sfernandez

sfernandez

2020-05-27 16:48

manager   ~0006396

In case there is no easy way to reproduce this outside your project I prepared a debug version of our library with some extra logs to help us narrow the source of the problem.
Could you please try again using this library? https://drive.google.com/file/d/1buzExMRV-gujPsscWWI9G_KQJoRBbmrF/view?usp=sharing
To enable the logging go to NoesisSettings and set "Log Verbosity" to "Normal" so our logs are output to Editor.log .

Thanks for your collaboration.
samc

samc

2020-05-27 23:43

reporter   ~0006400

I got a crash immediately upon starting unity with the DLL you gave me. Re-ran and no crash. Not sure why?

However, I then tried play mode and got the same crash as before. I've attached both crash reports here.

Will try to see what's going on and if I can make a smaller repro case.

Crash_2020-05-27_214010072.zip (969,913 bytes)
Crash_2020-05-27_213622401.zip (658,417 bytes)
samc

samc

2020-05-27 23:44

reporter   ~0006401

Forgot to mention it, but I did turn the logging level to "normal" as advised.
sfernandez

sfernandez

2020-05-28 01:07

manager   ~0006402

I generated a new library with more logs on the code that seems to be the cause of the problem.
Could you please check again: https://drive.google.com/file/d/19ivzgVZ4jq2gQ57BIIzhzss0EBABA_b4/view?usp=sharing

Sorry for the inconvenience.
samc

samc

2020-05-28 02:08

reporter   ~0006403

Ok, attached the crash. Relevant logs:

[noesis] 'Assets/Scripts/Runtime/Client/UI/Themes/TorchTheme.Colors.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/Themes/TorchTheme.Brushes.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/Themes/TorchTheme.Fonts.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/Themes/TorchTheme.Styles.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/Themes/TorchTheme.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUD Icons.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUD Icons.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUD Templates.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUDInteractView.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUDDevStatsView.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUDEquipmentSwapView.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUDAbilityView.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUDAbilityView.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUDAbilityView.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUDAbilityView.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUDAbilityView.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUDGameStateView.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUDPaperDollView.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/Ascension Templates.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/AscensionMapView.xaml' loaded
[noesis] 'Assets/Scripts/Runtime/Client/UI/HUD/HUD.xaml' loaded
[noesis] View.UpdateRoot: 1
[noesis] Renderer.UpdateRenderTree
[noesis] Renderer.RendererQueue: Read=0, Write=0
[noesis] RenderTree.NeedsOffscreen

Crash_2020-05-28_000428086.zip (912,966 bytes)
samc

samc

2020-05-28 02:15

reporter   ~0006404

We have a few modifications to the Noesis C# code; I don't think these are the cause but I'm not 100% sure (sorry I wasn't more clear about this earlier).

We have added an option so we can explicitly tell our Noesis View when to update rather than in LateUpdate() (our game is written in DOTS so we needed a custom place to trigger the update). The other change is that we added a couple methods on NoesisView so we could render from a custom SRP render pass.

Here is the relevant code changes we made:

Noesis View:

    public void RenderOffScreenHD(CommandBuffer cmd)
    {
        if (_uiView != null && _visible)
        {
            NoesisRenderer.RenderOffscreen(_uiView, cmd);
        }
    }
    public void RenderOnScreenHD(CommandBuffer cmd)
    {
        if (_uiView != null && _visible)
        {
            NoesisRenderer.RenderOnscreen(_uiView, true, cmd);
            _updatePending = true;
        }
    }


Our custom render pass:


using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
public abstract class NoesisRenderPass : CustomPass
{
    protected NoesisView View;
    protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera camera, CullingResults cullingResult)
    {
        if (View == null)
        {
            View = camera.camera.GetComponent<NoesisView>();
        }
    }
}
public class NoesisOnScreenRenderPass : NoesisRenderPass
{
    protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera camera, CullingResults cullingResult)
    {
        base.Execute(renderContext, cmd, camera, cullingResult);
        if (View != null)
        {
            View.RenderOnScreenHD(cmd);
        }
    }
}
public class NoesisOffScreenRenderPass : NoesisRenderPass
{
    protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera camera, CullingResults cullingResult)
    {
        base.Execute(renderContext, cmd, camera, cullingResult);
        if (View != null)
        {
            View.RenderOffScreenHD(cmd);
        }
    }
}

I am trying to make a minimal example that takes advantage of these changes to see if that reproduces the bug because just using 2019.3.14f1 with the default samples seems to be solid :(
samc

samc

2020-05-28 07:00

reporter   ~0006406

We removed all the custom render code we had added (not necessary anymore anyhow), but we still hit the crash.

We're happy to debug further here but we'll need to build a debug version of Noesis. I think we might have source code access.
sfernandez

sfernandez

2020-05-28 09:47

manager   ~0006407

Thanks for the help debugging this.
The logs confirmed my suspicions and I have a clear view on what is happening.
We'll fix it for the next release.

Issue History

Date Modified Username Field Change
2020-05-27 06:22 samc New Issue
2020-05-27 06:22 samc Tag Attached: Unity
2020-05-27 06:22 samc File Added: Crash_2020-05-27_041253606.zip
2020-05-27 10:21 sfernandez Assigned To => sfernandez
2020-05-27 10:21 sfernandez Status new => assigned
2020-05-27 14:03 sfernandez Status assigned => feedback
2020-05-27 14:03 sfernandez Note Added: 0006395
2020-05-27 16:48 sfernandez Note Added: 0006396
2020-05-27 23:43 samc File Added: Crash_2020-05-27_214010072.zip
2020-05-27 23:43 samc File Added: Crash_2020-05-27_213622401.zip
2020-05-27 23:43 samc Note Added: 0006400
2020-05-27 23:43 samc Status feedback => assigned
2020-05-27 23:44 samc Note Added: 0006401
2020-05-28 01:07 sfernandez Status assigned => feedback
2020-05-28 01:07 sfernandez Note Added: 0006402
2020-05-28 02:08 samc File Added: Crash_2020-05-28_000428086.zip
2020-05-28 02:08 samc Note Added: 0006403
2020-05-28 02:08 samc Status feedback => assigned
2020-05-28 02:15 samc Note Added: 0006404
2020-05-28 07:00 samc Note Added: 0006406
2020-05-28 09:47 sfernandez Note Added: 0006407
2020-05-28 11:22 jsantos Target Version => 3.0.1
2020-05-28 11:22 jsantos Description Updated View Revisions
2020-05-28 11:22 jsantos Steps to Reproduce Updated View Revisions
2020-05-28 11:23 sfernandez Status assigned => resolved
2020-05-28 11:23 sfernandez Resolution open => fixed
2020-05-28 11:23 sfernandez Fixed in Version => 3.0.1