View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002529 | NoesisGUI | Unity3D | public | 2023-03-08 16:48 | 2023-04-14 19:54 |
Reporter | stonstad | Assigned To | jsantos | ||
Priority | normal | Severity | block | Reproducibility | always |
Status | resolved | Resolution | unable to reproduce | ||
Product Version | 3.1.7 | ||||
Summary | 0002529: After Noesis 3.1.7 Upgrade, Noesis Fails to Find XAML files | ||||
Description | This is a reoccurring problem I see with Noesis. Currently, I'm impacted with MBI after upgrading to 3.1.7. The file pathing is correct -- it worked before but it no longer works after an upgrade. [NOESIS/E] (41): Xaml not found 'Assets/User Interface/Controls/DimensioningControl.xaml' Things I have tried include: * Reimporting * Deleting existing .meta and reimporting. * Restarting Unity * Check for missing forward refrences in top-level XAML * Curse! | ||||
Steps To Reproduce | [NOESIS/E] (41): Xaml not found 'Assets/User Interface/Controls/DimensioningControl.xaml' UnityEngine.Debug:LogError (object,UnityEngine.Object) NoesisUnity:UnityLog (int,string) (at C:/Source/MBI.CustomerSelect.Unity/MBI.customerSelect.Unity.Utilities/Noesis/Noesis 3.1.7/Runtime/NoesisUnity.cs:357) Noesis.GUI:LoadComponent (object,string) (at C:/Source/MBI.CustomerSelect.Unity/MBI.customerSelect.Unity.Utilities/Noesis/Noesis 3.1.7/Runtime/API/Core/NoesisGUI.cs:326) MBI.CustomerSelect.Unity.UI.DimensioningControl:InitializeComponent () (at Assets/User Interface/Controls/DimensioningControl.cs:44) MBI.CustomerSelect.Unity.UI.DimensioningControl:.ctor () (at Assets/User Interface/Controls/DimensioningControl.cs:28) (wrapper dynamic-method) object:lambda_method (System.Runtime.CompilerServices.Closure) Noesis.Extend:CreateInstance (intptr,intptr) (at C:/Source/MBI.CustomerSelect.Unity/MBI.customerSelect.Unity.Utilities/Noesis/Noesis 3.1.7/Runtime/API/Core/Extend.cs:5483) Noesis.GUI:LoadComponent (object,string) (at C:/Source/MBI.CustomerSelect.Unity/MBI.customerSelect.Unity.Utilities/Noesis/Noesis 3.1.7/Runtime/API/Core/NoesisGUI.cs:326) MBI.CustomerSelect.Unity.UI.MainControl:InitializeComponent () (at Assets/User Interface/MainControl.cs:101) MBI.CustomerSelect.Unity.UI.MainControl:.ctor () (at Assets/User Interface/MainControl.cs:94) (wrapper dynamic-method) object:lambda_method (System.Runtime.CompilerServices.Closure) Noesis.Extend:CreateInstance (intptr,intptr) (at C:/Source/MBI.CustomerSelect.Unity/MBI.customerSelect.Unity.Utilities/Noesis/Noesis 3.1.7/Runtime/API/Core/Extend.cs:5483) Noesis.GUI:LoadXaml (System.IO.Stream,string) (at C:/Source/MBI.CustomerSelect.Unity/MBI.customerSelect.Unity.Utilities/Noesis/Noesis 3.1.7/Runtime/API/Core/NoesisGUI.cs:274) NoesisXaml:Load () (at C:/Source/MBI.CustomerSelect.Unity/MBI.customerSelect.Unity.Utilities/Noesis/Noesis 3.1.7/Runtime/NoesisXaml.cs:17) NoesisView:LoadXaml (bool) (at C:/Source/MBI.CustomerSelect.Unity/MBI.customerSelect.Unity.Utilities/Noesis/Noesis 3.1.7/Runtime/NoesisView.cs:489) NoesisView:OnEnable () (at C:/Source/MBI.CustomerSelect.Unity/MBI.customerSelect.Unity.Utilities/Noesis/Noesis 3.1.7/Runtime/NoesisView.cs:623) MBI.CustomerSelect.Unity.Assets.StartScript:Awake () (at Assets/Scripts/Global/StartScript.cs:124) | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
This was fixed by 1) restarting Unity, 2) reimporting each folder individually BEFORE clicking play. This is quite annoying! :) | |
Nevermind -- error behavior returned after subsequent play. |
|
Deleting all .asset files, reimporting, restarting through Noesis core dumps/crashes, and it might be working again. Not great. | |
Is "DimensioningControl.xaml" listed as a dependency in other XAML? We can only load XAML that are loaded by the View itself or any of its dependencies. Deleting all .asset files Is this coming from a very old version of Noesis? We are no longer using .assets files at all. So removing them shouldn't change anything at all. |
|
Yes, DimensioningControl.xaml is forward referenced in the top-level XAML file. <noesis:Dependency Source="/Assets/User Interface/Controls/DimensioningControl.xaml"/> I can confirm the file paths are correct. This is an issue that I see with every upgrade of Noesis across both MBI and Stellar Conquest. It is never entirely clear to me why the error goes away. Reimporting, restarting, and reimporting again until the errors goes away is the usual fix. I think you have seem this reported from me in the past. With today's upgrade of MBI from 3.0.x to 3.1.7 it was the same workflow to work around the bug -- just restarting and reimporting until the error goes away. When the error message is shown -- is that directly from a file exists check, or is it an abstracted check, i.e. checking if the file exists in an imported XAML dictionary? I think an underlying process fails to import the file, and that is the source of the file error. If the logging statement directly follows a file exists check my theory is poor. |
|
The error happens when the XAML is not correctly marked as a dependency of the scene. Meaning that if you create a standalone player with Unity, the XAML won't be included in the list of assets (https://forum.unity.com/threads/getting-list-of-all-assets-in-build.620809/). During the editor, this can work "sometimes' if for example, the XAML was recently built or previewed. To include a XAML in the scene it must be directly used by a view include in the scene, used as public property of any monobehaviour included in the scene, or be a dependency of another XAML already included in the scene. |
|
Yes, DimensioningControl.xaml is forward referenced in the top-level XAML file. Have you verified DimensioningControl.xaml is listed as a dependency in the Inspector (dependencies section) of the top-level Xaml? |
|
The DimensioningControl.xaml class appears in the XAMLs dependencies (see below). I made no code changes. The specific bug at work here is that, sometimes, a XAML dependency is not loaded but should be. Reimporting assets and restarting Unity shouldn't be necessary when the behavior manifests. |
|
Reimporting assets and restarting Unity is not fixing anything, I am pretty sure. You are being lucky. Who is referencing that Main Control ? Is that control part of the dependencies of another XAML, and so on untill you reach the XAML in the View of the scene? |
|
For this project, MainControl is the top-level UI UserControl. It is not part of dependencies of another control. I can confirm that the aforementioned DimensioningControl is forward declared. This isn't an active issue because the problem has gone away. Even if I restart Unity, the problem is resolved. It only manifests on Noesis upgrades. It affects both the MBI project and Stellar Conquest. I don't make much noise over the issue because, once it decides to start working, I no longer have issues. | |
Let me remark this, the problem has not gone away. :) you are just being lucky, I am pretty sure. "MainControl is the top-level UI UserControl." This means that MainControl.xaml is assigned to a View right? When you get the error of XAML not found, have you verified at that point that building a standalone player is included that XAML (https://forum.unity.com/threads/getting-list-of-all-assets-in-build.620809/)? because I think it is not being included, and that means the XAML is not properly referenced. I assume we cannot reproduce this in a clean and small project right? |
|
Compiled builds work without an issue. > I assume we cannot reproduce this in a clean and small project right? Right. Cleaning a project and/or reimporting seems to be part of the fix. |
|
I am going to close this. Please, create a new ticket if you find this again on 3.2 | |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-03-08 16:48 | stonstad | New Issue | |
2023-03-08 16:50 | stonstad | Note Added: 0008329 | |
2023-03-08 16:51 | stonstad | Note Added: 0008330 | |
2023-03-08 16:51 | stonstad | Note Edited: 0008330 | |
2023-03-08 16:52 | stonstad | Note Added: 0008331 | |
2023-03-08 16:52 | stonstad | File Added: image.png | |
2023-03-08 16:55 | stonstad | Note Added: 0008332 | |
2023-03-08 22:31 | jsantos | Note Added: 0008334 | |
2023-03-08 22:31 | jsantos | Assigned To | => jsantos |
2023-03-08 22:31 | jsantos | Status | new => feedback |
2023-03-08 22:32 | jsantos | Note Edited: 0008334 | |
2023-03-08 22:34 | jsantos | Note Edited: 0008334 | |
2023-03-08 22:34 | jsantos | Note Edited: 0008334 | |
2023-03-08 23:58 | stonstad | Note Added: 0008335 | |
2023-03-08 23:58 | stonstad | Status | feedback => assigned |
2023-03-27 15:05 | jsantos | Note Added: 0008359 | |
2023-03-27 15:09 | jsantos | Note Added: 0008360 | |
2023-03-27 15:09 | jsantos | Note Edited: 0008360 | |
2023-03-27 15:09 | jsantos | Status | assigned => feedback |
2023-03-27 16:34 | stonstad | Note Added: 0008361 | |
2023-03-27 16:34 | stonstad | File Added: image-2.png | |
2023-03-27 16:34 | stonstad | Status | feedback => assigned |
2023-03-27 19:09 | jsantos | Note Added: 0008362 | |
2023-03-27 19:09 | jsantos | Status | assigned => feedback |
2023-04-12 23:17 | stonstad | Note Added: 0008419 | |
2023-04-12 23:17 | stonstad | Status | feedback => assigned |
2023-04-13 14:06 | jsantos | Note Added: 0008425 | |
2023-04-13 14:06 | jsantos | Status | assigned => feedback |
2023-04-13 17:18 | stonstad | Note Added: 0008426 | |
2023-04-13 17:18 | stonstad | Status | feedback => assigned |
2023-04-14 19:54 | jsantos | Status | assigned => resolved |
2023-04-14 19:54 | jsantos | Resolution | open => unable to reproduce |
2023-04-14 19:54 | jsantos | Note Added: 0008437 |