View Issue Details

IDProjectCategoryView StatusLast Update
0005101NoesisGUIUnitypublic2026-06-27 09:00
ReporterYolkin Games Assigned To 
PrioritynormalSeveritycrash 
Status newResolutionopen 
Product Version3.2.13 
Summary0005101: Static class with DependencyProperty field initializers crashes the standalone Player on startup
Description
  • Repro: A static class whose static fields are DependencyProperty.Register(...) / RegisterAttached(...) initializers, where some method on that class is marked [RuntimeInitializeOnLoadMethod(...)] (any RuntimeInitializeLoadType).
  • Result: Editor runs fine. The standalone Player exits silently ~1s after launch. Player.log ends on the class's .cctor frame followed by a Noesis_UIPropertyMetadata_Create native access violation.
  • Diagnosis: The [RuntimeInitializeOnLoadMethod] hook forces the class's static constructor to run before the Noesis native runtime is initialized. All field initializers execute, including the Register(...)/RegisterAttached(...) calls, which P/Invoke into uninitialized native and AV. The Editor happens to have native up earlier, hiding it — an Editor-vs-Player asymmetry that only bites in builds.
  • Why a bug, not a usage error: registering a DependencyProperty is a normal operation; doing it "too early" silently crashing the Player (rather than throwing a catchable managed "Noesis not initialized yet" error) is a native-robustness defect. A guarded managed error would turn a build-only multi-hour investigation into a one-line fix. This is the "no native-absent guard" family applied to uninitialized (rather than stripped) native.
  • Severity: High (build-only silent crash, no managed diagnostic).
  • Unblocks dropping workaround: we lazy-wire such registrations behind a flag triggered from a Noesis-side event so the .cctor can't run pre-init. A managed guard that throws a catchable error (or defers registration until native is up) removes the need for that dance.
PlatformWindows

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-06-27 08:50 Yolkin Games New Issue
2026-06-27 09:00 Yolkin Games Summary Static class containing DependencyProperty field initializers crashes the standalone Player on startup => Static class with DependencyProperty field initializers crashes the standalone Player on startup
2026-06-27 09:00 Yolkin Games Description Updated