返回编辑屏幕时应用程序崩溃

发布于 2024-11-30 13:20:23 字数 12473 浏览 0 评论 0原文

我正在尝试构建应用程序的 RSS 提要部分,但每当我对数据库进行更改时,它似乎都会崩溃。 我所拥有的是一些 RSS 提要的列表,导航栏中有一个编辑按钮,单击编辑会将您带到一个页面,该页面允许使用开关选择要在第一页上显示的 RSS 提要。 中的整数值

交换机只是更改数据库第一页

#import "NewsViewController.h"
#import "NewsAddViewController.h"

@implementation NewsViewController

@synthesize feedIDs, rssDB;

#pragma mark -
#pragma mark View lifecycle

- (void)viewDidLoad {
    [super viewDidLoad];

    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:self action:@selector(editFeeds:)];    
}

- (void) editFeeds: (id) sender{
NSLog(@"Editting Feeds");

    NewsAddViewController *newsAddViewController = [[NewsAddViewController alloc]initWithStyle:UITableViewStylePlain];
    newsAddViewController.rssDB = rssDB;
    [self.navigationController pushViewController:newsAddViewController animated:YES];
    newsAddViewController.title=@"Subscriptions";
    [newsAddViewController release];



}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self loadFeedIDs];
    [self.tableView reloadData];
}

#pragma mark -
#pragma mark Table view data source

// Customize the number of sections in the table view.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}


// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    [self loadFeedIDs];
    return [feedIDs count];
}


// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
    }

     // Configure the cell.

    NSDictionary * feedRow = [rssDB getFeedRow:[feedIDs objectAtIndex:indexPath.row]];
    [cell.textLabel setText:[feedRow objectForKey:@"title"]];
    [cell.detailTextLabel setText:[feedRow objectForKey:@"desc"]];
    return cell;
}

#pragma mark -
#pragma mark Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [self loadFeedIDsIfEmpty];

    // clean up aged feed items from the database
    [rssDB deleteOldItems:[feedIDs objectAtIndex:indexPath.row]];

    // create the item view controller
    NewsItemViewController *itemViewController = [[NewsItemViewController alloc] initWithStyle:UITableViewStylePlain];
    itemViewController.rssDB = rssDB;
    itemViewController.feedID = [feedIDs objectAtIndex:indexPath.row];
    [self.navigationController pushViewController:itemViewController animated:YES];
    [itemViewController release];
}

/*
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath {
    [self loadFeedIDsIfEmpty];

    if (editingStyle == UITableViewCellEditingStyleDelete) {
        // must update the database before updating the tableView
        // so that the tableView never has a row that's missing from the database
        [rssDB deleteFeedRow:[feedIDs objectAtIndex:indexPath.row]];
        [self loadFeedIDs];
        [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];        
    }   
}
*/

#pragma mark -
#pragma mark Memory management

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Relinquish ownership any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
    // For example: self.myOutlet = nil;
}


- (void)dealloc {
    // NSLog(@"%s", __FUNCTION__);
    [super dealloc];
    if (feedIDs) [feedIDs release];
    if (rssDB) [rssDB release];
}

#pragma mark -
#pragma mark Database methods

- (NSArray *) loadFeedIDs {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) [self loadFeedDB];
    feedIDs = [rssDB getFeedIDs];
    return feedIDs;
}

- (NSArray *) loadFeedIDsIfEmpty {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) [self loadFeedDB];
    if (!feedIDs || ![feedIDs count]) feedIDs = [rssDB getFeedIDs];
    return feedIDs;
}

- (RSSDB *) loadFeedDB {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) self.rssDB = [[RSSDB alloc] initWithRSSDBFilename:@"bwrss.db"];
    return rssDB;
}

@end

第二页

//
//  NewsAddViewController.m
//  myUCL
//
//  Created by Lion User on 21/08/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "NewsAddViewController.h"

@implementation NewsAddViewController

@synthesize feedIDs, rssDB;

#pragma mark - View lifecycle

-(void)viewDidLoad {
    [super viewDidLoad];
    [self loadFeedIDs];
    [self.tableView reloadData];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

}


#pragma mark -
#pragma mark Table view data source

// Customize the number of sections in the table view.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}


// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    [self loadFeedIDs];
    return [feedIDs count];
}


// Customize the appearance of table view cells.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"SwitchCell"] autorelease];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        UISwitch *switchView = [[UISwitch alloc] initWithFrame:CGRectZero];
        cell.accessoryView = switchView;
        NSDictionary * feedRow = [rssDB getFeedRow:[feedIDs objectAtIndex:indexPath.row]];
        BOOL status = [[feedRow objectForKey:@"show"]boolValue];
        NSLog(@"%i",status);
        [switchView setOn:status animated:NO];
        [switchView addTarget:self action:@selector(switchChanged:) forControlEvents:UIControlEventValueChanged];
        [switchView release];     
        [cell.textLabel setText:[feedRow objectForKey:@"title"]];       
    }
    return cell;
}

- (void) switchChanged:(UISwitch *)sender {
    UISwitch* switchControl = sender;
    //NSLog( @"The switch is %@", switchControl.on ? @"ON" : @"OFF" );
    if (switchControl.on) {
        NSLog(@"switch is on");
       [rssDB updateStatus:[NSNumber numberWithInt:1] :[NSNumber numberWithInt:1]];
        NSLog(@"feed status %@",[rssDB feedStatus:[NSNumber numberWithInt:1]]);

    } else if (!switchControl.on) {
        NSLog(@"switch is off");
        [rssDB updateStatus:[NSNumber numberWithInt:0] :[NSNumber numberWithInt:1]];
        NSLog(@"feed status %@",[rssDB feedStatus:[NSNumber numberWithInt:1]]);
    }
}


#pragma mark -
#pragma mark Memory management

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Relinquish ownership any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
    // For example: self.myOutlet = nil;
}


- (void)dealloc {
    // NSLog(@"%s", __FUNCTION__);
    [super dealloc];
    if (feedIDs) [feedIDs release];
    if (rssDB) [rssDB release];
}
#pragma mark -
#pragma mark Database methods

- (NSArray *) loadFeedIDs {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) [self loadFeedDB];
    feedIDs = [rssDB getAllFeedIDs];
    return feedIDs;
}

- (NSArray *) loadFeedIDsIfEmpty {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) [self loadFeedDB];
    if (!feedIDs || ![feedIDs count]) feedIDs = [rssDB getAllFeedIDs];
    return feedIDs;
}

- (RSSDB *) loadFeedDB {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) self.rssDB = [[RSSDB alloc] initWithRSSDBFilename:@"bwrss.db"];
    return rssDB;
}
@end

堆栈跟踪

