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

EXC_BAD_ACCESS at the following line #20

Open
Patrick-Wallin opened this issue Aug 9, 2018 · 0 comments
Open

EXC_BAD_ACCESS at the following line #20

Patrick-Wallin opened this issue Aug 9, 2018 · 0 comments

Comments

@Patrick-Wallin
Copy link

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];
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