-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ZVISION: Fix initial out-of-bounds condition in clock. #2030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
What kind of crash are you experiencing? Do you have a stack trace? |
Maybe an alternative to this change would be to initialise Note also that the iOS backend implementation of |
I can reproduce the exact location tomorrow if you like, but essentially I get an assertion failure in
Yeah, that would work, too. Sounds like a cleaner fix to me. If you like, I can make the change and update the PR.
Ah 😏 I suspected as much, as the engine runs fine on other platforms. |
I grabbed my copy of Zork Nemesis from GoG and I can confirm the crash on iOS. As I expected this is due to the I suspect the issue could be reproduced on other backend by keeping ScummVM a long time in the launcher before starting the game. And I still think at this point that a better fix would be to initialise |
0fa00f8
to
2a35947
Compare
I've modified the PR to properly initialize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. That looks good to me.
Also for information I fixed the implementation of getMillis() for the iOS7 backend yesterday (and I checked it was already correct for the iPhone backend used for older iOS devices).
Sorry for the late reply, I was busy these days. Many thanks to @criezy for identifying and proposing a fix for the actual cause. Yes, the correct fix for this is to initialize _lastTime correctly. This is good to be merged now, thanks @DirtyHairy for raising the issue, and providing a fix. Merging |
This fixes an out-of-bounds condition when the clock is queried for the first time. Without this patch, Zork Nemesis crashes on my iPad after the initial cut scene.