nwpalani / gdata-objectivec-client

Automatically exported from code.google.com/p/gdata-objectivec-client
Other
0 stars 0 forks source link

Crash when upload file using r707 library #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

         GDataEntryDocBase *newEntry = [entryClass documentEntry];
        [newEntry setTitleWithString:title];

        NSFileHandle *uploadFileHandle = [NSFileHandle fileHandleForReadingAtPath:path];

        [newEntry setUploadFileHandle:uploadFileHandle];

            [newEntry setUploadMIMEType:mimeType];
            [newEntry setUploadSlug:[path lastPathComponent]];

           // NSLog(@"%ld",[uploadFileHandle seekToEndOfFile]);
            NSURL *uploadURL = [GDataServiceGoogleDocs docsUploadURL];

            /*
             *Leave Conversion out for a moment.
             */

            GDataQueryDocs *query = [GDataQueryDocs queryWithFeedURL:uploadURL];
            NSString *targetLanguage = nil;
            BOOL shouldConvertToGoogleDoc = YES;
            BOOL shouldOCR = NO;
            [query setShouldConvertUpload:shouldConvertToGoogleDoc];
            [query setShouldOCRUpload:shouldOCR];
            [query setTargetLanguage:targetLanguage];
            uploadURL = [query URL];

            // Upload start ===============
            // make service tickets call back into our upload progress selector
            GDataServiceGoogleDocs *service = [docListData docsService];

            //Folder Creation
            GDataServiceTicket *ticket;
            ticket = [service fetchEntryByInsertingEntry:newEntry
                                                             forFeedURL:uploadURL
                                                                  delegate:self
                                                     didFinishSelector:@selector(uploadFileTicket:finishedWithEntry:error:)];

What is the expected output? What do you see instead?

This is the crash information.

Program received signal: "SIGABRT".

+[GTMHTTPUploadFetcher 
uploadFetcherWithRequest:uploadFileHandle:uploadMIMEType:chunkSize:fetcherServic
e:]: unrecognized selector sent to class 0x100138218
2011-10-22 14:06:06.970 Uploader[4653:6703] (
    0   CoreFoundation                      0x00007fff9870b286 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff99c45d5e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff9879740e +[NSObject doesNotRecognizeSelector:] + 190
    3   CoreFoundation                      0x00007fff986f8133 ___forwarding___ + 371
    4   CoreFoundation                      0x00007fff986f7f48 _CF_forwarding_prep_0 + 232
    5   Uploader                                0x0000000100064ec0 -[GDataServiceBase fetchObjectWithURL:objectClass:objectToPost:ETag:httpMethod:delegate:didFinishSelector:completionHandler:retryInvocationValue:ticket:] + 3200
    6   CoreFoundation                      0x00007fff986fd20c __invoking___ + 140
    7   CoreFoundation                      0x00007fff986fd0a4 -[NSInvocation invoke] + 132
    8   Uploader                                0x000000010006c970 -[GDataServiceGoogle fetchAuthenticatedObjectWithURL:objectClass:objectToPost:ETag:httpMethod:delegate:didFinishSelector:completionHandler:] + 1232
    9   Uploader                                0x000000010006dde7 -[GDataServiceGoogle fetchEntryByUpdatingEntry:forEntryURL:delegate:didFinishSelector:] + 663
    10  Uploader                                0x0000000100015794 -[UploadOperation uploadFileAtPath:] + 1556
    11  Uploader                                0x00000001000164c4 -[UploadOperation start] + 148
    12  Foundation                          0x00007fff990809e6 ____NSOQSchedule_block_invoke_2 + 124
    13  libdispatch.dylib                   0x00007fff94eff8ba _dispatch_call_block_and_release + 18
    14  libdispatch.dylib                   0x00007fff94f00799 _dispatch_worker_thread2 + 255
    15  libsystem_c.dylib                   0x00007fff8e2783da _pthread_wqthread + 316
    16  libsystem_c.dylib                   0x00007fff8e279b85 start_wqthread + 13
)
2011-10-22 14:06:06.973 Uploader[4653:6703] *** Terminating app due to uncaught 
exception 'NSInvalidArgumentException', reason: '+[GTMHTTPUploadFetcher 
uploadFetcherWithRequest:uploadFileHandle:uploadMIMEType:chunkSize:fetcherServic
e:]: unrecognized selector sent to class 0x100138218'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff9870b286 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff99c45d5e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff9879740e +[NSObject doesNotRecognizeSelector:] + 190
    3   CoreFoundation                      0x00007fff986f8133 ___forwarding___ + 371
    4   CoreFoundation                      0x00007fff986f7f48 _CF_forwarding_prep_0 + 232
    5   Uploader                                0x0000000100064ec0 -[GDataServiceBase fetchObjectWithURL:objectClass:objectToPost:ETag:httpMethod:delegate:didFinishSelector:completionHandler:retryInvocationValue:ticket:] + 3200
    6   CoreFoundation                      0x00007fff986fd20c __invoking___ + 140
    7   CoreFoundation                      0x00007fff986fd0a4 -[NSInvocation invoke] + 132
    8   Uploader                                0x000000010006c970 -[GDataServiceGoogle fetchAuthenticatedObjectWithURL:objectClass:objectToPost:ETag:httpMethod:delegate:didFinishSelector:completionHandler:] + 1232
    9   Uploader                                0x000000010006dde7 -[GDataServiceGoogle fetchEntryByUpdatingEntry:forEntryURL:delegate:didFinishSelector:] + 663
    10  Uploader                                0x0000000100015794 -[UploadOperation uploadFileAtPath:] + 1556
    11  Uploader                                0x00000001000164c4 -[UploadOperation start] + 148
    12  Foundation                          0x00007fff990809e6 ____NSOQSchedule_block_invoke_2 + 124
    13  libdispatch.dylib                   0x00007fff94eff8ba _dispatch_call_block_and_release + 18
    14  libdispatch.dylib                   0x00007fff94f00799 _dispatch_worker_thread2 + 255
    15  libsystem_c.dylib                   0x00007fff8e2783da _pthread_wqthread + 316
    16  libsystem_c.dylib                   0x00007fff8e279b85 start_wqthread + 13
)
terminate called throwing an exception[Switching to process 4653 thread 0x6703]

What version of the product are you using? On what operating system?
XCode 4.2 
Mac OS X Lion

Please provide any additional information below.

Original issue reported on code.google.com by cccx...@gmail.com on 22 Oct 2011 at 6:27

GoogleCodeExporter commented 9 years ago
This was previously fixed in r708.

Original comment by grobb...@google.com on 22 Oct 2011 at 6:40