Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several users reporting crash related to Kal #46

Open
DrBeak1 opened this issue Sep 7, 2011 · 0 comments
Open

Several users reporting crash related to Kal #46

DrBeak1 opened this issue Sep 7, 2011 · 0 comments

Comments

@DrBeak1
Copy link

DrBeak1 commented Sep 7, 2011

Greetings, I first want to say that I love the Kal framework - very cool.

Recently several users have reported that upon tapping the UIButton which pushes a KalViewController onto the navigation stack my application crashes. It seems that it is only a small number of users (only about 7 have reported this). Most say that everything is working just fine. One of the users provided me with his crash logs which pointed me towards the following lines of code, with "receivedTouches" coming up as the final call to my framework before the crash. "loadItemsFrom" is just behind it so I thought I'd inspect there as well, but cannot seem to find anything in either:

-[KalGridView receivedTouches:withEvent:](in myApp) (KalGridView.m:118)
//AND
-[KALDataSource loadItemsFrom:to:delegate:](in myApp) (KALDataSource.m:147)

Here are the two methods these lines are pointing to. I cannot see anything that would cause a crash though. Any help is greatly appreciated:

  • (void)receivedTouches:(NSSet *)touches withEvent:event
    {
    UITouch *touch = [touches anyObject];
    CGPoint location = [touch locationInView:self];
    UIView *hitView = [self hitTest:location withEvent:event];

    if (!hitView)
    return;

    //ATOS SPECIFICALLY INDICATES THE "IF" LINE BELOW
    if ([hitView isKindOfClass:[KalTileView class]]) {
    KalTileView tile = (KalTileView)hitView;
    if (tile.belongsToAdjacentMonth) {
    self.highlightedTile = tile;
    } else {
    self.highlightedTile = nil;
    self.selectedTile = tile;
    }
    }
    }

//AND

  • (void)loadItemsFrom:(NSDate *)fromDate to:(NSDate *)toDate delegate:(id)delegate
    {

    int i;

    for (i = 0; i < [MainDataArray count]; i++) {
    NSString *name;
    NSString *comment;
    NSString *number;
    NSString *score;

    NSMutableDictionary *d = [[NSMutableDictionary alloc] initWithDictionary:[MainDataArray objectAtIndex:i]];
    name = [d objectForKey:@"theName"];
    comment = [d objectForKey:@"theDesc"];
    score = [NSString stringWithFormat:@"%@ %@", [d objectForKey:@"theScoreType"], [d objectForKey:@"theScore"]];
    int n = i;
    
    number = [NSString stringWithFormat:@"%i", n];
    //ATOS SPECIFICALLY INDICATES NSDATEFORMATTER LINE BELOW
    NSDateFormatter *fmt = [[NSDateFormatter alloc] init];
    [fmt setDateFormat:@"MMM dd, yyyy"];
    NSDate *date = [fmt dateFromString:[d objectForKey:@"theDate"]];
    
    [fmt release];
    
    [items addObject:[anItem itemNamed:name country:score date:date rowNumber:number]];
    
     [d release];
    

    }

    [delegate loadedDataSource:self];
    }

Please help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant