Skip to content

Cache model in-game may cause memory corruption #145

@alexey-lysiuk

Description

@alexey-lysiuk

Extract entities file from [email protected] into id1/maps, and start a new game. Pick silver key to observe the issue.
The following two edicts were added to entities lump extracted from Quake 1.06.

{
"classname" "item_key1"
"origin" "544 434 24"
"target" "spawn_notnull"
}
{
"classname" "info_notnull"
"origin" "544 654 -40"
"targetname" "spawn_notnull"
"use" "item_cells"
}

For me, game usually hangs because of kinda infinite loop.

The problem boils down to loading of model during execution of SV_TouchLinks() function. It does Hunk_LowMark() at the beginning, and Hunk_FreeToLowMark() at the end effectively corrupting memory of loaded model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions