Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache model in-game may cause memory corruption #145

Open
alexey-lysiuk opened this issue Oct 17, 2024 · 0 comments
Open

Cache model in-game may cause memory corruption #145

alexey-lysiuk opened this issue Oct 17, 2024 · 0 comments

Comments

@alexey-lysiuk
Copy link

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.

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

No branches or pull requests

1 participant