Skip to content
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

Counterfeit Monkey freezes iPhone Safari #134

Open
dfabulich opened this issue Feb 2, 2023 · 6 comments
Open

Counterfeit Monkey freezes iPhone Safari #134

dfabulich opened this issue Feb 2, 2023 · 6 comments

Comments

@dfabulich
Copy link
Contributor

I've encountered a reproducible crashing bug in Counterfeit Monkey Release 10. I'm on iPhone 13 Pro, iOS version 16.3.

https://iplayif.com/?story=https%3A%2F%2Fgithub.com%2Fi7%2Fcounterfeit-monkey%2Freleases%2Fdownload%2Fr10%2FCounterfeitMonkey-10.gblorb

After a few dozen moves, Safari will freeze up. The keyboard will be visible, but tapping keys on the keyboard does nothing at all, and the transcript stops being scrollable. I've tried waiting more than 60 seconds to see if it unfreezes, but it doesn't work. Navigating back to the iPhone home screen and back into Safari, it will show the game UI for a few seconds, and then Safari will crash. At that point, if you navigate back into the game, you'll see this on-screen error:

Quixe run: glk_put_jstring: window has pending line input

Clear autosave and restart

You can click "clear autosave and restart," but you'll just hit the error again a few turns later.

Note that Release 10 is hard to play on iPhone because of the map. You can type graphics off in Release 10 after answering the initial questions (y / andra). In Release 11 and up, the map will be hidden by default, and you can turn it on and off with map on and map off.

I also like to use highlighting to highlight words, and this might make it more likely to reproduce, but that could be superstition.

@dfabulich
Copy link
Contributor Author

@angstsmurf In case you have any thoughts on this

@curiousdannii
Copy link
Owner

Using Browserstack I can confirm that it gets pretty slow at times, but it's always resumed responsivity for me. Oddly it seems to be hanging after outputting text, not while the VM is running, which is what I'd expect if it was Quixe being very slow processing the game code. No idea of the cause yet.

@angstsmurf
Copy link

Is there a previous release of the game where this does not happen?

@dfabulich
Copy link
Contributor Author

I just tried it on iplayif.com with release 7, and it froze. I got as far as turning off graphics, turning off the tutorial, turning on highlighting, and going north, and it froze.

@dfabulich
Copy link
Contributor Author

It did seem to freeze in Quixe, (using the Release 10 link above), but less, and for shorter periods of time.

In Zarf's Quixe, the iPhone keyboard closes after every command you type, forcing you to tap on the command area to re-open the keyboard. I found that sometimes, I'd go to tap in that area, but it just… wouldn't tap. Then maybe I'd leave and reenter Safari, and it still wouldn't tap, but then a few seconds later, it would be tappable again.

It never locked up quite as bad as Parchment did/does.

I note that I was able to play through Lost Pig without issue, so it does appear to have something to do with Counterfeit Monkey. I speculate that the problem has to do with memory usage, and specifically I think it has to do with garbage collection; perhaps CM is generating a lot of garbage, so the garbage collector is freezing after we yield the UI thread.

I might poke around with this at some point. https://webkit.org/blog/6425/memory-debugging-with-web-inspector/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants