[Scummvm-tracker] [ScummVM :: Bugs] #16381: WAGE: Zhore's Xers crash when restarting game
ScummVM :: Bugs
trac at scummvm.org
Wed Mar 25 11:34:24 UTC 2026
#16381: WAGE: Zhore's Xers crash when restarting game
-------------------------+---------------------------
Reporter: eriktorbjorn | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: Wage
Version: | Resolution:
Keywords: | Game:
-------------------------+---------------------------
Comment (by Bhumit-coder):
Hi, I investigated this issue and confirmed that the crash is caused by a
negative interval being passed to installTimerProc() in the WAGE sound
timer.
The interval is computed as:
nextRun - g_system->getMillis()
If the current system time exceeds nextRun, this results in a negative
value, triggering the assertion (interval > 0).
I implemented a minimal fix by clamping the interval to a minimum value
before scheduling the timer:
int interval = nextRun - g_system->getMillis();
if (interval <= 0)
interval = 1;
I have tested this locally and confirmed that it prevents the crash.
I would like to work on this issue and submit a patch. Please let me know
if this approach is acceptable or if there are any preferred alternatives.
--
Ticket URL: <https://bugs.scummvm.org/ticket/16381#comment:2>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list