2011-08-22 14:03:57.392 myUCL[4890:b303] -[UIGestureRecognizerTarget removeAllObjects]: unrecognized selector sent to instance 0x4cd8cf0
2011-08-22 14:03:57.395 myUCL[4890:b303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIGestureRecognizerTarget removeAllObjects]: unrecognized selector sent to instance 0x4cd8cf0'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x00e795a9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x00fcd313 objc_exception_throw + 44
    2   CoreFoundation                      0x00e7b0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x00dea966 ___forwarding___ + 966
    4   CoreFoundation                      0x00dea522 _CF_forwarding_prep_0 + 50
    5   myUCL                               0x0000749f -[RSSDB getAllFeedIDs] + 79
    6   myUCL                               0x0000db12 -[NewsAddViewController loadFeedIDs] + 130
    7   myUCL                               0x0000d1b3 -[NewsAddViewController viewDidLoad] + 99
    8   UIKit                               0x0017b089 -[UIViewController view] + 179
    9   UIKit                               0x00179482 -[UIViewController contentScrollView] + 42
    10  UIKit                               0x00189f25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
    11  UIKit                               0x00188555 -[UINavigationController _layoutViewController:] + 43
    12  UIKit                               0x001897aa -[UINavigationController _startTransition:fromViewController:toViewController:] + 326
    13  UIKit                               0x0018432a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
    14  UIKit                               0x0018b562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
    15  UIKit                               0x001841c4 -[UINavigationController pushViewController:animated:] + 62
    16  myUCL                               0x0000321f -[NewsViewController editFeeds:] + 255
    17  UIKit                               0x000cb4fd -[UIApplication sendAction:to:from:forEvent:] + 119
    18  UIKit                               0x002ddcc3 -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 156
    19  UIKit                               0x000cb4fd -[UIApplication sendAction:to:from:forEvent:] + 119
    20  UIKit                               0x0015b799 -[UIControl sendAction:to:forEvent:] + 67
    21  UIKit                               0x0015dc2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
    22  UIKit                               0x0015c7d8 -[UIControl touchesEnded:withEvent:] + 458
    23  UIKit                               0x000efded -[UIWindow _sendTouchesForEvent:] + 567
    24  UIKit                               0x000d0c37 -[UIApplication sendEvent:] + 447
    25  UIKit                               0x000d5f2e _UIApplicationHandleEvent + 7576
    26  GraphicsServices                    0x0110f992 PurpleEventCallback + 1550
    27  CoreFoundation                      0x00e5a944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    28  CoreFoundation                      0x00dbacf7 __CFRunLoopDoSource1 + 215
    29  CoreFoundation                      0x00db7f83 __CFRunLoopRun + 979
    30  CoreFoundation                      0x00db7840 CFRunLoopRunSpecific + 208
    31  CoreFoundation                      0x00db7761 CFRunLoopRunInMode + 97
    32  GraphicsServices                    0x0110e1c4 GSEventRunModal + 217
    33  GraphicsServices                    0x0110e289 GSEventRun + 115
    34  UIKit                               0x000d9c93 UIApplicationMain + 1160
    35  myUCL                               0x00001f69 main + 121
    36  myUCL                               0x00001ee5 start + 53
)
terminate called throwing an exceptionCurrent language:  auto; currently objective-c
(gdb) 

I am trying to build the RSS feeds part of my application but it seems to keep crashing whenever I make a change to the database.
What I have is a list of a few rss feed, with an edit button in the naviagtionbar, clicking edit takes you to a page which allows selecting which rss feeds to show on the first page by using switches.
The switches just change an integer value in the db

first page

#import "NewsViewController.h"
#import "NewsAddViewController.h"

@implementation NewsViewController

@synthesize feedIDs, rssDB;

#pragma mark -
#pragma mark View lifecycle

- (void)viewDidLoad {
    [super viewDidLoad];

    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:self action:@selector(editFeeds:)];    
}

- (void) editFeeds: (id) sender{
NSLog(@"Editting Feeds");

    NewsAddViewController *newsAddViewController = [[NewsAddViewController alloc]initWithStyle:UITableViewStylePlain];
    newsAddViewController.rssDB = rssDB;
    [self.navigationController pushViewController:newsAddViewController animated:YES];
    newsAddViewController.title=@"Subscriptions";
    [newsAddViewController release];



}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self loadFeedIDs];
    [self.tableView reloadData];
}

#pragma mark -
#pragma mark Table view data source

// Customize the number of sections in the table view.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}


// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    [self loadFeedIDs];
    return [feedIDs count];
}


// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
    }

     // Configure the cell.

    NSDictionary * feedRow = [rssDB getFeedRow:[feedIDs objectAtIndex:indexPath.row]];
    [cell.textLabel setText:[feedRow objectForKey:@"title"]];
    [cell.detailTextLabel setText:[feedRow objectForKey:@"desc"]];
    return cell;
}

#pragma mark -
#pragma mark Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [self loadFeedIDsIfEmpty];

    // clean up aged feed items from the database
    [rssDB deleteOldItems:[feedIDs objectAtIndex:indexPath.row]];

    // create the item view controller
    NewsItemViewController *itemViewController = [[NewsItemViewController alloc] initWithStyle:UITableViewStylePlain];
    itemViewController.rssDB = rssDB;
    itemViewController.feedID = [feedIDs objectAtIndex:indexPath.row];
    [self.navigationController pushViewController:itemViewController animated:YES];
    [itemViewController release];
}

/*
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath {
    [self loadFeedIDsIfEmpty];

    if (editingStyle == UITableViewCellEditingStyleDelete) {
        // must update the database before updating the tableView
        // so that the tableView never has a row that's missing from the database
        [rssDB deleteFeedRow:[feedIDs objectAtIndex:indexPath.row]];
        [self loadFeedIDs];
        [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];        
    }   
}
*/

#pragma mark -
#pragma mark Memory management

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Relinquish ownership any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
    // For example: self.myOutlet = nil;
}


- (void)dealloc {
    // NSLog(@"%s", __FUNCTION__);
    [super dealloc];
    if (feedIDs) [feedIDs release];
    if (rssDB) [rssDB release];
}

#pragma mark -
#pragma mark Database methods

- (NSArray *) loadFeedIDs {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) [self loadFeedDB];
    feedIDs = [rssDB getFeedIDs];
    return feedIDs;
}

- (NSArray *) loadFeedIDsIfEmpty {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) [self loadFeedDB];
    if (!feedIDs || ![feedIDs count]) feedIDs = [rssDB getFeedIDs];
    return feedIDs;
}

- (RSSDB *) loadFeedDB {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) self.rssDB = [[RSSDB alloc] initWithRSSDBFilename:@"bwrss.db"];
    return rssDB;
}

@end

second page

//
//  NewsAddViewController.m
//  myUCL
//
//  Created by Lion User on 21/08/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "NewsAddViewController.h"

@implementation NewsAddViewController

@synthesize feedIDs, rssDB;

#pragma mark - View lifecycle

-(void)viewDidLoad {
    [super viewDidLoad];
    [self loadFeedIDs];
    [self.tableView reloadData];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

}


#pragma mark -
#pragma mark Table view data source

// Customize the number of sections in the table view.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}


// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    [self loadFeedIDs];
    return [feedIDs count];
}


// Customize the appearance of table view cells.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"SwitchCell"] autorelease];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        UISwitch *switchView = [[UISwitch alloc] initWithFrame:CGRectZero];
        cell.accessoryView = switchView;
        NSDictionary * feedRow = [rssDB getFeedRow:[feedIDs objectAtIndex:indexPath.row]];
        BOOL status = [[feedRow objectForKey:@"show"]boolValue];
        NSLog(@"%i",status);
        [switchView setOn:status animated:NO];
        [switchView addTarget:self action:@selector(switchChanged:) forControlEvents:UIControlEventValueChanged];
        [switchView release];     
        [cell.textLabel setText:[feedRow objectForKey:@"title"]];       
    }
    return cell;
}

- (void) switchChanged:(UISwitch *)sender {
    UISwitch* switchControl = sender;
    //NSLog( @"The switch is %@", switchControl.on ? @"ON" : @"OFF" );
    if (switchControl.on) {
        NSLog(@"switch is on");
       [rssDB updateStatus:[NSNumber numberWithInt:1] :[NSNumber numberWithInt:1]];
        NSLog(@"feed status %@",[rssDB feedStatus:[NSNumber numberWithInt:1]]);

    } else if (!switchControl.on) {
        NSLog(@"switch is off");
        [rssDB updateStatus:[NSNumber numberWithInt:0] :[NSNumber numberWithInt:1]];
        NSLog(@"feed status %@",[rssDB feedStatus:[NSNumber numberWithInt:1]]);
    }
}


#pragma mark -
#pragma mark Memory management

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Relinquish ownership any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
    // For example: self.myOutlet = nil;
}


- (void)dealloc {
    // NSLog(@"%s", __FUNCTION__);
    [super dealloc];
    if (feedIDs) [feedIDs release];
    if (rssDB) [rssDB release];
}
#pragma mark -
#pragma mark Database methods

- (NSArray *) loadFeedIDs {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) [self loadFeedDB];
    feedIDs = [rssDB getAllFeedIDs];
    return feedIDs;
}

