Jan
Topic Author
Posts: 5
Joined: 23 May 2017, 17:09

Crash on RegisterProperty<Noesis::Vector2f>

28 Nov 2017, 13:40

Hi,

I'm trying to create a Vector2f DependencyProperty. I already have multiple working DependencyProperties, for example also a Vector3f one which you can see below ("CurrentPos"). Those all work.
data->RegisterProperty<Noesis::Vector3f>(CurrentPosProperty, "CurrentPos", Noesis::FrameworkPropertyMetadata::Create<Noesis::Vector3f>(Noesis::Vector3f::Zero(), Noesis::FrameworkOptions_None));
		data->RegisterProperty<Noesis::Vector2f>(SizeProperty, "Size", Noesis::FrameworkPropertyMetadata::Create<Noesis::Vector2f>(Noesis::Vector2f::Zero(), Noesis::FrameworkOptions_None));
But the call to register the Vector2f DependencyProperty called "Size" just crashes with the following stack trace (Unhandled exception at 0x00007FFBBAD278D0 (Noesis.dll) in EnscapeClient.exe: Fatal program exit requested.):
 	Noesis.dll!00007ffbbad278d0()	Unknown	No symbols loaded.
 	Noesis.dll!00007ffbbaa35192()	Unknown	No symbols loaded.
 	Noesis.dll!00007ffbbaa3c8e8()	Unknown	No symbols loaded.
 	Enscape.dll!Noesis::Core::Boxed<Noesis::Math::Vector2<float> >::StaticGetClassType(Noesis::Core::T2T<Noesis::Core::Boxed<Noesis::Math::Vector2<float> > > * __formal) Line 95	C++	Symbols loaded.
 	Enscape.dll!Noesis::Core::Reflection::DynamicCast::Apply<Noesis::Core::Boxed<Noesis::Math::Vector2<float> >,Noesis::Core::BaseComponent>(Noesis::Core::BaseComponent * ptr) Line 53	C++	Symbols loaded.
 	Enscape.dll!Noesis::Core::Reflection::InternalDynamicCast<Noesis::Core::Boxed<Noesis::Math::Vector2<float> >,Noesis::Core::BaseComponent>(Noesis::Core::BaseComponent * ptr, Noesis::Core::Int2Type<0> __formal) Line 66	C++	Symbols loaded.
 	Enscape.dll!NsDynamicCast<Noesis::Core::Boxed<Noesis::Math::Vector2<float> > * __ptr64,Noesis::Core::BaseComponent * __ptr64>(Noesis::Core::BaseComponent * ptr) Line 100	C++	Symbols loaded.
 	Enscape.dll!Noesis::Gui::BoxingUtils::CheckType<Noesis::Math::Vector2<float> >(const Noesis::Core::Ptr<Noesis::Core::BaseComponent> & value, const Noesis::Core::Type * __formal, Noesis::Core::Int2Type<0> __formal) Line 57	C++	Symbols loaded.
 	Enscape.dll!Noesis::Gui::BoxingUtils::CheckType<Noesis::Math::Vector2<float> >(const Noesis::Core::Ptr<Noesis::Core::BaseComponent> & value, const Noesis::Core::Type * type) Line 77	C++	Symbols loaded.
 	Enscape.dll!Noesis::Gui::DependencyData::CheckMetadata<Noesis::Math::Vector2<float> >(Noesis::Gui::PropertyMetadata * metadata) Line 237	C++	Symbols loaded.
 	Enscape.dll!Noesis::Gui::DependencyData::RegisterProperty<Noesis::Math::Vector2<float> >(const Noesis::Gui::DependencyProperty * & dp, const char * name, const Noesis::Core::Ptr<Noesis::Gui::PropertyMetadata> & metadata, Noesis::Gui::PropertyAccess access, const Noesis::Core::Delegate<bool __cdecl(void const *)> & validate) Line 75	C++	Symbols loaded.
 	Enscape.dll!Noesis::Gui::DependencyData::RegisterProperty<Noesis::Math::Vector2<float> >(const Noesis::Gui::DependencyProperty * & dp, const char * name, const Noesis::Core::Ptr<Noesis::Gui::PropertyMetadata> & metadata) Line 24	C++	Symbols loaded.
>	Enscape.dll!EnscapeUiDescription::MiniMapControl::StaticFillClassType<void>(Noesis::Core::TypeClassCreator & helper) Line 57	C++	Symbols loaded.
Does anyone have an idea what going wrong here? Could this be a Noesis bug? I really don't understand why it works for Vector3f, but not for Vector2f.

Kind regards,
Jan
 
User avatar
jsantos
Site Admin
Posts: 1874
Joined: 20 Jan 2012, 17:18
Contact:

Re: Crash on RegisterProperty<Noesis::Vector2f>

29 Nov 2017, 16:05

I am just trying to reproduce it here and it is working fine. I am able to register Vector2f and Vector3f dependency properties successfully. Could you please report this in the tracker and provide us a link to a minidump? That way we can easily understand what's going on.

By the way, Vector2f and Vector3f are suppose to be internal math classes, we plan to hide them in the future (and also remove internally their reflection metadata). So I recommend creating your own structs for your specific purpose. This is not going to happen soon but it will in the future as part of our commitment to reduce the API surface expose to clients.

Thanks!

Who is online

Users browsing this forum: No registered users and 3 guests