Mysterious glitch in iPhone app - iphone

My app/game has gone live in the App Store two days ago. Now I'm getting reports of a mysterious glitch that occurs when several levels have been completed (it's a puzzle game). The screen just gets black, no user interaction is possible anymore at all.
I think what happens is that my view gets deallocated, so the only thing that's left is my window, which has a black background.
At first I thought this could be due to a memory warning to which my view controller responds by releasing the view. But when I simulate memory warnings on the Simulator, everythings goes fine.
I have tested my app extensively using Instruments. It contains no memory leaks. It is using a constant ~43MB during gameplay. CPU load is low.
I'm quite clueless here. It's frustrating that I cannot reproduce the problem myself. I can't count the levels I've played myself anymore, trying to get this glitch to occur. Anyone have some suggestions?

But when I simulate memory warnings on the Simulator, everythings goes fine.
Did you try to simulate it on a real device with instruments? Did you try with older device models like 3g, 3gs?

Related

UIImagePickerController crashes app and sometimes restarts the device - memory warning issue

We have customized the camera view and the move&scale options. after taking picture the original image will be opened up in the new view controller which has customized move&scale. It works fine but the app crashes and sometimes os restarts if we are open the camera more than around 7 times continuously. we checked the profile instruments there is no memory leaks its getting released after picture is taken
app throws memory warning continuously after around 7 time continues use of camera
we are using ARC.
Any idea?
i found the answer.there was a problem in image i used for cropping.
See the below links.
http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/
http://wiresareobsolete.com/wordpress/tag/uiimagepickercontroller/

iPhone OpenGL ES app killed on iPad when using "2x" button

Hey, I got kind of a weird issue here.
I have an iPhone-only OpenGL ES app which runs fine on all iPhone and iPod touch models supported.
When running on the iPad, it runs on an iPhone-sized window as expected, and pressing the "2x" button once scales up the window to twice the size, as expected, and the app continues to run without problems.
But if the user taps the "2x" button 3 or 4 times quickly, the app is killed with the Program received signal: "0" message (which, from what I understand, means the OS killed my app for using too much memory, is that right?)
What I really do not understand is what in my app could possibly be using up more memory when the iPad scales the window up and down? As far as I know there's not even any way for my app to tell if and when the iPad is doing that. I don't know if the fact I'm using OpenGL ES is related or not, but that issue doesn't happen on any of the Cocoa Touch apps I have - though it also doesn't happen on the other two OpenGL ES apps I have. And this app does use more memory than any of the other ones.
Anyone ever had or even heard of this problem? Googling gave me nothing.
Since no one has posted with a direct answer (your situation might be a little vague), I have a suggestion for how to move forward and gather more information on what might be causing your problem.
Check out the Instruments in Xcode which can identify memory leaks:
Instruments User Guide
Or for an even friendlier introduction, here's a video that address performance issues, including memory leaks (and how to find them). iOS Performance Optimization Video
Just adding this so there's some kind of an answer here...
I never figured out what the hell was going on with the 2x button.
The way I fixed it back then was to optimize memory usage as much as I could, lazy-load all that I could and unload again when not in use.
Weird that it never complains about memory when running on any of the supported iPhone or iPod touch models, even the older ones, but it got killed on the iPad ONLY when pressing the 2x button repeatedly and quickly... I guess that's always gonna be a mystery to me.

Very strange iPhone app crash problem with tabbar based app

I know the title sounds a bit awkward but let me explain my problem.
I have a tab bar based iPhone app which works perfectly so far. I can switch through the tabs and every tab loads a view controller.
But here is how it crashes. After I used the app and working with a bunch of other apps I switch back to my app (for example after one hour). The app shows the screen where I left it. Now when I try to change the tab, it crashes immediately.
The problem is that I can't reproduce this crash in the simulator or in the debug mode. I tried to open it, then close it, then reopen it but then everything works. Only after a certain amount of time the crash can be reproduced. But I don't have any logs.
Maybe anyone had the same the problem and knows what to do here?
Could it be related to low memory (i.e., you have a bug that only shows up during low memory)? Have you tried "Simulate Memory Warning" in the simulator?
Connect your device with system using iPhone utility and found the reason for crash. It may be memory problem only.

