- changed status to resolved
A hint added on top of another hint can cause the whole queued hint system to stop working
Issue #443
resolved
The problem is when a hint is added to the queue with the bForceNext option, meaning it is pushed to the front of the hint queue. Most hints use that option.
If that happens while another hint is on screen, or during the post hint 'standstill' 10 second period (a pause before displaying any other queued hint), the queued hint system failed.
The problem is caused because the current/recent hint is still in the queue system at that point, in the index 0 array slot. When the new bForceNext hint gets added, it is inserted as a new index 0. Then when the old hint gets cleared, index 0 is deleted from the array, but instead of the old hint being deleted, the intended new hints is removed. The array gets scrambled and the system fails.
Comments (1)
-
reporter - Log in to comment
Fixed as part of commit 8d5f3e9.
When adding a hint using bForceNext, I've added a check whether a hint is already being displayed or was recently displayed (meaning it will still be at the front of the queue). If so, we simply insert the new hint in array index 1 instead 1 index 0, so it comes up next.