Building to Replace old version of app with new app version causes app to crash!! reason? - iphone

I have a game project which runs very fine in device in both debug and release mode. I have had two versions of it. Old version and new version with more (later i have added) features, and the bundle id, version for both are same. When I build older version, with no previously installed "myGame" app. It builds fine and runs fine and vice versa if I build new one first.
But the app crashes when I build new version one with old app already installed in ipod touch, and vice versa if I build old version with new app already installed. The console message looks like follows:
/* Old version installed first and build new version */
Running…
gdb-arm-apple-darwin(3441) malloc: *** error for object 0x4601e0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Error launching remote program: failed to get the task for process 6791.
Error launching remote program: failed to get the task for process 6791.
The program being debugged is not being run.
The program being debugged is not being run.
gdb-arm-apple-darwin(3441) malloc: *** error for object 0x42a7d0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
/* New version installed first in device then build old version */
Running…
gdb-arm-apple-darwin(4195) malloc: *** error for object 0x45e710: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Error launching remote program: failed to get the task for process 7079.
Error launching remote program: failed to get the task for process 7079.
The program being debugged is not being run.
The program being debugged is not being run.
I can also solve this issue by simply deleting the previously installed app from device. But I want to know the root cause of this crash and I am also afraid if I had my new version app in appStore, It would be very inconvenient to ask user to delete old version first to use new version.
So, please help me to get through this situation. Thanks to any any kind of information.
mysticBoy59
PS: I used the same old version of app and added the features to make new version. Doesn't new one supposed to replace old one easily? As we go on adding features and build and test !!

Since I found out the way to solve my issue, I am explaining a little about it. Normally when we search solution for "The program being debugged is not being run" we just simply delete our older (existing) app in the device and do a new build which seems to work fine.
But the crash, yes of course there is some issue within it which I ignored first. The actual problem was that there was slight product name change in the build settings -> Packaging.
As i have to mention, this game project was done by me and my friend, he had have little change on the Product Name (included white space) when he was doing this programming part (I guess accidentally).
This causes the conflict in Product Name within the new and old app version causing crash. Now it works fine. So any of you people ever encounter it, you need check these first. Because most of games are big projects and number of developers are involved in it. So, can cause these actions sometime.
Any way thanks for all who read it. And go going... :)

I would say check the data you are saving to the device first. It is possible that the old version is writing something to the phones memory that is being read by the new version and causing it to crash.

Related

Xcode fails to build the project due to Bus error: 10

I'm trying to "archive" an existing project after Xcode upgrade to 10.2 (10E125) and it continuously fails.
But it works perfect when I'm building and running the project on simulator / device and even when target device is "Generic iOS Device".
Looks like the issue is related only to "Archive" function.
Complete error text is the following:
Command failed due to signal: Bus error: 10
and no extra details unfortunately..
I've already tried Cleaning the project, removing "Derived Data", restarting my Mac but nothing helps.
Could you please suggest if that's can be fixed or any workaround exist?
Still not able to find a 100% valid solution to that but notice that continuously trying to Archive sometimes succeeds without any code / configuration changes (randomly)
I would say each ~10th Archive attempt succeeds.
That's my temporary workaround for now - Archive until Archived...

Xcode: No copy of xxx.app/xxxDev found locally, reading from memory

I decided to make a separate target for my development app using Xcode 4.1. I duplicated the target, changed the bundle ID, made a new scheme. The original target was called "xxx" and the new one is "xxxDev".
The app builds, runs and debugs (sort of) correctly on the iPhone/iPad. Both versions; Dev and non-dev are on the iPhone. Only two problems:
1) when debugging, every so often xCode is not able to attach to the process it just launched.
2) I always get the warning
warning: Unable to read symbols for /Users/jon/Library/Developer/Xcode/DerivedData/xxx-eesunloavphkaraezppecayjklqw/Build/Products/Debug-iphoneos/xxx.app/xxxDev (file not found).
The file is correctly built under
/Users/jon/Library/Developer/Xcode/DerivedData/xxx-eesunloavphkaraezppecayjklqw/Build/Products/Debug-iphoneos/xxxDev.app/xxxDev
For some reason when running the debugger it is somehow holding on to the old build directory "xxx.app" and I can't find how I can change this. The scheme I am using points to the xxxDev.app executable.
I've grepped every possible file in the various directories and found nothing.
Does anyone have any ideas?
Got the same thing with XCode 4.2b5 last week-end. Reinstalling XCode did the trick for me.

problem with linked libraries or classes?

i recently finished one project..now when i create a new navigation project in xcode and try to run it in simulator the application crashes and error in debugger window shows that i am missing some classes which i had used in my previous project(not in this one) and in some cases it gives
Couldn't register com.yourcompany.GuessGame with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.
is this some problem related to linked libraries??
I assume you're tried restarting the simulator / restarting XCode / cleaning your build (build->Clean All Targets) ?
What's the name of your first project beacuse if it's com.yourcomany.GuessGame as well, you might run into problems?

iPhone Application crashes in "AdHoc" mode

i got a little application which is working very well with my "debug" configuration on my phone and in simulator.
i created a adhoc provisioning profile, and added a "beta" configuration to it.
trying to launch the application with the ad-hoc configuration crashes my application immediatelly.
the console output is:
Running…
Error launching remote program: failed to get the task for process 2434.
Error launching remote program: failed to get the task for process 2434.
The program being debugged is not being run.
The program being debugged is not being run.
i also created a dist.plsit, unchecked the get-tast-allow and setted this file in my built settings under code signing.
does anyone have an idea?
thanks!
Sometimes when you change lots of things, especially build configs, xcodebuild doesn't seem to figure out which files are stale and links in old stuff that needs to be rebuilt. Try doing a Clean All or just delete your build directory from the project dir. That seems to solve most of these bizarre-ass unexplainable problems for me.
simple thing. i clicked "built and run" instead of "built".
an ad-hoc version cannot be debugged :D

Xcode 3.2.1 - Symbol / Documentation lookup is failing based on mystery plugin/preference

Since upgrading to Xcode 3.2.1, I've experienced a strange issue that has really killed my workflow. The issue only exhibits itself under my own user account (the same project opened by a different user works fine). Therefore, the heart of this question is, "what does Xcode load from the user directory that could conceivably cause this issue?"
(System: Snow Leopard 10.6.1; Xcode 3.2.1 w/ iPhone SDK 3.1.2)
Symptoms:
Code completion only works on symbols of the current class or already referenced in the class. Virtually useless.
Document/reference lookups (i.e. option-double-clicking on an identifier or symbol returns this strange result): "Documentation not found for the symbol 'symbol name'. Click here to view symbol declaration."
Like I said, since other users are experiencing normal behavior in Xcode, this must be due to something only loaded for my user account. I've already eliminated ~/Library/Preferences/com.apple.Xcode.plist, ~/Application Support/Developer,~/Application Support/Xcode`.
The only thing I've recently installed is mogenerator (the defunct xmod integration may have killed it, but it doesn't install anything to the user directory)
Update: 10/26/09
This one is really starting to kill me. I did a fresh OS X install, followed by an Xcode 3.2 install from the Leopard disc, followed by an iPhone SDK install from the ADC site, and this started occurring again within 30 minutes of my having started working. I'm at an utter loss. The error is most obvious when option-double-clicking on a symbol (say, the NSString class) and instead of getting the documentation snippet, a message "Cannot determine the symbol for the current selection." appears.
Update: 10/26/09 #2
I just tried creating a fresh project, and that project's symbols are appearing fine. So the issue is apparently local to my project. Hopefully that's a better start. To demonstrate what I'm talking about, here's a screen of the issue manifesting itself with respect to documentation:
Have you tried rebuilding your CodeSense index? Project > Edit Project Settings > General >
alt text http://idisk.mac.com/cdespinosa/Public/Rebuild.png
After doing that, check Console.app to see if Xcode issued any warnings. It's possible that some of your source code causes the indexer to stop, and you don't end up with a valid index. Filing a bug with Apple and providing the source, if possible, would help Apple fix problems like this.
This is the first thing I'd try:
alt text http://img.skitch.com/20091026-ek3id5s121wqrsiu8apwm4qgir.png
Wait until it doesn't say "Getting" anywhere anymore before doing anything documentation related.
Given the clues from the console:
10/26/09 7:21:58 PM Xcode[19072] Warning: Couldn't discover the 'clang' compiler's built-in search paths and preprocessor definitions for language dialect 'objective-c'. This may lead to indexing issues.
Compiler: /Developer/usr/bin/clang
Reason: clang version 1.0.1 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-24 exported)
Target: x86_64-apple-darwin10
clang: warning: not using the clang compiler for the 'armv6' architecture
I'm going to say that you tried to configure an iPhone Device build to use the Clang compiler, which is not yet supported for compilation. (It works for static analysis, but not for building).
Find the Compiler Version build setting and set it back to gcc 4.2.
I had this same problem and I was able to workaround it by:
Setting the target to be the iPhone simulator
Quit and relaunch Xcode
Rebuild the index
Clean and rebuild the simulator target
Maybe it's a bug in Xcode with iPhone device selected when a project is first opened.