iOS App - crash when clearing a UITableDetailView

18 views
Skip to first unread message

David Delmonte

unread,
Apr 3, 2012, 6:33:46 AM4/3/12
to Cocoa Development
After changing a setting and removing a subview from a UITableDetailView, I get crashes when I accidentally swipe the detail view.

This is the crash message:

VM Regions Near 0xa7c98f9b:
__LINKEDIT 000000008feea000-000000008fefd000 [ 76K] r--/rwx SM=COW /usr/lib/dyld
--> Submap 0000000090000000-00000000ac400000 r--/rwx machine-wide submap
mapped file 0000000090000000-000000009173e000 [ 23.2M] r-x/r-x SM=COW Object_id=28939148

Application Specific Information:
objc_msgSend() selector name: tableView:editingStyleForRowAtIndexPath:
iPhone Simulator 272.21, iPhone OS 5.1 (iPad (Retina)/9B176)


Thread 0 Crashed:
0 libobjc.A.dylib 0x0291109b objc_msgSend + 15
1 UIKit 0x0138c997 -[UITableView(_UITableViewPrivate) _editingStyleForRowAtIndexPath:] + 90
2 UIKit 0x013a1e74 -[UITableView(UITableViewInternal) _indexPathForSwipeRowAtPoint:] + 456
3 UIKit 0x01398792 -[UITableView _gestureRecognizerShouldBegin:] + 135
4 UIKit 0x015cb0be -[UIGestureRecognizer setState:] + 240
5 UIKit 0x016217d2 -[UISwipeGestureRecognizer touchesMoved:withEvent:] + 1061
6 UIKit 0x0132cf20 -[UIWindow _sendGesturesForEvent:] + 479
7 UIKit 0x0132d532 -[UIWindow sendEvent:] + 93
8 UIKit 0x01313dc4 -[UIApplication sendEvent:] + 464
9 UIKit 0x01307634 _UIApplicationHandleEvent + 8196
10 GraphicsServices 0x02ed7ef5 PurpleEventCallback + 1274
11 CoreFoundation 0x0086f195 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
12 CoreFoundation 0x007d3ff2 __CFRunLoopDoSource1 + 146
13 CoreFoundation 0x007d28da __CFRunLoopRun + 2218
14 CoreFoundation 0x007d1d84 CFRunLoopRunSpecific + 212
15 CoreFoundation 0x007d1c9b CFRunLoopRunInMode + 123
16 GraphicsServices 0x02ed67d8 GSEventRunModal + 190
17 GraphicsServices 0x02ed688a GSEventRun + 103
18 UIKit 0x01305626 UIApplicationMain + 1163

I don't think I even want the detailView to have swipe gestures enabled, so I added this code:

#pragma mark -
#pragma mark Settings support

- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender {
NSLog(@"%s", __FUNCTION__);

[self dismissModalViewControllerAnimated:YES];
[[NSUserDefaults standardUserDefaults] synchronize];
[self.view removeGestureRecognizer:self.swipeLeftRecognizer];
[self.view removeGestureRecognizer:self.swipeRightRecognizer];

for (UIView *subview in [self.view subviews]) {
[subview removeFromSuperview];
[subview removeGestureRecognizer:self.swipeLeftRecognizer];
[subview removeGestureRecognizer:self.swipeRightRecognizer];
clear = 1;
//NSLog(@"Clear is %i", clear);
}
[self viewDidLoad];


}
I repeated the code to stop swipes as I used to work for the Department of Redundancy Department.

I would appreciate any help in how to track where this problem is originating, and where it starts :)

_______________________________________________

Cocoa-dev mailing list (Coco...@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev-garchive-98506%40googlegroups.com

This email sent to cocoa-dev-ga...@googlegroups.com

Marco Tabini

unread,
Apr 3, 2012, 6:45:31 AM4/3/12
to David Delmonte, Cocoa Development
Hi David—

On 2012-04-03, at 6:33 AM, David Delmonte wrote:

> After changing a setting and removing a subview from a UITableDetailView, I get crashes when I accidentally swipe the detail view.

Can you reduce this down to a code sample? There is no such thing as a UITableDetailView (I used to work for the Department of Pedantry ;-)), which suggests that this is a custom class you wrote. Perhaps you're removing something from your table view in a way that ends up causing the crash. For example, are you using a table view with static cells designed in a storyboard? If so, removing rows at runtime is going to be very tricky and, unless you take a lot of precautions, you are likely to get crashes. But, as I said, that's just a guess and we may be able to help you a bit more if we can see some code.

Cheers,


—Mt.

Alex Zavatone

unread,
Apr 3, 2012, 7:21:16 AM4/3/12
to Marco Tabini, Cocoa Development

On Apr 3, 2012, at 6:45 AM, Marco Tabini wrote:

> Hi David—
>
> On 2012-04-03, at 6:33 AM, David Delmonte wrote:
>
>> After changing a setting and removing a subview from a UITableDetailView, I get crashes when I accidentally swipe the detail view.
>
> Can you reduce this down to a code sample? There is no such thing as a UITableDetailView (I used to work for the Department of Pedantry ;-)),

Nothing pedantic about that. There is no such thing as a UITableDetailView.

- Alex Zavatone

Steve Bird

unread,
Apr 3, 2012, 7:52:03 AM4/3/12
to Alex Zavatone, Cocoa Development

On Apr 3, 2012, at 7:21 AM, Alex Zavatone wrote:

>
> On Apr 3, 2012, at 6:45 AM, Marco Tabini wrote:
>
>> Hi David—
>>
>> On 2012-04-03, at 6:33 AM, David Delmonte wrote:
>>
>>> After changing a setting and removing a subview from a UITableDetailView, I get crashes when I accidentally swipe the detail view.
>>
>> Can you reduce this down to a code sample? There is no such thing as a UITableDetailView (I used to work for the Department of Pedantry ;-)),
>
> Nothing pedantic about that. There is no such thing as a UITableDetailView.


That's because David swiped it.


----------------------------------------------------------------
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
www.Culverson.com (toll free) 1-877-676-8175

Kyle Sluder

unread,
Apr 3, 2012, 10:20:46 AM4/3/12
to Steve Bird, Cocoa Development
On Apr 3, 2012, at 4:52 AM, Steve Bird <SB...@Culverson.com> wrote:

>
> That's because David swiped it.

I chuckled. :)

But it's worth remembering we have many non-fluent English speakers on this list who may not know that "swipe" is also slang for "to steal", and thus not realizing you were making a clever pun.

--Kyle Sluder

Mikkel Islay

unread,
Apr 3, 2012, 10:30:43 AM4/3/12
to Kyle Sluder, Cocoa Development

On 3 Apr 2012, at 16:20, Kyle Sluder wrote:

> On Apr 3, 2012, at 4:52 AM, Steve Bird <SB...@Culverson.com> wrote:
>
>>
>> That's because David swiped it.
>
> I chuckled. :)
>
> But it's worth remembering we have many non-fluent English speakers on this list who may not know that "swipe" is also slang for "to steal", and thus not realizing you were making a clever pun.

Clearly, Samsung didn't get it. :)

Mikkel

Alex Zavatone

unread,
Apr 3, 2012, 10:55:58 AM4/3/12
to Kyle Sluder, Cocoa Development
Ahh. My head's been in Xcode for so long, I turned off my humor module, or forgot to alloc init it this morning.

On Apr 3, 2012, at 10:20 AM, Kyle Sluder wrote:

> On Apr 3, 2012, at 4:52 AM, Steve Bird <SB...@Culverson.com> wrote:
>
>>
>> That's because David swiped it.
>
> I chuckled. :)
>
> But it's worth remembering we have many non-fluent English speakers on this list who may not know that "swipe" is also slang for "to steal", and thus not realizing you were making a clever pun.
>
> --Kyle Sluder

- Alex Zavatone

Reply all
Reply to author
Forward
0 new messages