nguyenphanhuynh / iphonefrotz

Automatically exported from code.google.com/p/iphonefrotz
Other
0 stars 0 forks source link

Poor performance and random crashes #86

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Playing a game on Frotz for an extended time (more than 15 min).

What is the expected output or behavior?  What do you see instead?

What version of Frotz are you using?
1.3

What version of iPhone/iPod Touch OS? (2.0, 2.1, 2.2.1, 3.0, etc.)
3.1

Please provide any additional information below.
After upgrading to version 1.3 I have noticed that Frotz is a lot less 
responsive and it tends to 
crash often (thus losing non saved games in progress). I have also noticed that 
it affects my 
iPhone in general too. After playing Frotz my iPhone is noticeably slower and 
only a reboot is 
able to get the performance back to normal.

Original issue reported on code.google.com by finfer...@gmail.com on 1 Oct 2009 at 11:10

GoogleCodeExporter commented 8 years ago
Well, that's odd.  I haven't noticed this problem or been able to reproduce it 
yet.
Frotz does slow down a little in the first few minutes of playing as the text 
buffer gets larger (as it has to 
rewrite the whole text display buffer each time it updates because of API 
limitations.)   After it reaches the 
buffer limit, older output is discarded and the update is roughly the same 
amount of text each time, and 
performance should stay consistent then.
But the way this works didn't change at all in 1.3 vs. 1.2 except for some code 
to separately save off the 
output since the last command for VoiceOver (text to speech for sight impaired 
users), which shouldn't have 
much effect.   Usually this kind of thing is caused by memory leaks, but  I've 
run leak-detecting monitors on 
Frotz and haven't found anything, and I can't tell that memory usage grows 
appreciably over time while 
playing a single game, at least now the ones I've tested.

Which game or games are you playing when this happens, or can you tell if it 
makes a difference?  Have you 
been using the new input shortcut menus?  Do you use the IFDB browser in the 
same session, or usually just 
stay in the story view playing the game?

It's hard to understand how Frotz could affect the performance of the phone 
when it's no longer running 
anymore.  The OS prevents apps from running in the background and reclaims all 
their memory, so I don't 
have any explanation for this.  The only thing that seems remotely possible is 
that since iPhone text controls 
are based on WebKit, maybe memory is being shared with Safari somehow, although 
this seems pretty far-
fetched.  You might try force-quitting Safari instead of rebooting the next 
time it happens and see if it makes 
a difference.

Original comment by spath...@gmail.com on 1 Oct 2009 at 5:08

GoogleCodeExporter commented 8 years ago
By the way, I'm currently working on writing a custom rich text display view 
that doesn't depend on the native 
controls and allows me to append text without rewriting the entire display; 
this should help performance a lot, 
although without understanding the nature of the bug you're seeing it's hard to 
be sure whether it will address it 
or not.

Original comment by spath...@gmail.com on 1 Oct 2009 at 5:13

GoogleCodeExporter commented 8 years ago
Sorry for getting back to you so late.

First of all, thank you for all your amazing job, and for your prompt response.

Replying to your questions:
- the crashes seem to be totally random. So far I haven't played so many games, 
but crashes happened with 
all of them. Some examples: A mind forever voyaging, The hitchhiker's guide to 
the galaxy, Lost pig, Suveh 
Nux. A particularly sluggish and crash-prone game is "When in Rome 2: Far from 
home".

- Sometimes I do use the IFDB browser, but whether I use it or not doesn't seem 
to affect anything since I get 
the crashes anyway.

- As for the iPhone performance in general, following your suggestion helped. 
After force-quitting Safari 
performance is significantly better.

I also wonder whether some of these problems may be due to the recent 3.1 OS 
upgrade, which seems to 
make the system a lot more sluggish than ever before.

Another thing worth of notice perhaps is that very often, as soon as I open a 
game in Frotz I get the dialog 
pop up telling me it is disabling images/thumbnails in order to save memory. I 
guess there must be 
something hogging my RAM somewhere (else)?

I am really looking forward to see your new updates (if the App Store allows 
:P)!

Original comment by finfer...@gmail.com on 3 Oct 2009 at 10:46

GoogleCodeExporter commented 8 years ago
Thanks for the feedback

I'm guessing you have an older (1st gen or 3G, not 3GS) phone?  I've heard lots 
of reports of general 
performance problems with OS 3.1 on pre-3GS devices.   Hopefully Apple will 
address this with a patch soon.

In the meantime I'll work on trying to reduce the memory footprint of Frotz. 

If you are interested in beta testing Frotz 1.4, let me know.  You can send me 
your device UDID (the 40-digit 
"Identifer" given by iTunes in the Summary page when your device is connected) 
and I can send you a version 
to test when it's ready.

Original comment by spath...@gmail.com on 4 Oct 2009 at 1:24

GoogleCodeExporter commented 8 years ago
Yes I have a 3G. For now I have tried restoring the OS and resetting all 
settings, and it seems performance is 
almost back to normal. 

I am surely interested in beta testing. Shall I send the UDID directly to you 
by mail? If so, shall I send it to ifrotz 
at gmail dot com?

Original comment by finfer...@gmail.com on 4 Oct 2009 at 12:45

GoogleCodeExporter commented 8 years ago
Yes, you can send it there.  It'll probably be a couple of weeks before I have 
something far enough along to test, 
though.  

Thanks!

Original comment by spath...@gmail.com on 5 Oct 2009 at 3:18

GoogleCodeExporter commented 8 years ago
I have just sent it.

A little follow up on the crashes: I have started playing Bronze just 
yesterday, and it crashed about 10-15 
minutes later. Again, I experienced poor performance on the iPhone in general, 
and to get it back to normal I 
reopened Frotz and force-quit it. I guess there must be some process left 
running after Frotz crashes? 

Original comment by finfer...@gmail.com on 5 Oct 2009 at 3:36

GoogleCodeExporter commented 8 years ago
I am having the same problems as finferflu: random crashes, usually after 
extended
(15+ minutes) play in every game I've played so far (just downloaded a couple of
weeks ago): 9:05, Act of Misdirection, All Roads, & Vespers; the only exception 
is
Being Andrew Plotkin, in which I died early on & wasn't in for an extended 
time), and
the memory problem. The memory problem can occur at any time, not just after 
extended
play. I've got Frotz 1.3 and OS 3.1.2, and, yes, it's on a first gen. I haven't
noticed general performance being affected, and I rarely use the IFDB How does 
one
force quit on an iPhone, other than using the home button?

Thanks!

Original comment by joy.m...@gmail.com on 13 Dec 2009 at 6:50

GoogleCodeExporter commented 8 years ago
Thanks for the input.
I'm still expecting that my rewrite of the text engine will address this 
problem, but it's taking me a while to 
get it ready to release a new version.  I was delayed for a while because my  
MacBook Pro display died and I 
had to get it repaired, and generally haven't had a lot of time to work on it.  

Are you getting the 'low on memory" dialogs as well?

To force quit an app (e.g. Safari), if it's one of Apple's apps that can run in 
the background, make sure it's 
active by tapping on its icon, then:
  Pre-3GS:  Hold down the Home button for 10 seconds.
  3GS: Since the 3GS uses a long press of Home to activate voice control, they added a different more 
cumbersome way to kill apps.  Hold down the Sleep button until "Slide to power 
off" appears, then instead of 
powering it off, hold down Home for 10 seconds.

Original comment by spath...@gmail.com on 13 Dec 2009 at 9:25

GoogleCodeExporter commented 8 years ago
Fixed in 1.4.

Original comment by spath...@gmail.com on 18 Mar 2010 at 8:24