escoz / QuickDialog

QuickDialog - Quick and easy dialog screens for iOS
http://escoz.com/open-source/quickdialog
Other
3.07k stars 637 forks source link

QPickerElement generates infinite loop #745

Open francois-roget opened 7 years ago

francois-roget commented 7 years ago

Steps performed

I try to include a QPickerElement in my screen. QPickerElement *q = [[QPickerElement alloc] initWithTitle:@"Test" items:[NSArray arrayWithObject:MAX_DISTS] value:@"150"]; q.key =@"max_dist"; [section addElement:q];

Seen result

The application does not respond for 5-10 sec then I get a BAD_ACCESS on QPickerTableViewCell:20. We can see that there is a recursive call to the same method on line 22.

In the stack trace, you can see about 130 000 calls to the same method

karlozm commented 7 years ago

This is caused by QPickerTableViewCell's initialization, it's calling self instead of super

if ((self = [self initWithStyle:style reuseIdentifier:reuseIdentifier]))

should be

if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]))