i7 / counterfeit-monkey

Counterfeit Monkey by Emily Short
http://ifdb.tads.org/viewgame?id=aearuuxv83plclpl
Other
168 stars 30 forks source link

Invisible question when restarting #187

Closed dfabulich closed 2 years ago

dfabulich commented 2 years ago

Launch Counterfeit Monkey, type "yes", "andra", then type "restart".

The screen will be blank except for the cursor; you won't be able to see the question, "Can you hear me? >> "

Type "yes" and you'll see the expected question "Do you remember our name?" with a > prompt. Type "andra". You'll see the introductory text, "Let’s try to get a look around…" but the > prompt line is missing.

If you type any command at that point, the > prompt comes back and the game works normally.

I'm able to reproduce this on iplayif.com https://iplayif.com/?story=https%3A%2F%2Fgithub.com%2Fi7%2Fcounterfeit-monkey%2Freleases%2Fdownload%2Fr10%2FCounterfeitMonkey-10.gblorb and in Spatterlight 0.8.9.

angstsmurf commented 2 years ago

This is one of those bugs that I've noticed from time to time, but which always seems to disappear when I try to debug it. See for example https://github.com/erkyrath/lectrote/issues/124. It seems to have something to do with @curiousdannii's startup precomputation code which tries to load data at start from a resource stream in the blorb or from an external file.

EDIT: The game seems to try to print the initial lines to the status window, where they won't fit.

dfabulich commented 2 years ago

Just to be clear, are you able to successfully reproduce the bug? For me it reproduces 100% of the time when restarting in Spatterlight and on iplayif.com.

angstsmurf commented 2 years ago

Yes, I can reproduce it with CM version 10. Not if I build a new version, though. It might be because the release version has a resource stream in the blorb.

Ping @curiousdannii, do you have any idea what is going wrong here?

curiousdannii commented 2 years ago

If it's printing to the status window, then it must be focusing the window wrongly. Looks like it's been years since Flexible Windows was updated here, could try updating it to see if it helps? I did change the restart code earlier this year to fix some issues.

angstsmurf commented 2 years ago

Thanks a lot! It sounds exactly like the bug that the new Flexible Windows is meant to fix.

To make the new version work, I had to add back some of the lines that were deleted from the old version. Hopefully that didn't cause any new problems.