Skip to content

KVO Crash #4

@TheoA

Description

@TheoA

Has anyone seen this crash? It's happening rarely but I'm trying to understand if it's in RequestQueue or client code. Line 124 is "isExecuting" and it's also occurring on 120 "isFinished". The queue is running requests with NSURLRequestReloadIgnoringLocalAndRemoteCacheData and a timeout of 120s

[RQOperation finish] in RequestQueue.m, line 124
Reason: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '<NSMallocBlock: 0x1d5e4ab0>: An -observeValueForKeyPath:ofObject:change:context: message was received but not handled. Key path: isExecuting Observed object: <RQOperation: 0x1e8aec40> Change: { kind = 1; new = 0; } Context: 0x0'

- (void)finish
{
    @synchronized (self)
    {
        if (_executing && !_finished)
        {
            [self willChangeValueForKey:@"isExecuting"];
            [self willChangeValueForKey:@"isFinished"];
            _executing = NO;
            _finished = YES;
            [self didChangeValueForKey:@"isFinished"];
            [self didChangeValueForKey:@"isExecuting"];
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions