View Issue Details

IDProjectCategoryView StatusLast Update
0001704NoesisGUIC# SDKpublic2020-06-08 14:39
Reporterai_enabledAssigned Tosfernandez 
PrioritynormalSeverityminorReproducibilitysometimes
Status feedbackResolutionopen 
Product Version3.0.0 
Target Version3.0Fixed in Version 
Summary0001704: Errors spam on NoesisGUI Shutdown
DescriptionHi guys,
we're still using the 3.0.0 RC6 build and why investigating some logs with the game stuck on exit I've noticed that sometimes there is a massive dump of entries like:
The calling thread (18460) cannot access this object (TextBlock) because a different thread owns it (12484)
The calling thread (18460) cannot access this object (ContentPresenter) because a different thread owns it (12484)
The calling thread (7052) cannot access this object (View) because a different thread owns it (12484)

I guess it's related to the .NET finalizer thread.
TagsNo tags attached.
PlatformAny

Activities

jsantos

jsantos

2020-05-28 11:12

manager   ~0006409

Last edited: 2020-05-28 11:12

View 2 revisions

And I assume you don't have a thread (12484) that is accessing a view created in a different thread , do you?

ai_enabled

ai_enabled

2020-05-28 16:03

updater   ~0006411

@jsantos, I'm certain this cannot be the case. Our game engine is mostly single-threaded. Multiple threads are used only to load assets and perform similar loading tasks that don't affect UI or logic. The rest are kept in the main thread to keep me sane :-)

Alas, I cannot reproduce this issue. I've searched my own logs folder (with two dozens of log files for the past two weeks) and found only a single log file where this issue appeared. And it never appeared in the debug version of the game (there is a hundred of log files for the past month)...so it's very random. I will update the task when I gather more info.
jsantos

jsantos

2020-06-08 14:08

manager   ~0006429

12484, 18460 are numbers we get from the current thread ID. So I am 99% confident Noesis objects were accessed from those threads. I am not sure if we could have a bug here @sfernandez

It would be really helpful if you could dump all your thread ids to the log.
ai_enabled

ai_enabled

2020-06-08 14:23

updater   ~0006430

Could it be that the .NET finalizer thread is accessing these objects during the finalization stage? It's happening during the application shutdown only (and it's a very rare/random issue).
I will add the logging of all the thread IDs on shutdown if I notice that this issue continues.
jsantos

jsantos

2020-06-08 14:26

manager   ~0006431

Yes, that could be the reason and I would say it is a bug @sfernandez
sfernandez

sfernandez

2020-06-08 14:34

manager   ~0006432

Last edited: 2020-06-08 14:39

View 2 revisions

Unless we have a bug, all objects are released in the main frame. When a C# proxy is destroyed in the finalizer thread we enqueue the release of its reference to occur always in the main thread.
Perhaps these errors are unveiling another kind of bug. If you can provide a game build that generates those random errors I can take a look.

Issue History

Date Modified Username Field Change
2020-05-27 14:08 ai_enabled New Issue
2020-05-28 11:11 jsantos Assigned To => sfernandez
2020-05-28 11:11 jsantos Status new => assigned
2020-05-28 11:11 jsantos Target Version => 3.0
2020-05-28 11:12 jsantos Note Added: 0006409
2020-05-28 11:12 jsantos Status assigned => feedback
2020-05-28 11:12 jsantos Note Edited: 0006409 View Revisions
2020-05-28 16:03 ai_enabled Note Added: 0006411
2020-05-28 16:03 ai_enabled Status feedback => assigned
2020-06-08 14:08 jsantos Note Added: 0006429
2020-06-08 14:08 jsantos Status assigned => feedback
2020-06-08 14:23 ai_enabled Note Added: 0006430
2020-06-08 14:23 ai_enabled Status feedback => assigned
2020-06-08 14:26 jsantos Note Added: 0006431
2020-06-08 14:34 sfernandez Status assigned => feedback
2020-06-08 14:34 sfernandez Note Added: 0006432
2020-06-08 14:39 sfernandez Note Edited: 0006432 View Revisions