Opened 9 years ago

Closed 9 years ago

#1632 closed bug (invalid)

Slay cache sometimes runs out of room(?)

Reported by: GabeCunningham Owned by: noz
Milestone: Triage Keywords: items


In slays.c, there is a SLAY_CACHE_SIZE define that seems to be too small sometimes when dealing with big vaults. We can increase the size easily enough, but the slay cache should be made more defensive and find a way to deal when it runs out of room.

(I admit I haven't read the slay code thoroughly, but I was able to get a reproducible bug by saving right before jumping to a new floor where a large vault was being generated. From there I was able to trace the bug to slay_match, where mults2[i] sometimes seemed to be an array index out-of-bounds. Increasing the SLAY_CACHE_SIZE seemed to fix the bug.)

Change History (2)

comment:1 Changed 9 years ago by magnate

  • Keywords items added
  • Milestone changed from Triage to 4.0
  • Owner set to noz
  • Status changed from new to assigned

Ok, noz assures me that the SLAY_CACHE_SIZE is the size of the hash table, not the cache itself. So unfortunately the bug going away was a red herring, and the problem is as yet unidentified. (The slay cache is a linked list and doesn't have a size limit.)

comment:2 Changed 9 years ago by GabeCunningham

  • Milestone changed from 4.0 to Triage
  • Resolution set to invalid
  • Status changed from assigned to closed

My guess now is that the problem was just a memory corruption caused by my not initializing the trap array properly. (See the end of So the slay cache is probably fine -- let's close this and reopen if necessary.

Note: See TracTickets for help on using tickets.