Skip to content

EXC_BAD_ACCESS at the following line #20

Description

@Patrick-Wallin

I have successful uploading the file; however, it crashed at the line of the code:

request.successAction([NSString class], request.serverURL.absoluteString);

EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

Here is what I have the code:

LxFTPRequest *request = [LxFTPRequest uploadRequest];
NSLog(@"create request object");
request.serverURL = [[NSURL URLWithString:FTP_SCHEME_HOST]URLByAppendingPathComponent:FILE_PATH];
request.localFileURL = [NSURL fileURLWithPath:LOCAL_FILE_SAVE_PATH];
request.username = USERNAME;
request.password = PASSWORD;

    request.progressAction = ^(NSInteger totalSize, NSInteger finishedSize, CGFloat finishedPercent) {
        NSLog(@"totalSize = %ld, finishedSize = %ld, finishedPercent = %f", (long)totalSize, (long)finishedSize, finishedPercent);
    };
    request.successAction = ^(Class resultClass, id result) {
        [statusView removeFromSuperview];
        [statusView release];
        
        NSLog(@"resultClass = %@, result = %@", resultClass, result);
    };
    request.failAction = ^(CFStreamErrorDomain domain, NSInteger error, NSString *errorMessage) {
        [statusView removeFromSuperview];
        [statusView release];
        
        NSLog(@"domain = %ld, error = %ld", domain, (long)error);
    };
    NSLog(@"start requesting the FTP!");
    [request start];

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions