alaplace
Topic Author
Posts: 8
Joined: 29 Nov 2017, 19:54

Problem with continuous integration, noesis(v2.1.0b15) and unity project on git

16 Jan 2018, 18:51

Hello! We are getting trouble trying to get a unity3d project working in a continuous integration flow. The problem is that we need to push the button "Reimport all" in noesis settings to get the project working properly after pulling the last changes or checking out a branch from the git repository.
We are getting exceptions like:
• EntryPointNotFoundException: Noesis_SetXamlProvider
Noesis.GUI.Noesis_SetXamlProvider_ (HandleRef provider) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:250)
or
• NoesisException: Xaml provider not set
Noesis.Error.Check () (at Assets/NoesisGUI/Plugins/API/Core/NoesisError.cs:16)
We can fix that pressing the Reimport all button, but only in the editor.
When the continuous integration that compiles the unity game release tries to compile the project automatically, without interaction, the .exe doesn't run or the controls created do not appear. In addition, when another team member has to keep working with the project, he has to push that button and commit the .assets modified before starting.
We’ve tried to use the NoesisSettings configurations to import the xamls by adding them to the Preloaded Xamls list and the Application Resources attribute to set a resource dictionary with the fonts, colors and styles. After pulling the repository or cleaning the working directory from git and opening Unity, the NoesisSettings asset is overridden with the default configurations, losing the configurations that might solve the Reimport All issue.
This issue can be replicated using the following steps:
• Create a new Unity project
• Import the noesis package
• Change a configuration in the Noesis Setting panel, save and close Unity
• Commit project, including the modified Noesis Settings
• Clean the working directory or push and clone the repository
• Open Unity (you will see several errors and the Noesis Setting will reset).
Thank you in advance.
 
User avatar
jsantos
Site Admin
Posts: 2900
Joined: 20 Jan 2012, 17:18
Contact:

Re: Problem with continuous integration, noesis(v2.1.0b15) and unity project on git

16 Jan 2018, 19:22

Is this related to your previous thread? (seems to be) Did you try my proposed solution?
 
alaplace
Topic Author
Posts: 8
Joined: 29 Nov 2017, 19:54

Re: Problem with continuous integration, noesis(v2.1.0b15) and unity project on git

17 Jan 2018, 16:15

Before we tried to follow another aproach to use the library, trying to copy the xaml files and its resources every time that we compile the project. Now we are following the oficial tutorial instructions. With the last updates of noesis several error were fixed, but we got some new ones that get fixed when we reimport all.
The last time you adviced to us to use this code
NoesisPostprocessor.ImportAllAssets();
We tried that unsuccesfully, we don't know where to put that snippet in order to get the proccess working properly. We tried putting that in an AssetPostprocessor script but didn't help.
Can you tell us where to place it?
 
User avatar
jsantos
Site Admin
Posts: 2900
Joined: 20 Jan 2012, 17:18
Contact:

Re: Problem with continuous integration, noesis(v2.1.0b15) and unity project on git

17 Jan 2018, 16:56

I would like to reproduce the issue, but for that I need very detailed instructions starting from an empty project and avoiding external dependencies in the description of each step (so instead of 'commiting' or generic terms like that I need you to indicate me what files should be removed).
 
alaplace
Topic Author
Posts: 8
Joined: 29 Nov 2017, 19:54

Re: Problem with continuous integration, noesis(v2.1.0b15) and unity project on git

17 Jan 2018, 18:49