iPhone: quickly quitting an app then relaunching briefly shows last screen then black, then starts fresh

Trying to finish up an app I've been developing and have hit an odd bug that I'm not sure if it's on my end? a bug on apple's end? or perhaps the underpinnings of multitasking showing themselves.
My current app is doing this weird thing when you press the home button to quit the app, and then immediately relaunch the app. You see the Default.png image as the app starts up, but when it goes to display the window/view it briefly shows the screen as it was just before you quit the app, then goes to black for about 2 seconds and then displays the correct screen as if you were starting up fresh. I'm see this on all devices, iPods, iPhones, and iPad.
This is not just me, however, I've been trying other apps to see if they do it, and have found that the Air Hockey ( http://itunes.apple.com/us/app/air-hockey/id286106725?mt=8 ) is an example of an app that does this same thing. My instinct is that there are many apps that do. But the bulk of apps dont seem to have this issue.
I've done everything I can do make sure all views and view controllers are properly released, but it's almost like the device is taking a while to truly shut down even though the app has visually disappeared, and if you restart the app within probably 3 seconds or less then it still has something in the window buffer, or tht the full on view controller hasn't truly been released yet.
Anybody seen something like this and been able to solve it?
I'm the dev of that Air Hockey - It looks like it's probably Flurry that's causing it. I have a version without Flurry & it doesn't do it.
I solved this problem by updating my Flurry files to the latest version. http://dev.flurry.com/iphone_uploadNewVersion.do

App is fast on 3GS but slow on 3G

I'm new to computer coding and have just finished coding an app and tested it on both 3G and 3GS. On 3GS, it worked as normal as on the simulator. However, when I tried to run it on 3G, the app becomes extremely slow. I'm not sure what's the reason and I hope someone could shed some light on me.
Generally, my app has a couple of view controller classes, with one of them being the title page, one being the main page, one is setting, etc. I used a dissolve to transition from the title page to the main page. But even this simple transition shows un-smooth performance on a 3G! My other part of the app involves zooming in to some images by scaling up the images, switching images by push or dissolve upon receiving touch events, saving photos into photo library and storing and retrieving some photos in a folder and some data in a SQlite database, each showing un-smooth actions.
Compared with some heavy graphic or heavy maths app, I think mine is pretty simple. I totally have no clue why the app would behave so slow and un-smooth that it is barely useful on a 3G. Any help/ direction would be much appreciated. Thanks for helping out.
You might want to try profiling your application with Shark to find out where the performance bottlenecks are.
I don't know how relevant it is to your case, but my game (shameless plug) MultiMaze is quite undemanding graphically, and worked beautifully on my 3GS. But when I tried it on a 3G, the frame rate dropped to a glacial 10-20 fps. I ported the whole code base from CoreGraphics to OpenGL ES, and that made a world of difference. It now runs at the limit (60 fps) on my 3GS and very close to it on the 3G.
Are you using a lot of memory? 3G has 128MB while the 3GS has 256MB RAM.
Are you getting memory warnings? In my debug builds I have an NSLog in didReceiveMemoryWarning so I can see if/when I get warnings.
EDIT: Check the size of your photos, are they resized for the iPhone screen or are they original sized?
OK, finally found the problem and got the solution. The problem was that I have about a dozens of transparent images laying on each other to form my main view. So when in any animation, the system needs to redraw on every single layer and calculate their transparent effect and so on. (actually I'm not quite sure, but that's what I think)
The solution I have is to make a temporary composite view containing of them all, and placing the composite as an image in a full screen view before starting any animation. It delays starting the fade a moment, but the fade itself is a lot smoother now.