iPhone MKTileCache error - map - iphone

In console I get the following error:
[MKTileCache synchronize](MKTileCache*, objc_selector*) called while in background!
Scenario: from a view controller I load the map activity, go back and exit the app using home button.
Does anyone know how to get rid of this error, I think that might be a memory leak.
Thanks in advance.

Related

Exception on app startup in device,works fine in simulator

The application works fine on the simulator but breaks in start up in device as in the figure
I tried some of the solution in SO but It doesnt work out.What may be the reason ?How can i find it? How to resolve it
For clarity
Tried : Changing the view controller the viewcontroller. view did load and all functions are working fine after that when the view tries to appear on the screen the crash appears
UPDATE : Now getting the error logged as
*** -[Not A Type retain]: message sent to deallocated instance 0x208c9610
I had the same issue before. This is not a crash. Please remove all your break points and run it again.
This is a Breakpoint error ..... It normally occurs when you add a breakpoint to an app running in the device. If you add the breakpoints before the app has been built and run it again.... The crash will not occur.
Even I couldn't figure out why this crash should occur in the first place but it does.
OK found out the problem.I am using an external library which does not implement ARC so it has to be flagged.all files except 2 are not flagged as -fno-objc-arc and hence the issue.

Prevent app to crash when I open multitask

When my app is launched, and I double tap on the home button to display the bottom bar containing all the running application (multitasking), My App crashes, and I have no idea where it can come from !!
Any help please ?
Ok, I found it, actually I had nothing in the stack nor in the console log, except a "Program ended with exit code: 255", but that's I quit the application in the applicationWillResignActive, using exit(-1). Thanks anyway

App crashes when trying to use UITableView

When launching my tab-based app, it crash when I'm trying to navigate to a tab with a UITableView in it, probably due to Interface Builder wrong connection I've made.
I have absolutely no idea why... I'm getting crazy over here!
I've simplified my code so now it contains 2 tabs; when trying to navigate to the non-active tab, the app crashes with no further explanation.
I've posted the simplified source here: source download.
Any help will b appreciated.
Load the name of the UIViewController in tab. VideosGalleryViewController was not mentioned in the class. Check the screen shot attached.

How to debug iPhone applications

how can i debug applications for iPhone in Objective-C, XCode
i mean ok, XCode and debug mode is fine, but when my application crashes on
BAD_ACCES (or smth. smilliar) i just get the trace to assembly
when iam debugging C++ and lets say want to access an invalid pointer, i get a trace right to the line of code where everything crashed... here i just get a trace to many internal functions in assembly, so i dont have a clue what and where went wrong
probably some release / retain problem, but how can i find out?
thank you
Here we go with the full answer:
I've had a look at your app and I think there is a problem with the combination of the UINavigationController and asynchronous http loading in two places. Enabling the zombies did reveal those two errer. The first on I was able to reproduce, the seconds one popped up several times and then not any more.
*** -[DetailViewController respondsToSelector:]: message sent to deallocated instance 0x56d6030
*** -[SearchViewController respondsToSelector:]: message sent to deallocated instance 0x56daa10
I've just throttled my bandwidth to see if those errors are connected to http requests. Look at [Throttling Bandwidth On A Mac][1] to set up a slow connection. I set it to 5KBytes/sec.
The first error occurs if you go very quickyl down to the details and then two levels up again and as a last action to trigger the error: click on search. The stacktrace shows a
#2 0x004545b8 in -[UIWebView webView:decidePolicyForMIMEType:request:frame:decisionListener:]
and there are some threads open, so looking at the dropdown, there is a webThread. Showing that thread reveals something going on with the webview loading the detailPages url. This hints that the webiew actually finished loading in a seperate thread and wasn't able to connect back to the webview itself [DetailViewController respondsToSelector:]. This can be easily proofed: remove the loading of the request for the webview: I wasn't able to reproduce the error.
Solution problem 1
The problem is easily fixed, as the webview is not released in the dealloc. Setting delegates to nil of objects is also recommended, but not needed in this case.
- (void)dealloc {
webView.delegate = nil;
[webView release];
}
The second error
The stackTrace shows a
CLLocationManager onClientEventLocation:
Solution error
Same as error 1, set the delegate to nil and release the locationManager.
When your app crashes you cann open up the debugger in the left hand window you can see the stacktrace. You can double click any line which will jump to correct position in your code(if the called method is of yours).
Goto Project->Edit Active Executable->Arguments Tab
Add the Variable in the lower window by clicking on +
Name:NSZombieEnabled
Value:YES
This tries to resolve memory addresses to class names for bad excess errors.
To find out about memory leaks, open Run->Run with performance tool->Leaks. This will open up instruments which is a brillant tool to find leaks.
Are you using XCode 3? If so, I would highly advise upgrading to XCode 4. The debugger in XCode 4 is brilliant in comparison. It let's you step back through the code and see exactly what caused the crash.

My app crash on exit after upgrading to iOS 4.0 sdk. How to fix this?

Everytime I quit the app in the simulator.
The console display this error message:
*** -[NSThread _nq:]: message sent to deallocated instance 0x6d770e0
Looks the app try to access an deallocated instance.
But I cannot find it anyhow, even using the instrument.
I can't find the line of code that cause the problem.
p.s. I have already tried any ways that I know to debug this problem. but no success yet.
I enabled NSZombie and use instrument to help me to find out the error. But the error report did not point to any of my own code. I have no idea why this happen.
Double click on your executable in the left pane in XCode, go to the arguments tab, add a new one named NSZombiesEnabled and set its value to YES. This will set all deallocated instance to an NSZombie and you'll be able to tell what type is being deallocated.
NOTE: THis must be turned off after or your app will never release memory!
Fixed, this problem is that I access interface objects not in the main thread. you can do so by [self performSelectorOnMainThread....].