Xcode caught on an infinite loop will crash. (Especially on recursive getters)

Originator:cescofry
Number:rdar://13294696 Date Originated:26-Feb-2013 03:35 PM
Status:Duplicate/11013781 Resolved:
Product:Xcode Product Version:
Classification: Reproducible:
 
26-Feb-2013 03:35 PM Francesco Frison:
Summary: 
If by mistake the code I am running through Xcode falls in an infinite loop. Then Xcode Freezes 

Steps to Reproduce: 
Write a small program that ends up on an inline loop, then run

Expected Results:
There should be a breakpoint after an excessive number of cycles

Actual Results:
Xcode freezes

Regression:
As far as I can remember in all the version of Xcode.

Notes:
Could be interesting to have a configuration flag to turn this behaviour on and off, so for those code that exceptionally need to run an extensive number of operations the breakpoint doesn't trigger.

09-Mar-2013 12:00 PM Francesco Frison:
I tried to set up a sample project to replicate the bug, but without luck. I guess I was wrong. Sorry.


05-Apr-2013 01:11 AM Francesco Frison:
A simple infinite loop as I reported seams not to be enough.
In mistakes like recursing a getter it will occur. Of course here the mistake is clear, but when it happens it takes a while to get Xcode on a working state again.

See code below:

Duplicate of 11013781

@synthesize lastCommand = _lastCommand;

[...]

- (NSString *)lastCommand {
    return [[self.lastCommand componentsSeparatedByString:@" "] objectAtIndex:0];
}

05-Apr-2013 01:11 AM Francesco Frison:
'infinite_loop_sample.txt' was successfully uploaded

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!