Re: Project fails to attach...
Re: Project fails to attach...
- Subject: Re: Project fails to attach...
- From: Roland King <email@hidden>
- Date: Mon, 06 Jun 2011 21:18:45 +0800
I've taken to wrapping the main call in all my apps in a try-catch with a log for any exceptions. I've had too many cases of a bit of banzai code just blowing up either on init or elsewhere which just takes the app out without a break, log or chance to debug. KVO has shown some of the worst behavior there, I've found that if you don't handle a KVO message properly and drop out to the default superclass implementation, apps tend to just go away without any log at all. This has been since iOS 4.x.
But its not just been KVO, having a try catch around the main has picked up a bunch of crashes I wouldn't have seen otherwise. You might want to try adding one as well at Matt's excellent suggestions.
On 06-Jun-2011, at 9:10 PM, Matt Neuburg wrote:
>> Subject: Project fails to attach...
>> From: Jennifer Usher
>> Date: Fri, 22 Apr 2011 01:21:43 -0700
>>
>> Okay, this seems to be a strange problem....
>>
>> I have some code that was running fine. I tried to make some changes to the project name, got things badly messed up, restored from a backup, and then made the name changes properly (I edited the property settings as instructed in the guide for switching to Xcode 4).
>>
>> Now, my project compiles just fine, but it seems to hang when it tries to run on the simulator. I tried cleaning the project, which caused it to recompile completely, but after it compiles, it just sits there saying it is attaching, but it never runs. This is after quite some time.
>>
>> Any suggestions?
>
> Despite the claim that the code was "running fine", there is probably something wrong with the code or the project. I've just suffered through a couple of frustrating hours of exactly this phenomenon - the project hangs as it tries to run on the simulator, just sitting there saying it is attaching. One could fault Xcode for not giving a more useful error message, but it turned out to be entirely my own fault. Basically the app was crashing before it could even get launched properly (I was releasing something prematurely during the initial setup of the interface). m.
>
> --
> matt neuburg, phd = email@hidden, http://www.apeth.net/matt/
> pantes anthropoi tou eidenai oregontai phusei
> Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
> Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook
> RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
> TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden