View Full Version : If your app keeps crashing, read this thread

10-15-10, 03:34 PM
Since the other thread I posted this in doesn't have a good title, I started a new thread so others will find the information.

Explanation for the crashes: Not enough RAM (temporary memory):

After being a long time iphone 3G user, and then switching to iphone4 a week ago, the answer is clear as day.

When I started playing, everything was fine, no crashes.

As my list of neighbors grew higher, somewhere around 1000 it started crashing occasionally, especially when I would try to do something else in the game (like collect on a factory) after having looked at my neighbors list.

By the time I got around 2000 neighbors, it would crash almost every time I did something after looking at neighbors list and/or dealing with factory contracts.

Over 2500 neighbors, and unlocking more factory contracts, the problems grew even worse.

This problem also affects things like receiving gifts and popup notifications from other apps.


THen I got a new iphone4 ... and all the problems disappeared completely!

I have 3000 neighbors at level 68 (which means everything in the game is unlocked) and I can now pound on this game all day long without any crashes.

The only time I have had it crash is when playing 4 or 5 consecutive Mini Games.


iPhone4 has 512MB of RAM.
iPad has 256MB of RAM.
iPhone3GS has 256MB of RAM.
iPhone3G has 128MB of RAM.

This is why the iPhone3G didn't get all the upgrades in the OS4 update (like multitasking, which is why City Story's Mini Game can't run on it), because it's RAM simply cannot handle it.

10-15-10, 03:35 PM
As a result of my above reply, here's some tips to help you make the game playable on iPhone3G:

1) Get used to rebooting the device. It's easy to do and will definately help cure a wide variety of issues, not only with City Story, but several other quirky problems with other programs. To reboot it, just hold down the HOME and POWER buttons simulataneously for several seconds until the APPLE LOGO appears on the screen.

2) Try to avoid doing anything related to factory contracts and your neighbors list in the same reboot session (since the game is going to try to hold all of information in memory after you initiate access to that specific info, which is what makes it crash). Solution: I suggest rebooting again right before it's time to collect on your contracts.

3) I know this is kind of counter-productive for the game, but you might consider lowering the amount of neighbors you have to maybe 500 or so. I personally didn't try this solution, but I suspect it might have pretty good results.

4) If you decide to keep adding neighbors, make a list and add all of them like once a day, instead of adding each right when you get their code ... so you aren't going into the invite list so often (since it's completely tied to the neighbors list) ... and then reboot the device when you're done adding them all.

5) Gifts are also a big problem causing crashes on iPhone3G, so reboot before you start accepting them, and reboot again after you're done accepting your 20 gifts for the day (and stay away from your factories and neighbors list during that time).

6) In fact it seems any outside interference to the game (meaning popup notifications from other apps) tends to cause problems, so try turning notifications off in your device settings.

Good luck to all of you iPhone3G users!
I feel your pain, believe me.
There's still ways to make the game fun.
And if worse comes to worse, might consider upgrading to iPhone4 ... it ROCKS!!!
I kept the old 3G after cancelling it and am using it for free as a second device on wifi.

10-15-10, 04:00 PM
Teamlava, here's some ideas:

I don't know if any of this is possible since I haven't yet looked into developing an iphone app yet, but here's some thoughts from an ex-programmer from other languages.

Maybe if you can control/clear some of your variables before trying to access certain menu items, it might help with your limited memory issues?

For example, when someone clicks a factory, clear the variables relating to neighbors before adding the contract variables to memory ... and clear the contract variables when someone clicks anything that's not a factory.

If that is possible, then look even deeper into other large variables for other things that can be cleared, and when to clear them, to free up that memory (like when you begin each Mini Game, hint hint).

However, since my app is running great as it is today on the iPhone4 ... it would be spectacular if you could also do some checks to see what iDevice the player is using (or maybe a check of RAM size) ... and if it's a device that has enough memory like the iPhone4, then have it skip the function that would clear those variables since it can handle all of that.

This would give the best of both worlds. It would slow down play for iPhone3G since it has to reload variables more often, but it would at least make it "playable" on that device, while still allowing the iPhone4 users to enjoy the very fast play we are used to.

Just some constructive critisism for a real problem.

Storm8 ID: Supervolcano

10-15-10, 04:13 PM
Teamlava, if you decide to look into these problems, might I suggest having your development team make a few mirrors of my account in particular (since it has a lot of everything) and do some serious testing with it on each type of device.

You'll quickly see the problems I'm talking about.

10-16-10, 12:52 AM
I don't have more than 12 nieghbors, and even when I had only 5 neighbors, it was causing the same trouble.

While playing my game the device crashes. NOT THE GAME. The whole phone. Screen goes black, then the apple logo pops up about 15 seconds later.

I am starting to wonder if it might be my phone since it was recently warrantied by Apple and it has rebooted even when my three year old is playing his games on it.

But none of the rest of my programs cause my phone to reboot when I am using them. But when playing this game it is predictable that it will crash.

10-16-10, 02:09 AM
If you have an iPhone3GS, iPhone4, or iPad and you are experiencing crashes, chances are it's due to the MULTI-TASKING operation which Apple put in the OS4 update recently.

What the device is doing is holding all of the applications you've used recently running in it's backround, and each of those programs is using up some RAM (the temporary memory).

Once it runs out of memory, it crashes the device and/or some application(s).

What you need to do in this case is learn how to truely close your programs (not just clicking the home button).

Read post #1 of the following thread for details on how to close the programs that are running in the backround:


Everyone needs to get used to closing programs from this multitasking bar.
You shouldn't ever have more than a few apps running in the backround.
It's ok to keep some going, so use trial and error to find out what your device can and can't handle.


But bottom line, if you're done using that program and don't need to see that "very last screen" you were looking at ... then just close it properly ... and the next time you're ready to use it again you can just open it again and start from the beginning screens of that app.

For example in City Story, if you're not closing the app properly, then every time you login you are looking at the last screen you were on ... which is probably your own city :D ... and then you are wondering why there's no stars to collect ... and the reason why is because ... WAIT FOR IT.... WAIT FOR IT .... It's because you wanted to look at the "last screen", not the "REFRESHED SCREEN".

10-16-10, 02:13 AM
Can a moderator please put a sticky on this thread so it will be easy to find for all your users next week, and the week after, and the month after?

10-16-10, 08:42 AM
I have an iPad and am not running multitasking ios. I have had some instances of crashing including what has apparently been a major problem over the last hour or so. On the last three occasions when this has happened and again including today I've immediately come to this forum and found that it too has crashed with standard web response 132 - "server is temporarily unable to service requests". At the same time my email and other internet sites are fine so there's no connectivity problem at my end.

So although all of the above posts might also be correct and there are some good hints and suggestions, it appears that there is a problem at the server end, either with the server(s) or maybe with TeamLava's ISP's network.

Maybe there are two different problems occurring, one relating to multitasking and one due to server or ISP network issues. Any thoughts? I'm a software person not hardware or networks so happy for any advice given.

10-16-10, 10:59 AM
Thanks Supervolcano! I normally just haunt the posts,I felt someone should say thanks because your info is very helpful! I have the iPad, love it, and am experiencing many crashes. Will try your tips! Happy farming!

11-01-10, 02:34 PM
^^^^^ up ^^^^^

11-01-10, 08:54 PM
It is not always your device. I have shut down my ipad and turned it on and still had problems in FS *when it is having problems* then within an hour or two they are fixed, without me doing anything else. I see it as a problem on the other end, at least in my situation.

11-22-10, 10:37 PM
Time to up this thread again

01-31-11, 09:57 AM
Hack again?!

02-04-11, 05:37 AM
I had a feeling my 3G's RAM was too low and was causing drop in frame-rate. Valentine's story is terrible for this, so I'm still playing the older lag free version

02-04-11, 05:43 AM
Thanks Supervolcano

I'm iPad user. Never had crash issues until these Valentine updates so thought I'd look here. And here you are explaining it! Thanks very much. Will be taking your advice.


02-17-11, 12:05 AM
I play city and farm and kids also play bakery, restaurant and empire on my iPhone 3G, for last 2 days I'm getting that message that says no Internet access when I try to get into any of these games but yet my Internet is fine on other apps! Watched crops die last nite on my daughters iPad and gonna lose all 11 factory contracts this morning. Is this the same? I don't have many neighbours on any of the games, doubt there's 200 between the 5 games and while that message has popped up briefly b4 it usually rectifies itself after a few months or I move positions?
Anyone experiencing this at the mo?

02-17-11, 12:06 AM
That should have read 'rectifies after few minutes' oops!