Skip to content

Fix assertion error in ent_info command - #2089

Open
Tkain wants to merge 1 commit into
ValveSoftware:masterfrom
Tkain:ent-info-assert-fix
Open

Tkain wants to merge 1 commit into
ValveSoftware:masterfrom
Tkain:ent-info-assert-fix

Conversation

@Tkain

@Tkain Tkain commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Description

To read an entity type's datadesc map, the ent_info console command briefly instantiates an entity of that type. It then disposes of that entity by delete-ing its pointer. This causes the following assertion to fail:

// In debug make sure that we don't call delete on an entity without setting
// the disable flag first!
// EHANDLE accessors will check, in debug, for access to entities during destruction of
// another entity.
// That kind of operation should only occur in UpdateOnRemove calls
// Deletion should only occur via UTIL_Remove(Immediate) calls, not via naked delete calls
Assert( g_bDisableEhandleAccess );

As the above comment helpfully suggests, this PR fixes this error by replacing ent_info's pointer deletion with a call to UTIL_RemoveImmediate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant