LxFTPRequest icon indicating copy to clipboard operation
LxFTPRequest copied to clipboard

EXC_BAD_ACCESS at the following line

Open Patrick-Wallin opened this issue 6 years ago • 0 comments

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

Patrick-Wallin avatar Aug 09 '18 23:08 Patrick-Wallin