Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

a very easy sample. Crash after add SPDY. #22

Closed
nanpoyhl opened this issue Jan 9, 2014 · 4 comments
Closed

a very easy sample. Crash after add SPDY. #22

nanpoyhl opened this issue Jan 9, 2014 · 4 comments

Comments

@nanpoyhl
Copy link

nanpoyhl commented Jan 9, 2014

a very easy sample, only send the same 10 requests on a tcp session. Crash stack:

  • thread Adding podspec.  #6: tid = 0x2a03, 0x3a4e3212 libsystem_c.dylibmemcpy$VARIANT$Swift + 524, queue = 'com.apple.CFURLCACHE_work_queue, stop reason = EXC_BAD_ACCESS (code=1, address=0x78c1310) frame #0: 0x3a4e3212 libsystem_c.dylibmemcpy$VARIANT$Swift + 524
    frame Server Push #1: 0x322dc57c CoreFoundationCFDataReplaceBytes + 564 frame #2: 0x322e9dba CoreFoundationCFDataAppendBytes + 86
    frame Fat Framework - no 64-bit sim support / not a real OS X framework #3: 0x3203a678 CFNetworkCopyAllDataFromDataArray(__CFArray const*) + 108 frame #4: 0x3203abee CFNetwork__CFURLCache::ExecuteSQLInsert(CFCachedURLResponse const, _CFString const, CFURLRequest const) + 374
    frame Fix Typo #5: 0x32038ec6 CFNetwork__CFURLCache::AddCachedResponseForRequest(__CFURLCacheNode_, _CFCachedURLResponse const_, _CFURLRequest const_) + 62 frame #6: 0x32038d1c CFNetwork__CFURLCache::ProcessCacheTasks0(bool) + 144
    frame Feature/xctest #7: 0x32038c80 CFNetwork__CFURLCache::ProcessCacheTasks(bool) + 36 frame #8: 0x32038b54 CFNetwork__CFURLCache::_CFURLCacheTimerCallback0() + 284
    frame ssl connection can instead be configured? #9: 0x32038a2c CFNetwork__CFURLCache::_CFURLCacheTimerCallback(void*) + 32 frame #10: 0x3a4a148e libdispatch.dylib_dispatch_source_invoke + 258
    frame 2g cut to the wifi, the network seems to still use 2g, very slow #11: 0x3a4a3afc libdispatch.dylib_dispatch_queue_drain + 80 frame #12: 0x3a4a167c libdispatch.dylib_dispatch_queue_invoke + 44
    frame Consolidate client didLoadData callbacks. #13: 0x3a4a4612 libdispatch.dylib_dispatch_root_queue_drain + 210 frame #14: 0x3a4a47d8 libdispatch.dylib_dispatch_worker_thread2 + 92
    frame NSURLConnection crash  #15: 0x3a4c87f0 libsystem_c.dylib`_pthread_wqthread + 360

ViewController.m is very sample.

  • (void)viewDidLoad
    {
    [super viewDidLoad];

    NSLog(@"regsiter --- ---");

    //NSString *reginfo = [NSString stringWithFormat: @"http://%@:%d", @"192.168.1.2", 80];
    //[SPDYURLConnectionProtocol registerOrigin: reginfo];

    NSString *reginfo = [NSString stringWithFormat: @"http://%@:%d", @"192.168.1.3", 80];
    [SPDYURLConnectionProtocol registerOrigin: reginfo];

    NSString *url = [NSString stringWithFormat:@"http://192.168.1.2:80/tps/i1/T1H4e7Fn8gXXaGwNsc-640-1096.jpg"];

    for(int i=0; i<10; i++) {
    SpdyClient * client = [[SpdyClient alloc] init];
    client.request = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString:url]];

        client.done = NO;
        [client.request setValue: @"spdy" forHTTPHeaderField: @"x_spdy_request"];
        [client.request setValue: @"www.test.com" forHTTPHeaderField: @"host"];
    
        NSURLConnection *conn=[[NSURLConnection alloc]  initWithRequest:client.request delegate:client];
    
        if (conn) {
            client.receiveData = [[NSMutableData alloc] init];
        }else {
        }
    

    }

    // Do any additional setup after loading the view, typically from a nib.
    }

@goaway
Copy link
Collaborator

goaway commented Jan 10, 2014

@nanpoyhl, thanks for opening the issue. I'll see if I can reproduce this.

@nanpoyhl
Copy link
Author

@goaway ,while i remove handler of SPDY by "[SPDYURLConnectionProtocol registerOrigin: reginfo];" everything is ok.

@goaway
Copy link
Collaborator

goaway commented Jan 21, 2014

Do you still encounter this after 951317a?

@goaway
Copy link
Collaborator

goaway commented Apr 2, 2014

Closing this as it strongly resembles the bug fixed in the above commit which is resolved and merged into master.

@goaway goaway closed this as completed Apr 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants