View Issue Details

IDProjectCategoryView StatusLast Update
0002912NoesisGUIUnitypublic2024-02-06 18:02
ReporterEvanRuiz Assigned Tojsantos  
PrioritynormalSeveritycrash 
Status resolvedResolutionno change required 
Product Version3.2.2 
Summary0002912: Crash on iOS after clicking on simple ComboBox with injection point set to "After Rendering Post Processing"
Description

I always get a crash on iOS when clicking on a ComboBox with the Noesis injection point configured to "After Rendering Post Processing". If I select "Before Rendering Post Processing" it does not crash on iOS. This is using the URP renderer.

I isolated the crash to just a simple ComboBox example in a new Unity URP project template. This does not crash in the Editor, just on iOS.

Unity Version: 2022.3.14f1
Unity Project: New 3D (URP) project template
NoesisGUI Version: 3.2.2
iOS Device: iPad Pro 12.9 (5th Generation) with M1 processor
iOS Version: 17.1.1

Log Errors in Xcode
-[MTLDebugRenderCommandEncoder validateCommonDrawErrors:]:5775: failed assertion `Draw Errors Validation
MTLDepthStencilDescriptor uses frontFaceStencil but MTLRenderPassDescriptor has a nil stencilAttachment texture
MTLDepthStencilDescriptor uses backFaceStencil but MTLRenderPassDescriptor has a nil stencilAttachment texture
'

Crash Details:
UnityFramework`::InsertCustomMarkerCallbackAndDataWithFlags():
0x10bc73778 <+0>: stp x20, x19, [sp, #-0x20]!
0x10bc7377c <+4>: stp x29, x30, [sp, #0x10]
0x10bc73780 <+8>: add x29, sp, #0x10
0x10bc73784 <+12>: mov x20, x3
0x10bc73788 <+16>: mov x19, x0
0x10bc7378c <+20>: ldr x8, [x0]
0x10bc73790 <+24>: ldr x8, [x8, #0x838]
0x10bc73794 <+28>: mov x3, x4
0x10bc73798 <+32>: mov x4, x5
0x10bc7379c <+36>: blr x8
-> 0x10bc737a0 <+40>: tbnz w20, #0x2, 0x10bc737b0 ; <+56> at GfxDevice.cpp:2573:9
UnityGfxDeviceWorker (42): signal SIGABRT

Call Stack:
UnityGfxDeviceWorker (42)#0 0x00000001dba6101c in pthread_kill ()
#1 0x00000001fdf41680 in pthread_kill ()
#2 0x000000019c5c1b90 in abort ()
#3 0x000000019c5c0e80 in
assert_rtn ()
#4 0x00000001942935a4 in MTLReportFailure.cold.1 ()
#5 0x0000000194271b8c in MTLReportFailure ()
#6 0x000000019413ee4c in _MTLMessageContextEnd ()
#7 0x00000002266a2884 in -[MTLDebugRenderCommandEncoder validateCommonDrawErrors:] ()
#8 0x00000002266a20c0 in -[MTLDebugRenderCommandEncoder validateCommonDrawErrors:instanceCount:baseInstance:maxVertexID:] ()
#9 0x00000002266a324c in -[MTLDebugRenderCommandEncoder validateDrawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:function:] ()
#10 0x00000002266a33f4 in -[MTLDebugRenderCommandEncoder drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:] ()
#11 0x0000000102f32754 in -[CaptureMTLRenderCommandEncoder drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:] ()
#12 0x000000010cd75d4c in _lldb_unnamedsymbol1639736 ()
#13 0x000000010cd7250c in
lldb_unnamed_symbol1639710 ()
#14 0x000000010cd6e1d8 in _lldb_unnamedsymbol1639680 ()
#15 0x000000010cacfa0c in
lldb_unnamed_symbol1616471 ()
#16 0x000000010cacaea4 in _lldb_unnamedsymbol1616432 ()
#17 0x000000010cad702c in
lldb_unnamed_symbol1616545 ()
#18 0x000000010cad6f88 in _lldb_unnamedsymbol1616544 ()
#19 0x000000010ccca8a8 in
lldb_unnamed_symbol1638462 ()
#20 0x000000010bc737a0 in ::InsertCustomMarkerCallbackAndDataWithFlags() at /Users/bokken/build/output/unity/unity/Runtime/GfxDevice/GfxDevice.cpp:2570
#21 0x000000010bd36764 in ::RunCommand() at /Users/bokken/build/output/unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:1534
#22 0x000000010bdbba60 in GfxDeviceWorkerAutoreleasePoolProxy at /Users/bokken/build/output/unity/unity/Runtime/GfxDevice/metal/GfxDeviceMetal.mm:5745
#23 0x000000010bd2ed6c in ::RunExt() at /Users/bokken/build/output/unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:375
#24 0x000000010bd2e918 in ::RunGfxDeviceWorker() at /Users/bokken/build/output/unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:332
#25 0x000000010b8cb728 in ::RunThreadWrapper() at /Users/bokken/build/output/unity/unity/Runtime/Threads/Thread.cpp:108
#26 0x00000001fdf3e4d4 in _pthread_start ()

Steps To Reproduce

Create new Unity 3D (URP) project template in Unity 2022.3.14f1.
Install NoesisGUI-Unity-3.2.2-Indie Unity Package (installed as embedded package in project Packages folder)
Add source files below and set as the Neosis view XAML on Main Camera.
Configure Noesis Injection Point to "After Rendering Post Processing"
Build and deploy on iOS (I used an iPad Pro 12.9 m1)
Click on ComboBox.
See Crash.

Setting injection point to "Before Rendering Post Processing" avoids the crash.

See attached project zip that I used, if that is helpful. (Noesis unity package needs to be copied back in to the Packages folder).

Here is just the simple ComboBox XAML example, if that is all you need:


SimpleComboBoxView.xaml

<UserControl x:Class="NoesisCrashTest.Assets.GUI.SimpleComboBoxView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Border x:Name="Panel" Background="#33888888" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10,10" Padding="10,5" CornerRadius="20">
<StackPanel Orientation="Horizontal">
<ComboBox Width="100" Height="50">
<Label>200%</Label>
<Label>100%</Label>
<Label>50%</Label>
</ComboBox>
</StackPanel>
</Border>
</UserControl>


SimpleComboBoxView.cs

#if UNITY_5_3_OR_NEWER
#define NOESIS
using Noesis;
using UnityEngine;
#else
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
#endif

namespace NoesisCrashTest.Assets.GUI
{
public partial class SimpleComboBoxView : UserControl
{
public SimpleComboBoxView()
{
InitializeComponent();
}

#if NOESIS
private void InitializeComponent()
{
NoesisUnity.LoadComponent(this);
}
#endif
}
}

Attached Files
NoesisCrashTest.zip (123,059 bytes)
PlatformiOS

Activities

jsantos

jsantos

2023-12-01 16:51

manager   ~0008993

Thanks for the detailed report!

jsantos

jsantos

2024-02-02 20:43

manager   ~0009160

Last edited: 2024-02-02 20:46

I was able to reproduce this, even on macOS. Unfortunately, the "Injection Point" is not very reliable and depending on configuration settings this can cause that when Unity has to render the UI, the main buffers (we need stencil) are not available. Theoretically, this could be considered a Unity bug, URP is still quite unstable and probably it will be fixed.

I found a recommended workaround though. Just create a stack of two cameras, the first one (base) with everything you have right now (including post-processing) but without Noesis, and in the second camera disable post-processing and leave only Noesis (disable also 3D-rendering by setting culling mask to None).

This configuration works ok in all iPad we have tested here.

https://www.noesisengine.com/docs/Gui.Core.Unity3DTutorial.html#universal-pipeline

EvanRuiz

EvanRuiz

2024-02-06 17:58

reporter   ~0009167

Thanks for the workaround!

Issue History

Date Modified Username Field Change
2023-12-01 16:03 EvanRuiz New Issue
2023-12-01 16:03 EvanRuiz Tag Attached: Combo box
2023-12-01 16:03 EvanRuiz Tag Attached: crash
2023-12-01 16:03 EvanRuiz Tag Attached: iOS
2023-12-01 16:03 EvanRuiz Tag Attached: Unity URP
2023-12-01 16:03 EvanRuiz File Added: NoesisCrashTest.zip
2023-12-01 16:51 jsantos Note Added: 0008993
2023-12-01 16:51 jsantos Target Version => 3.2.3
2023-12-01 16:51 jsantos Assigned To => jsantos
2023-12-01 16:51 jsantos Status new => assigned
2024-01-22 11:47 sfernandez Target Version 3.2.3 => 3.2.4
2024-01-22 11:56 jsantos Target Version 3.2.4 => 3.2.3
2024-02-02 20:43 jsantos Note Added: 0009160
2024-02-02 20:43 jsantos Status assigned => feedback
2024-02-02 20:43 jsantos Target Version 3.2.3 =>
2024-02-02 20:44 jsantos Note Edited: 0009160
2024-02-02 20:44 jsantos Note Edited: 0009160
2024-02-02 20:46 jsantos Note Edited: 0009160
2024-02-06 17:58 EvanRuiz Note Added: 0009167
2024-02-06 17:58 EvanRuiz Status feedback => assigned
2024-02-06 18:02 jsantos Status assigned => resolved
2024-02-06 18:02 jsantos Resolution open => no change required
2025-10-10 13:29 jsantos Category Unity3D => Unity