- (NSArray *) loadFeedIDsIfEmpty {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) [self loadFeedDB];
    if (!feedIDs || ![feedIDs count]) feedIDs = [rssDB getAllFeedIDs];
    return feedIDs;
}

- (RSSDB *) loadFeedDB {
    // NSLog(@"%s", __FUNCTION__);
    if (!rssDB) self.rssDB = [[RSSDB alloc] initWithRSSDBFilename:@"bwrss.db"];
    return rssDB;
}
@end

stack trace

2011-08-22 14:03:57.392 myUCL[4890:b303] -[UIGestureRecognizerTarget removeAllObjects]: unrecognized selector sent to instance 0x4cd8cf0
2011-08-22 14:03:57.395 myUCL[4890:b303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIGestureRecognizerTarget removeAllObjects]: unrecognized selector sent to instance 0x4cd8cf0'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x00e795a9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x00fcd313 objc_exception_throw + 44
    2   CoreFoundation                      0x00e7b0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x00dea966 ___forwarding___ + 966
    4   CoreFoundation                      0x00dea522 _CF_forwarding_prep_0 + 50
    5   myUCL                               0x0000749f -[RSSDB getAllFeedIDs] + 79
    6   myUCL                               0x0000db12 -[NewsAddViewController loadFeedIDs] + 130
    7   myUCL                               0x0000d1b3 -[NewsAddViewController viewDidLoad] + 99
    8   UIKit                               0x0017b089 -[UIViewController view] + 179
    9   UIKit                               0x00179482 -[UIViewController contentScrollView] + 42
    10  UIKit                               0x00189f25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
    11  UIKit                               0x00188555 -[UINavigationController _layoutViewController:] + 43
    12  UIKit                               0x001897aa -[UINavigationController _startTransition:fromViewController:toViewController:] + 326
    13  UIKit                               0x0018432a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
    14  UIKit                               0x0018b562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
    15  UIKit                               0x001841c4 -[UINavigationController pushViewController:animated:] + 62
    16  myUCL                               0x0000321f -[NewsViewController editFeeds:] + 255
    17  UIKit                               0x000cb4fd -[UIApplication sendAction:to:from:forEvent:] + 119
    18  UIKit                               0x002ddcc3 -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 156
    19  UIKit                               0x000cb4fd -[UIApplication sendAction:to:from:forEvent:] + 119
    20  UIKit                               0x0015b799 -[UIControl sendAction:to:forEvent:] + 67
    21  UIKit                               0x0015dc2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
    22  UIKit                               0x0015c7d8 -[UIControl touchesEnded:withEvent:] + 458
    23  UIKit                               0x000efded -[UIWindow _sendTouchesForEvent:] + 567
    24  UIKit                               0x000d0c37 -[UIApplication sendEvent:] + 447
    25  UIKit                               0x000d5f2e _UIApplicationHandleEvent + 7576
    26  GraphicsServices                    0x0110f992 PurpleEventCallback + 1550
    27  CoreFoundation                      0x00e5a944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    28  CoreFoundation                      0x00dbacf7 __CFRunLoopDoSource1 + 215
    29  CoreFoundation                      0x00db7f83 __CFRunLoopRun + 979
    30  CoreFoundation                      0x00db7840 CFRunLoopRunSpecific + 208
    31  CoreFoundation                      0x00db7761 CFRunLoopRunInMode + 97
    32  GraphicsServices                    0x0110e1c4 GSEventRunModal + 217
    33  GraphicsServices                    0x0110e289 GSEventRun + 115
    34  UIKit                               0x000d9c93 UIApplicationMain + 1160
    35  myUCL                               0x00001f69 main + 121
    36  myUCL                               0x00001ee5 start + 53
)
terminate called throwing an exceptionCurrent language:  auto; currently objective-c
(gdb) 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

メ斷腸人バ 2024-12-07 13:20:23

通过堆栈跟踪我会说你调用 -[NSMutable;已释放对象上的removeAllObjects]

by stack trace i would say you calling -[NSMutable<Array,Dictionary,Set> removeAllObjects] on dealoced object

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文