We create a repository for you see our problem.
https://github.com/Chimangoo/NoesisGUISample
This contains the complete noesis package, a git ignore file, the same that we are using in our project, and a file called "CrashReport.txt" with the unity editor log when it crashes.
If you try to open the unity project, a few exception will appear:
NullReferenceException: Object reference not set to an instance of an object
ControlGallery.MainWindow.LoadXaml (System.String xaml) (at Assets/NoesisGUI/Samples/ControlGallery/MainWindow.xaml.cs:137)
ControlGallery.MainWindow.OnInitialized (System.Object sender, Noesis.EventArgs args) (at Assets/NoesisGUI/Samples/ControlGallery/MainWindow.xaml.cs:40)
Noesis.FrameworkElement.RaiseInitialized (IntPtr cPtr, IntPtr sender, IntPtr e) (at Assets/NoesisGUI/Plugins/API/Proxies/FrameworkElement.cs:247)
UnityEngine.Debug:LogException(Exception)
Noesis.Error:SetNativePendingError(Exception) (at Assets/NoesisGUI/Plugins/API/Core/NoesisError.cs:35)
Noesis.FrameworkElement:RaiseInitialized(IntPtr, IntPtr, IntPtr) (at Assets/NoesisGUI/Plugins/API/Proxies/FrameworkElement.cs:252)
Noesis.View:Noesis_View_Create(HandleRef)
Noesis.View:Noesis_View_Create_(HandleRef) (at Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:383)
Noesis.View:.ctor(FrameworkElement) (at Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:368)
Noesis.GUI:CreateView(FrameworkElement) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:145)
NoesisXamlEditor:CreatePreviewGUIView() (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:53)
NoesisXamlEditor:RenderStaticPreview(String, Object[], Int32, Int32) (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:224)
UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[], String)
NoesisException: Object reference not set to an instance of an object
Noesis.Error.Check () (at Assets/NoesisGUI/Plugins/API/Core/NoesisError.cs:16)
Noesis.View.Noesis_View_Create_ (HandleRef content) (at Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:384)
Noesis.View..ctor (Noesis.FrameworkElement content) (at Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:368)
Noesis.GUI.CreateView (Noesis.FrameworkElement content) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:145)
NoesisXamlEditor.CreatePreviewGUIView () (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:53)
UnityEngine.Debug:LogException(Exception)
NoesisXamlEditor:CreatePreviewGUIView() (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:60)
NoesisXamlEditor:RenderStaticPreview(String, Object[], Int32, Int32) (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:224)
UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[], String)
And if you try to open a scene from '/Assets/NoesisGUI/Samples' and press play, the first execution will fail. Our unity editor crash (see "CrashReport.txt").
Additionally "NoesisSample/Assets/NoesisGUI/Settings/Resources/NoesisSettings.asset" and "NoesisSample/Assets/NoesisGUI/Settings/Resources/NoesisSettings.asset.meta" are modified
if you reopen unity editor and select a scene from '/Assets/NoesisGUI/Samples', then it will run correctly.
 
alaplace
Topic Author
Posts: 8
Joined: 29 Nov 2017, 19:54

Re: Problem with continuous integration, noesis(v2.1.0b15) and unity project on git

29 Jan 2018, 21:10

Last week we were trying several things; we get some progress but the project it’s still not working properly.
Solution 1) We tried to put all the styles, fonts and colors into the code of the controls to avoid using a theme, in this case the application crashes in the first execution of Unity and works in the following.
Solution 2) We are using system fonts, merging all the resource dictionaries into one and using it in the Application Theme attribute from NoesisSettings, changing all static resources to dynamic. At the moment we are having problems with the NoesisSetting file. Every time that we open the unity project, NoesisSetting is overwritten, and the configuration that we made is gone. We try to debug NoesisSettings.cs, and the first time that this line is executed
_settings = Resources.Load<NoesisSettings>("NoesisSettings");
_setting is always null (even when we know that NoesisSetting.asset exists in the directory), and then a new file is generated by default.
 
User avatar
jsantos
Site Admin
Posts: 2900
Joined: 20 Jan 2012, 17:18
Contact:

Re: Problem with continuous integration, noesis(v2.1.0b15) and unity project on git

30 Jan 2018, 05:08

_settings = Resources.Load<NoesisSettings>("NoesisSettings");
The fact that this is failing makes me think there is something wrong in your project because in that line Noesis is not involved at all. I don't know if you deleted something critical for Unity. Anyway, I din't have time to investigate this. Could you please file a report about it?
 
alaplace
Topic Author
Posts: 8
Joined: 29 Nov 2017, 19:54

Re: Problem with continuous integration, noesis(v2.1.0b15) and unity project on git

30 Jan 2018, 18:13

We fill a bug report in NoesisGUI Issue Tracker ID #0001230. We explain to you how to reproduce the situation from a clean project, and additionally we create a repository with the project already created, the same way that we create ours.
Thank you!
 
User avatar
jsantos
Site Admin
Posts: 2900
Joined: 20 Jan 2012, 17:18
Contact:

Re: Problem with continuous integration, noesis(v2.1.0b15) and unity project on git

31 Jan 2018, 05:30

Thanks for the detailed report!
 
ljromero
Posts: 1
Joined: 31 Jan 2018, 13:41

Re: Problem with continuous integration, noesis(v2.1.0b15) and unity project on git

31 Jan 2018, 13:56

Hi jsantos,
I'm having the same issue using CI in Gitlab and Github. The thing is that with this issue in place we can not use NOESIS in a project with CI.

We can not use the "Reimport all" option in our automated continuous integration process. We tested it using the latest version of NOESIS and Unity.

Note: We replicated the steps mentioned by alaplace using his Repo: https://github.com/Chimangoo/NoesisGUISample.

Who is online

Users browsing this forum: No registered users and 1 guest