nokola
Topic Author
Posts: 188
Joined: 10 Mar 2015, 05:29

Re: Noesis 2.0.2 crash on reimport all with invalid XAML

23 May 2017, 06:40

Fixed in Noesis 2.0.2f2 - thanks a lot for the fast update!
 
nikobarli
Posts: 178
Joined: 26 Apr 2017, 06:23

Re: Noesis 2.0.2 crash on reimport all with invalid XAML

24 May 2017, 04:24

With 2.0.2f2, my application (using C++ SDK) no longer crashes when loading XAML but now showing error: Calling thread(26844) doesn't have access to this object (16572).

26844 is a renderer thread calling IView::Update(t).
16572 is the UI thread of the application.

I know that this is because you enforced the checking that an object may only be accessed from the same thread that created it. Is there any option to relax this ?

I am evaluating an architecture that splits Renderer thread apart from the UI thread. UI thread handles UI events and update XAML element accordingly. Renderer thread periodically polls for updates and renders the XAML when necessary (at max 60 fps, sync with the display). Our application have strict performance requirements so that we want to make UI thread available as much as possible.

In 2.0.1f1, I manually do mutual exclusion between Ui/Renderer threads when accessing Noesis layer and it worked fine. Compared to WPF, we can do much more things on UI thread and that made me think that Noesis will be a good UI platform for our application. However, the above enforcement made this advantage disappears because now I need to handle the rendering on UI thread.
 
User avatar
ai_enabled
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: Noesis 2.0.2 crash on reimport all with invalid XAML

24 May 2017, 05:22

@nikobarli this is a bug. NoesisGUI 2.0 was spefically redesigned to support decoupling of the update and rendering threads. Please report the bug in the bugtracker (better with the source code) to get support from the NoesisGUI team ASAP.
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
nikobarli
Posts: 178
Joined: 26 Apr 2017, 06:23

Re: Noesis 2.0.2 crash on reimport all with invalid XAML

24 May 2017, 08:18

Looking at this documentation: http://www.noesisengine.com/docs/Gui.Co ... orial.html
This may be by design that I shouldn't call IView::Update(t) from Render thread, but call it from UI thread instead.

But then, I need to periodically invoke my UI thread just to call the IView::Update(t). Seems that I am missing something ...

# And sometimes IView::Update(t) latency is quite high (e.g. when updating large ListView, up to ~100 ms) and I don't want to waste my UI thread for that.
 
User avatar
sfernandez
Site Admin
Posts: 1918
Joined: 22 Dec 2011, 19:20

Re: Noesis 2.0.2 crash on reimport all with invalid XAML

24 May 2017, 23:08

The call to IView::Update(t) must be part of the UI thread as it accesses and modifies UI objects (updates animation and layout). Just remark that this function has nothing to do with the render.
Only IRenderer functions (UpdateRenderTree, RenderOffscreen and Render) can be called from a different (render) thread.

We cannot allow having Update and event handling in different threads because it will require us to protect all property modifcations and internal structures for concurrent access, and this seems worse than actual approach.
 
nikobarli
Posts: 178
Joined: 26 Apr 2017, 06:23

Re: Noesis 2.0.2 crash on reimport all with invalid XAML

25 May 2017, 01:59

Thanks. I can understand the reason. Will modify my code to follow the architecture.
 
User avatar
jsantos
Site Admin
Posts: 2906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Noesis 2.0.2 crash on reimport all with invalid XAML

25 May 2017, 22:08

To avoid latency a few clients are moving the UI to a different thread. That way, they have the Application thread, UI thread (where noesis update is called) and Render thread (where noesis render is called). Normally you won't need this complexity. If you are getting such bad performance in Update() please report it and we will investigate what's going on.

Who is online

Users browsing this forum: No registered users and 1 guest