Skip to content

Fix debug memory crash on exit in VS22 due to recent TheGlobalData refactor #1203

Open
@helmutbuhler

Description

@helmutbuhler

Since #1068 was merged, a false debug error appears during game cleanup in VS22 and in Debug mode:

Image

It's because TheGlobalData is allocated much earlier now (probably earlier than the DebugMemoryTracker) and during deallocation it complains (probably because the memory debugger doesn't know about the allocation).

I think we can fix this by changing GlobalData.cpp:
GlobalData* GlobalData::m_theOriginal = NULL;
into
GlobalData GlobalData::m_theOriginal;
and use that as storage for the first GlobalData instance.

Metadata

Metadata

Assignees

Labels

BugSomething is not working right, typically is user facingMinorSeverity: Minor < Major < Critical < BlockerThisProjectThe issue was introduced by this project, or this task is specific to this project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions