0

i using this code but sometimes i have a received Exc bad access

here is the code :

- (void)operationDidStart {
    [self.lock lock];
    if (! [self isCancelled]) {
        self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO];

        NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
        for (NSString *runLoopMode in self.runLoopModes) {
            [self.connection scheduleInRunLoop:runLoop forMode:runLoopMode];
            [self.outputStream scheduleInRunLoop:runLoop forMode:runLoopMode];
        }

i have received AFnetworking signal Sigbart

*[self.outputStream scheduleInRunLoop:runLoop forMode:runLoopMode];

FLAC__STREAM_ENCODER_UNINITIALIZED

some times

Thread 7 AFNetworking EX_BAD_ACESS (code =1, address=OxO)

user2296278
  • 528
  • 1
  • 4
  • 17
  • Clearly, somehow `self.outputStream` is getting initialized with a mutable dictionary, which doesn't make sense. Can you show your code in which you configure and use the `AFURLConnectionOperation` (or its subclass)? – Rob Oct 27 '13 at 19:07
  • i using this sample code : http://code4app.net/ios/Voice-Texting/519a45a46803faf843000007 – user2296278 Oct 27 '13 at 19:10
  • i change something in error codes @Rob – user2296278 Oct 27 '13 at 19:19
  • I see nothing obvious in your AFNetworking call, but given diverse array of errors (originally "exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM scheduleInRunLoop:forMode:]", now `EXC_BAD_ACCESS` and/or "`FLAC__STREAM_ENCODER_UNINITIALIZED`"), it smells like some memory management problem. Unfortunately, my first line of defense, running it through the static analyzer, reports a ton of issues, most of which are not in your app code. I'd suggest editing your scheme and turning on the sundry memory management flags on the diagnostics tab. Also turn on exception breakpoints. – Rob Oct 28 '13 at 15:32

0 Answers0