ifrotz / iosfrotz

Frotz for iOS source (formerly at code.google.com/p/iphonefrotz)
Other
49 stars 17 forks source link

Unstable when importing games from other apps #272

Open PeterPiers opened 8 years ago

PeterPiers commented 8 years ago

If I try to import a game from an app like FileApp, and if iFrotz is closed when I try to import it, there's a lot of instability. It may have to do with the sheer number of games I have in iFrotz, but this issue was always there, really. Except now it's starting to interfere with some games.

Let's say I close iFrotz (or leave it on so long that it enters StandBy mode, or whatever, so that trying to access it again is not unlike opening the app all over again). Then I open FIleApp and choose a game file, select "Open With", and then select iFrotz.

One of four things will happen.

Most common: it will crash. If I reopen iFrotz and play the game from there, everything's peachy. If I then - with iFrotz properly open - try importing another game from FIleApp, it works wonders.

Most common: it will freeze for a long time before opening the game. About a minute or two. Maybe it displays the cover, maybe it will display the blank bacgkround window, maybe it'll display the playlist. Then eventually it will load. Maybe. Or maybe it'll just stay frozen until I close the app.

Least common: no problems (it's been quite a while since this happened!).

Started happening: it shows some problems like "illegal object number" or "programming error", which is more serious. I quit iFrotz, I restore it, and the problem's gone. I save a game in this broken state, I restore the game after restarting iFrotz, and it doesn't replicate the issue. Thankfully, I took some screenshots.

This has affected three games. Map (http://ifdb.tads.org/viewgame?id=wttpef6vhl48hepx): Objects wouldn't appear. I would, from the beginning, type "e.s.x bed" and get "Which do you mean, or ?". This happened for lots of objects, I thought the game was broken. Restarted iFrotz, and things were fixed.

Oh wait, I did take a screenie, just found it.

map

Then there's Hard Puzzle (http://ifdb.tads.org/viewgame?id=81afnluyffpxa8iv). The following screenie I took to show you a different bug, but note the text on the status bar. That's supposed to say "garage".

https://cloud.githubusercontent.com/assets/12926960/12660802/9e849d5c-c60d-11e5-90db-608306b0ea42.PNG

When I asked around, I was pointed to this old bug in Parchment: https://code.google.com/archive/p/parchment/issues/108. I'm no longer sure it's related.

Finally, there's "Midnight. Swordfight." (http://ifdb.tads.org/viewgame?id=2cuwjlvpybg8oaf0). Check out the screenies, No, those "programming errors" are not the author's fault, they went away when I restarted iFrotz.

img_0590

img_0589


Infuriatingly, reproducing all of this is not trivial. The one thing they have in common is having been imported off FileApp when iFrotz was off or in StandBy (sometimes it seems that if it's in StandBy - the extreme StandBy, not the sort where you can return as though nothing's happened - it's even worse)... but this does not happen with all games! Indeed, I have three cases here and they all have different presentations.


EDIT - I just realised that despite the presentation they all do have to do with missing values for strings (or whatever they're called nowadays). For whatever that's worth...

PeterPiers commented 8 years ago

Update: I've practically stopped seeing this issue since I updated to iOS 9.3.whatever.

...mind you, that's because every single time I update a game now iFrotz crashes, I reload, and THEN I play.

Doesn't bother me too much. It may have to do with the sheer size of my collection.

ahope1 commented 8 years ago

Peter, I don't think it's to do with the size of your collection.

I've been seeing a related crash in previous versions of iFrotz going quite a way back now. In fact, I reported the issue when the code was hosted on code.google.com.

My specific gripe is that if I download a game file from IFDB in Mobile Safari and then choose to "Open in" iFrotz, then iFrotz will open and try to run the game but will invariably crash with a "Couldn't find file..." error. This still happens in the latest version of iFrotz (1.8) on iOS 9.3.3.

This same error was experienced by the developer of another app (now abandoned) that I was helping test, and it seemed he had figured out that it was due to the app checking "too early" for the existence of the file that was to be opened! I.e. it seems to take time for iOS to move the file to the location in which the app (iFrotz in this case) has to look for the file. If the app looks too soon, the file won't be there!

Don't know what the solution is though, unfortunately!