Page 1 of 1

Access Violation

Posted: 06 Nov 2017, 20:48
by RollerJesus
Hey All,

I'm really new to Noesis but I did my best to search the docs and forums for help on this before posting.

I'm working on an integration with the Duality Engine which is a component driven, 2D engine that uses OpenTK for rendering. I was able to get the Noesis dependencies (NoesisManaged.dll and Noesis.dll) in place referenced and and the project builds.

However, in my initialization, I'm getting a System.AccessViolationException on this line
Noesis.GUI.SetResourceProvider("Data");
after Noesis is initialized using
Noesis.GUI.Init();
.

I've tried several different variations for a path from the C:\ root to project references that work elsewhere (..\\GUI) but I can't get it to not give this exception.

Any help (or direction to the docs) would be appreciated.

`Patrick

Re: Access Violation

Posted: 10 Nov 2017, 10:07
by jsantos
It is almost impossible to know what's going on with the provided information.

Does our minimal integration sample work for you?

Could you provide a stack trace?

Thanks!

Re: Access Violation

Posted: 10 Nov 2017, 13:57
by RollerJesus
Unfortunately, there's nothing int he stack trace except Duality information.
Duality.dll!Duality.Components.Renderers.NoesisRenderer.OnInit(Duality.Component.InitContext context) Line 47 C#
Duality.dll!Duality.Resources.Scene.OnEntered.AnonymousMethod__54_0() Line 292 C#
Duality.dll!Duality.DualityApp.EditorGuard(System.Action action) Line 1009 C#
Duality.dll!Duality.Resources.Scene.OnEntered() Line 278 C#
Duality.dll!Duality.Resources.Scene.Current.set(Duality.Resources.Scene value) Line 89 C#
Duality.dll!Duality.Resources.Scene.SwitchTo(Duality.ContentRef<Duality.Resources.Scene> scene, bool forceImmediately) Line 167 C#
DualityEditor.exe!Duality.Editor.Sandbox.Play() Line 107 C#
DualityEditor.exe!Duality.Editor.Forms.MainForm.actionRunSandbox_Click(object sender, System.EventArgs e) Line 577 C#
[External Code]
DualityEditor.exe!Duality.Editor.Program.Main(string[] args) Line 53 C#
[External Code]
That same error occurs on any Noesis code except:
 Noesis.GUI.Init(); //Init the GUI one time           
 

Re: Access Violation

Posted: 10 Nov 2017, 14:24
by jsantos
So, the crash is happening inside
Noesis.GUI.Init();
right?

Does our minimal C# sample work for you?

Re: Access Violation

Posted: 10 Nov 2017, 14:39
by RollerJesus
The initialization executes fine.
Noesis.GUI.Init();
Any Noesis code executed after that give me an access violation in NoesisManaged.

I'm not certain which example you are referring to when you say "minimal C# sample". Link?

Re: Access Violation

Posted: 10 Nov 2017, 18:55
by sfernandez
We were referring to the samples that can be found in NoesisGUI-ManagedSDK under Src/Samples folder.

Could you please create a crash dump when you get the Access Violation and report it in our bugtracker?

Re: Access Violation

Posted: 10 Nov 2017, 19:02
by RollerJesus
I didn't realize that the source was available for the NoesisManaged.dll in the samples. I'll update my references and see if I can get more info.

Thank you!