armory3d / armory

3D Engine with Blender Integration
https://armory3d.org
zlib License
3.06k stars 315 forks source link

[hashlink] DebugConsole: expanding RigidBody Attributes will crash #2405

Open sh-dave opened 2 years ago

sh-dave commented 2 years ago

The attributes will show in Krom builds, but crash in hashlink.

Blender: 2.93.5 Armory: armsdk 001142f923608ea8b2d56a1a353d6613f30166cc (with some unrelated manual merges) OS: debian 9

MoritzBrueckner commented 2 years ago

Can confirm this on Windows as well.

For the RigidBody trait the first attribute that causes the crash is shape, which is an enum abstract over Int.

I guess the problem is that the result of the reflection (for displaying the value in the trait view) is typed as Dynamic and HL can't cast dynamic values to string even though it should be able to infer the underlying type (see this). Do you know if there is a way to cast dynamic values to their underlying runtime-type?

sh-dave commented 2 years ago

No sorry, i would have guessed Std.string(...) is able to take care of all that.