wolfpld / tracy

Frame profiler
https://tracy.nereid.pl/
Other
10.25k stars 692 forks source link

Fix achievement mgr crashing on uninitialized data #834

Closed Aldarrion closed 4 months ago

Aldarrion commented 4 months ago

Both the achievement manager and the achievement data were globals in separate compilation units. Order of initialization is not defined in that case which sometimes caused the mgr to load uninitialized data and crash when an achievement should have been achieved but was not found.

wolfpld commented 4 months ago

What's the impact of the issue you are fixing here?

Aldarrion commented 4 months ago

If the linker decides to link in a way where the mgr is constructed first we don't have correct achievement data. It does not happen in your pre-build binaries but when I've built locally on Windows/Debug it happened to me. Opening global settings asserted on missing achievement and crashed.

wolfpld commented 4 months ago

It does not happen in your pre-build binaries

Ok, so no new release is needed.

Aldarrion commented 4 months ago

Yes, fortunately not :) But it will prevent potential issues in future releases.