View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0006167 | Spring engine | Lua | public | 2019-03-15 06:39 | 2019-04-10 11:21 | ||||
Reporter | Google_Frog | ||||||||
Assigned To | hokomoko | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 104.0 +git | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0006167: What does "Warning: [CmdDescrCache::GetPtr] too many unique command-descriptions" mean? | ||||||||
Description | https://github.com/ZeroK-RTS/CrashReports/issues/20635 This crash report has spams "Warning: [CmdDescrCache::GetPtr] too many unique command-descriptions", followed by a lua error caused by Spring.FindUnitCmdDesc returning nil. What is a command-descriptor and what is the limit on them? | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | Yes | ||||||||
Attached Files |
|
![]() |
|
hokomoko (developer) 2019-03-15 10:15 |
This is more suitable for a forum post, but I'll answer here. You know Spring.{Edit,Insert,Remove}UnitCmdDesc? All of these have to be stored somewhere, and having the exact same values stored multiple times for the move command of every unit is a big waste. Therefore we have a fixed-size (quite large, 1024) cache of these. The most likely reason for filling the cache is if you have a tooltip or a command text that's dependent on the unitid or the unitdefid. |
hokomoko (developer) 2019-03-15 10:18 |
If that is not the case, please say so and we can enlarge the cache |
Google_Frog (reporter) 2019-03-15 14:06 |
I don't recall any changes to command handling recently, and I doubt ZK reaches 1024 commands. Each unit has 30-50 commands, with builders having around 80 commands, yet there are many overlaps. I would generously estimate that there are at most 100 unique targeted or instant commands, and at most 100 state commands. Even with very generous estimates this is 600 commands. I've looked through the command desc editing in the gadgets and they are quite static. The first parameter is changed in state toggle commands to reflect the state. One-click-weapons have their description set based on unitDefID, but only a few units have one-click-weapons. So I think there is a bug in ZK or the engine. How would you go about inspecting the cache ingame via lua? |
hokomoko (developer) 2019-03-15 17:28 |
seems very weird. I've tried to reproduce this without much success (\give all, watching the replay), so I'm closing this for now until it can be consistently reproduced. |
Google_Frog (reporter) 2019-04-10 10:57 |
Here is another instance: https://github.com/ZeroK-RTS/Zero-K/issues/3513 Some sort of debug output would be helpful. Printing the cache on command and when the bug occurs should tell us where the issue lies. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2019-03-15 06:39 | Google_Frog | New Issue | |
2019-03-15 10:15 | hokomoko | Note Added: 0019853 | |
2019-03-15 10:18 | hokomoko | Note Added: 0019854 | |
2019-03-15 10:18 | hokomoko | Assigned To | => hokomoko |
2019-03-15 10:18 | hokomoko | Status | new => feedback |
2019-03-15 14:06 | Google_Frog | Note Added: 0019855 | |
2019-03-15 14:06 | Google_Frog | Status | feedback => assigned |
2019-03-15 17:28 | hokomoko | Note Added: 0019858 | |
2019-03-15 17:28 | hokomoko | Status | assigned => closed |
2019-03-15 17:28 | hokomoko | Resolution | open => unable to reproduce |
2019-04-10 10:57 | Google_Frog | Status | closed => feedback |
2019-04-10 10:57 | Google_Frog | Resolution | unable to reproduce => reopened |
2019-04-10 10:57 | Google_Frog | Note Added: 0019935 | |
2019-04-10 11:00 | hokomoko | Status | feedback => assigned |
2019-04-10 11:21 | hokomoko | Status | assigned => resolved |
2019-04-10 11:21 | hokomoko | Resolution | reopened => fixed |