peterh
Topic Author
Posts: 33
Joined: 13 Mar 2015, 13:50

Diagnosing "[noesis] Visual is not a descendant of the specified ancestor"

22 Jan 2021, 12:48

After upgrading our project to 3.0, some of our popup views have been spamming the error message:
Visual is not a descendant of the specified ancestor
I know of some of the various ways this can occur, but am at a loss as to how to track where this occurs. Is there a way to track what component triggers the error? Would it be possible to improve the error message to something more useful (e.g. concrete type of the Visual, information about the specified ancestor)?

Tags:
 
User avatar
sfernandez
Site Admin
Posts: 2166
Joined: 22 Dec 2011, 19:20

Re: Diagnosing "[noesis] Visual is not a descendant of the specified ancestor"

25 Jan 2021, 11:52

Are those messages being shown when using Popups normally (by changing its IsOpen property and interacting with them), or are the messages showing when you call in code functions like TransformToAncestor or TransformToDescendant? What is the callstack of the error message in Unity console?

We can improve the error message by adding the type of the visual and the ancestor. I think you have access to source code, so until we release a new version you can change it yourself in Visual.cpp line 1077:
NS_CHECK(visual == ancestor, "Visual '%s' is not a descendant of the specified ancestor '%s'",
        GetClassType()->GetName(), ancestor->GetClassType()->GetName());
 
peterh
Topic Author
Posts: 33
Joined: 13 Mar 2015, 13:50

Re: Diagnosing "[noesis] Visual is not a descendant of the specified ancestor"

25 Jan 2021, 15:29

Are those messages being shown when using Popups normally (by changing its IsOpen property and interacting with them), or are the messages showing when you call in code functions like TransformToAncestor or TransformToDescendant?
The messages are shown when opening popups with certain content. We don't get it for every popup we use, so it's definitely content-dependent.
What is the callstack of the error message in Unity console?
NoesisUnity:UnityLog(Int32, String) (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:146)
Noesis.View:Noesis_View_Update(HandleRef, Double)
Noesis.View:Update(Double) (at Assets/NoesisGUI/Plugins/API/Core/View.cs:297)
We can improve the error message by adding the type of the visual and the ancestor. I think you have access to source code, so until we release a new version you can change it yourself in Visual.cpp line 1077:
NS_CHECK(visual == ancestor, "Visual '%s' is not a descendant of the specified ancestor '%s'",
        GetClassType()->GetName(), ancestor->GetClassType()->GetName());
Thanks, I'll try that!
 
User avatar
sfernandez
Site Admin
Posts: 2166
Joined: 22 Dec 2011, 19:20

Re: Diagnosing "[noesis] Visual is not a descendant of the specified ancestor"

26 Jan 2021, 11:27

It was a bug in Noesis when using a TextBox inside a Popup, the message was thrown by caret rendering code.
The issue is fixed for next release.

Who is online

Users browsing this forum: Bing [Bot] and 5 guests