I'm developing iphone application with localization in Russian and English languages.
For localization I use Localazible.strings file, and also have a copy of Russian and English set of images.
The problem is: when I switch language and application is running in background, and then I'm trying to run application, it crashes, iphone reboots, and starts rebooting over and over. Only switching off and then switching on helps. After doing it I can run application in any language.
When application crashes debugger says only "program received signal 0".
How can I get reasons of such device behavior? These problem occurs on iphone 3gs with iOS 4.1 (jailbreak), iPad with iOS 4.2.1, iPhone 4 iOS 4.3.3 and DON'T occurs on iPhone 4 iOS 4.2.1.
When you change the language while debugging an app through Xcode, the app is killed by the system (during the reboot) and the debugger interprets that as a sigkill, which is what it is telling you - "program received signal 0".
Because the debugger has seen your app killed, it needs to be stopped from within Xcode before you can run it again, other wise you get what looks like a crash on launch and other such errors like "broken pipe" or "unable to start debugger, maybe it is hung in another process".
You won't be able to test a normal "resume from background" when changing language because changing the language restarts springboard and therefore your app is killed.
If you maintain UI state manually (as used to be required before multitasking) then you can restore it on the next launch of your app and maintain an illusion of multitasking.
Related
I am encountering a strange behaviour, my app runs smoothly on simulator but crashes on device.
Also when i try to detect leaks using instruments it just crashes on both simulator and device.
I am totally stuck as i am not even able to generate any error message on console, also NSZombieEnabled is on in the settings.
I can see two possible reasons for the behavior you describe:
device is short on memory; (but you would see some processing in this case)
your app uses a newer SDK than what you have installed on your device (like using the SDK 5 twitter framework and then running your app on an SDK 4 device).
Specifically, in case 2, you would not see any log messages because the app would fail as soon as it tries to load the missing framework in memory.
In any case, inspect the device log in Xcode Organizer window to have more info about the crash. This is the only way you can understand what is happening.
am new to the ios application development.
I had developed an application on iOS platform using 4.3 SDK.
When it runs on simulator or a device, if we are trying to press on the application icon again after quit the application at run time, the application is again starts its execution from the begining, not from the previous stage it has stopped.
By going throgh the documentation i came to know the multitasking facility is inbuilt for an iOS application.
Or we need to do any coding for implementing this multitasking facility.? Experts please help.
Thanks in advance.
Basically you should be able to go background and then foreground when using the simulator. remember that when running on simulator the GDB debugger is attached to the process thus you cannot terminate the app and start again but you can go background and start again. I think there is a good chance you are crashing and that's why the app starts again. Try to implement the app delegate methods "didResignActive" and "didBecomeActive" and make sure you manage the saving of the state correctly there...
I noticed that when the home button is pressed on the iPhone simulator to exit an app and then the app is re-entered it starts off right where it left off. Does this mean that programming persistence is no longer necessary? What if the user presses the power button on their ipod touch?
There are still several cases to mention, which should make it clear that persistence is still necessary!
The Target Device doesn't run iOS4
The Target Device runs iOS 4 but doesn't support Multitasking (like the iPhone 3G)
iOS terminates your background app when it's running out of memory
The App crashes
The Target device reboots
The User manually terminate your app via the "Task Manager"
I'm not fluent with the details, but my understanding is that the application is put to sleep. Just like closing the lib on a Macbook. Persistence is definitely required because your data is not preserved and therefore a power off or application kill will loose it.
If you double click the home button you can see the current app running in background, here you can close an app.
Hower there are some device that can't support multitasking: iPhone 3g and early iPod touch.
Last but not least don't forget that there are a lot of device that still have 3.x iOS version.
I recently updated our test iPhone 3G with the latest version of iOS 4 to be able to test our apps on the new OS. I regret that I didn't read the forums because after the update the device's performance suffered a lot. However this is not a problem because the device still works. The problem is that when I try to debug our app the device freezes for minute and reboots or closes the app and returns to the home screen. When it manages to stop at breakpoint it takes few seconds to step over or out and often there's no debug information about the variables. I assume that this is due to some memory issues because the new OS requires more memory space. I must point out that our app worked fine with the iPhoneOS 3.1.3 and the Xcode 3.2.2 with the 3.2 SDK. It is a Universal app and that runs fine on the iPad too.
I have seen this problem as well when one of my applications was consuming a lot of memory. The background application that handles the remote debugging consumes quite a bit of ram (~15M the last time I had this problem). If your app is fine in standalone mode and crashing under debug then you might be close to the limit running in standalone (as I was).
I noticed that making sure that all other applications were quited or if I rebooted the iPhone that I was able to debug my executable (this was until I found the copied object problem that was causing the memory bloat).
If you have a jailbroken iPhone then you will have other services running consuming memory as well.
the iPad has double the ram 256M than the 3G at 128M.
I have also seen a problem when opening an application with a url encoded with data that runs > 500K that it will crash springboard before your debug session is started with a delayed launch.
App freezes, and the device freezes sometime during launching or closing. This happens especially to the app developed and installed using Xcode. Can anyone explain what's going on, if it's iOS 4 Gold Beta specific issue, or a generic task must be handled by a developer?
Use the Debugger, Console and NSLog() statements to track the progress of your application throughout its life. This will help you track the bug in your application.