简体   繁体   中英

io6 Application Crash when web service calling

Here I have getting Error like this: My code works on ios 4/5 but crash on ios6.0 After these line my application has going to crash

self.con = [[NSURLConnection alloc] initWithRequest:rq delegate:self] if (self.con) {

NSLog(@"connection for CON") myWebData = [[NSMutableData data] retain] }

    ========================================
This method not calling 
-(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
-(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
-(void)connectionDidFinishLoading:(NSURLConnection *)connection

and here below crash log have you see:

        libicucore.A.dylib`ucol_getVersion:
        0x30f92570:  ldr.w  r2, [r0, #204]
        0x30f92574:  cbnz   r2, 0x30f925ae            ; ucol_getVersion + 62
        0x30f92576:  ldr    r2, [r0, #36]
        0x30f92578:  movs   r3, #56
        0x30f9257a:  ldrb.w r2, [r2, #68]
        0x30f9257e:  orr.w  r3, r3, r2, lsr #2
        0x30f92582:  lsls   r2, r2, #6
        0x30f92584:  strb   r3, [r1]
        0x30f92586:  strb   r2, [r1, #1]
        0x30f92588:  ldr    r2, [r0, #36]
        0x30f9258a:  ldrb.w r2, [r2, #69]
        0x30f9258e:  strb   r2, [r1, #2]
        0x30f92590:  ldr    r0, [r0, #32]
        0x30f92592:  cbz    r0, 0x30f925a8            ; ucol_getVersion + 56
        0x30f92594:  ldr    r2, [r0, #36]
        0x30f92596:  ldrb.w r0, [r2, #72]
        0x30f9259a:  ldrb.w r2, [r2, #73]

Just tried it with Xcode Version 4.5.1 (4G1004) and Deployment target 6.0 and no crash here.

Could you provide more informations about your environment ?

I had similar crash while i was exporting songs from iPod media library and was showing the alertview when exporting done. And I found this answer helpful.

Actually moral of the story is that any UI rendering task should be done on MainThread if you are doing multithreading.

I hope this helps.

Source

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM