Re: Noesis 2.0.2 crash on reimport all with invalid XAML
Fixed in Noesis 2.0.2f2 - thanks a lot for the fast update!
Re: Noesis 2.0.2 crash on reimport all with invalid XAML
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.
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.
- ai_enabled
- Posts: 231
- Joined:
- Contact:
Re: Noesis 2.0.2 crash on reimport all with invalid XAML
@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
Re: Noesis 2.0.2 crash on reimport all with invalid XAML
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.
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.
-
sfernandez
Site Admin
- Posts: 3154
- Joined:
Re: Noesis 2.0.2 crash on reimport all with invalid XAML
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.
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.
Re: Noesis 2.0.2 crash on reimport all with invalid XAML
Thanks. I can understand the reason. Will modify my code to follow the architecture.
Re: Noesis 2.0.2 crash on reimport all with invalid XAML
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 3 guests