Repository navigation
Conversation
Clip models, presence checks and precache loads kept a reference the map shutdown purge would not drop, so the 2048 collision slots filled before Rites of Passage. They release that reference now. A settings-menu hitch also printed Posix_QueEvent overflow once per extra mouse sample; consecutive motion folds into the sample already waiting, and the overflow is reported once per episode.
A Prey launch looked up Quake 4's montage mask, menu sound, arena campaign and chat-frame art, and warned when they were absent. Those lookups are skipped. si_gameType DM is stored as deathmatch, so a listen server runs deathmatch and the weapon wheel document is parsed during the level load.
themuffinator
left a comment
There was a problem hiding this comment.
Thanks, this finds real problems, and the #69 part matches that report closely. Before it can land:
-
Please split it. It is four unrelated changes: collision-model references, the POSIX event queue, the Quake 4 front-end leftovers plus the MP weapon-wheel precache (#69), and
si_gameType DM. Each needs its own review and its own bisect point. The #69 part (Session, ArenaCampaign, ChatWindow, the wheel precache,UserInterfaceRetained) is the lowest risk and can go first. -
Collision-model references.
idClipModelnever released its handle before, so a stale handle did no harm. Now~idClipModelcallsFreeModel, and for a pointer no longer inmodels[],FreeModelcallsDestroyModel(CollisionModel_load.cpp ~707-724). Slots are replaced withDestroyModelinStoreModelandStoreProcClipModel, andFreeProcClipModelsdestroys proc clip models.LoadModelonly adds a reference formodels/andgfx/names, so nothing protects an inline*Nor proc clip model's slot. Please show that no clip model can outlive its model through those paths, for example map change,reloadModelsand savegame restore. Otherwise this is a double delete. A long map-cycling run under a debug heap (or ASan on Linux) would answer it. -
Event coalescing. Please use
retainedUIInput_t::POINTERand readkindthrough the struct, not*static_cast<const int *>( ptr ) == 1. -
si_gameType DM. Rewriting one cvar's value by name insideidInternalCVar::UpdateValueworks, but it hides the alias from everything that reads the cvar's value list. Please either gate it withHUMANHEADand add atools/testscheck, or fix the writers (AsyncNetwork.cpp, Session.cpp ~3864, Common.cpp ~8079) to write Prey'sdeathmatch.
|
I ran the long map-cycling check from point 2 under AddressSanitizer on Linux. Build: main (5b31d56) + this PR (78fecea) + #73 (+ a test-only BitMsg stub fix), Linux x64, GCC, Result: no ASan report, all 28 loads finished, clean exit (status 0). Two notes on the setup:
|
|
Thanks, @danperisse-hue: that ASan run (24 map changes, 4 |
Summary
Two fixes that were still missing on
mainafter the spawn crash (#47) and the map-shutdown collision purge (#55).CheckModel, and precacheLoadModelcalls kept a reference on prop collision models.PurgeModelsskips anything with a reference, so the 2048 slots filled during Roadhouse and the Feeding Tower and Rites of Passage (game/lotaa) failed withLoadModel: no free slots. Those loads now release the reference, and the existing purge can reuse the slot. This does not add a secondFreeMapor a force flag on top of Purge collision models at each map shutdown (fixes "LoadModel: no free slots" on the fifth map of a session) #55.Posix_QueEvent: overflowfor every extra sample. Consecutive mouse and retained-pointer samples now fold into the sample already waiting, and the overflow line is printed once per episode. Windows still reports every overflow.gfx/guis/mainmenu/level_edge_fade, the soundmain_menu_gameplay,guis/arena_menu.gui,arena/openq4_campaign.cfg, and the chat frame images. Those lookups are skipped when the files are absent. The chat frame draws with a solid fill. Related to [Report]: Console on main d2510380: openQ4 leftovers warn at every launch and map load, and MP loads the weapon wheel after the level load (~29 ms) #69.si_gameType DMis not in Prey's list (singleplayer,deathmatch,Team DM), so the cvar rewrote it tosingleplayer. A listen server then loaded the single-player menus and parsedguis/hud/weapon_wheel.ruiafter the level load.DMis stored asdeathmatch. The wheel's icons and document are read during the load, and the local player takes that parse.Test plan
tools/tests/sys_event_queue_ownership.py— posix and windows, including the ten ownership mutants~/Games/Prey:game/roadhouse→game/feedingtowera→game/feedingtowerb→game/lotaa, eachSpawnPlayer, noLoadModel: no free slotsspawnServer game/dmroadhousewithsi_gameType DManddeveloper 1: multiplayer pause card, weapon wheelparse prefetchedin 9 ms,MP_OK, no latenon pre-cachedicon warnings and no Quake 4 front-end warnings