English 中文(简体)
单人坠毁。
原标题:iPhone crash.. no console error

<>Update>

我将Zombies变成了......,并得出了这一错误:

*** -[CALayer retain]: message sent to deallocated instance 0x709d1a0

我的过错,对我没有任何意义。 http://www.un.org。 I m 在方案上设立多个州,并向它们分配行动( openMedia:)。 这一行动有“开放式”行动。 一切都发挥了巨大作用,直到行动得到呼吁;行动是在新的窗口上展开的,但一旦停下来,就会坠毁。 我用不同的代码取代“开放式URL”法,它仍然坠毁......思想?

奥索尔没有错误,我获得<>EXC_BAD_ACCESS。 青少年说:

sharedlibrary apply-load-rules all Current language: auto; currently objective-c kill quit Program ended with exit code: 0

几天前,我一直在处理这个问题,我无法说出。 我的争.是巨大的,read似乎运转良好。 我不知道这在Stack Overflow是否合法,但我很乐意向大家支付帮助我解决这一问题的费用。 我的最后期限非常紧。

希望能帮助!

-(IBAction)showMedia:(id)sender {
    NSLog(@"Media Button was pressed");

    //Begin Alert
    [SVProgressHUD showInView:self.view status:@"Loading..."];

    mediaScroll.delegate = self;
    mediaScroll.frame = CGRectMake(15, 60, 240, 185);
    mediaScroll.clipsToBounds = YES;

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.4];

    statsBTN.frame = CGRectMake(272, 76, 48, 46);
    donateBTN.frame = CGRectMake(272, 124, 48, 46);
    shareBTN.frame = CGRectMake(272, 172, 48, 46);
    mediaBTN.frame = CGRectMake(280, 220, 48, 46);

    incViewPopUP.alpha = 0;
    donViewPopUP.alpha = 0;
    shareViewPopUP.alpha = 0;
    mediaViewPopUP.alpha = 1;

    [UIView commitAnimations];

    [self loadMediaList];

    [mediaBTN addTarget:self action:@selector(closePopUp:) forControlEvents:UIControlEventTouchUpInside];
    }


-(void)loadMediaList {
[self.productPointers removeAllObjects];

    NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"date_reported" ascending:NO] autorelease];
    NSArray *sortDescriptors = [NSArray arrayWithObject:sortDescriptor];
    NSArray *sortedArray = [finalMediaList sortedArrayUsingDescriptors:sortDescriptors];
    NSLog(@"Sorted Media Array: %@", sortedArray);

    if (mediaLoaded == NO) {

        NSDictionary *mediaPost;
        for (mediaPost in sortedArray) {

            NSDictionary *inside = (NSDictionary *)[mediaPost valueForKey:@"media"];
            NSLog(@"Inside Array: %@", inside);

            UIButton *mediaView = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
            mediaView.frame = CGRectMake(0, (mx * 100), 225, 100);
            mediaView.backgroundColor = [UIColor clearColor];
            [mediaView addTarget:self action:@selector(openMedia:) forControlEvents:UIControlEventTouchUpInside];
            mediaView.titleLabel.hidden = YES;
            mediaView.titleLabel.alpha = 0;

            mx++; NSLog(@"MX: %i", mx);


            UILabel *mediaDesc = [[UILabel alloc] init];
            mediaDesc.frame = CGRectMake(50, 20, 154, 40);
            mediaDesc.backgroundColor = [UIColor clearColor];
            mediaDesc.font = [UIFont fontWithName:@"Geogrotesque" size:12];
            mediaDesc.textColor = UIColorFromRGB(0xc7c7c7);
            mediaDesc.numberOfLines = 0;
            mediaDesc.lineBreakMode = UILineBreakModeWordWrap;
            mediaDesc.text = [inside valueForKey:@"description"];

            UILabel *mediaType = [[UILabel alloc] init];
            mediaType.frame = CGRectMake(50, 40, 154, 50);
            mediaType.backgroundColor = [UIColor clearColor];
            mediaType.font = [UIFont fontWithName:@"Geogrotesque" size:12];
            mediaType.textColor = UIColorFromRGB(0xffffff);
            mediaType.numberOfLines = 0;
            mediaType.lineBreakMode = UILineBreakModeWordWrap;
            mediaType.text = [[inside valueForKey:@"type"] uppercaseString];


            UIImageView *mediaBorder = [[UIImageView alloc] initWithFrame:CGRectMake(0, 99.0, 220.0, 1.0)];
            [mediaBorder setImage:[UIImage imageNamed:@"bottom_border.png"]];

            UIImageView *mediaArrow = [[UIImageView alloc] initWithFrame:CGRectMake(214.0, 45.0, 6.0, 9.0)];
            [mediaArrow setImage:[UIImage imageNamed:@"media_right_arrow.png"]];


            if ([mediaType.text isEqualToString:@"VIDEO"]) {
                UIImageView *mediaThumb = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 35.0, 30.0, 30.0)] autorelease];
                [mediaThumb setImage:[UIImage imageNamed:@"media_play_icon.png"]];
                [mediaView addSubview:mediaThumb];
                [mediaThumb release];

                [mediaView setTag:1];
                [mediaView setTitle:[inside valueForKey:@"filename"] forState:UIControlStateNormal];
                }

            if ([mediaType.text isEqualToString:@"IMAGE"]) {
                UIImageView *mediaThumb = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 35.0, 30.0, 22.0)] autorelease];
                [mediaThumb setImage:[UIImage imageNamed:@"media_photo_icon.png"]];
                [mediaView addSubview:mediaThumb];
                [mediaThumb release];

                [mediaView setTag:2];
                [mediaView setTitle:[inside valueForKey:@"url"] forState:UIControlStateNormal];
                }


            [mediaView addSubview:mediaArrow];
            [mediaView addSubview:mediaBorder];
            [mediaView addSubview:mediaDesc];
            [mediaView addSubview:mediaType];
            [mediaScroll addSubview:mediaView];
            [self.productPointers addObject:mediaView];

            [mediaArrow release];
            [mediaBorder release];
            [mediaType release];
            [mediaDesc release];
            [mediaView release];
        }
    }

    mediaLoaded = YES;
    [mediaScroll setContentSize:CGSizeMake(225.0f, (mx * 100))];

    //End Alert
    [SVProgressHUD dismiss];
    }


-(IBAction)openMedia:(id)sender {
    NSLog(@"Media opened!");

    NSString *tag = [NSString stringWithFormat:@"%d", [sender tag]];
    NSLog(@"Tag: %@", tag);

    videoID = [sender currentTitle];

    NSString *videoURL = [[[NSString alloc] initWithFormat:@"http://www.vimeo.com/%@", videoID] autorelease];

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:videoURL]];
    NSLog(@"Video URL: %@", videoURL);
    }
最佳回答

malloc ack、,以及

(gdb) info malloc-history 0x1b18b0

<0x1b18b0> 是坏出入错误的地址。 它应当使你更加了解在你的法典中,问题何在。

参见本条关于改进指示的内容


另外,一些法典认为。 帮助

修改:

videoID = [sender currentTitle];
NSString *videoURL = [[[NSString alloc] initWithFormat:@"http://www.vimeo.com/%@", videoID] autorelease];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:videoURL]];

:

videoID = [sender currentTitle];
if (videoID) {
    // no need to alloc then set autorelease, just used a named initializer since they autorelease by default:
    NSString *videoURL = [NSString stringWithFormat:@"http://www.vimeo.com/%@", videoID];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:videoURL]];
} else {
    // deal
}
问题回答

暂无回答




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签