Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash #76

Open
sylverb opened this issue Dec 19, 2015 · 0 comments
Open

Crash #76

sylverb opened this issue Dec 19, 2015 · 0 comments

Comments

@sylverb
Copy link

sylverb commented Dec 19, 2015

Hi,
I got a crash report from an user:
UPnPDB.m line 317 :
Fatal Exception: NSInvalidArgumentException
*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil

By reading the code, this seems quite impossible

    while( [readyForDescription count] > 0){
        upnpdevice = readyForDescription[0];
        //fill the upnpdevice with info from the XML
        int ret = [upnpdevice loadDeviceDescriptionFromXML];
        if(ret == 0){
            [self lock];
            //NSLog(@"httpThread upnpdevice, location=%@", [upnpdevice xmlLocation]);

            //This is the only place we add devices to the rootdevices
            [rootDevices addObject:upnpdevice];
            [self unlock];
        }
        [readyForDescription removeObjectAtIndex:0];

    }

Any idea of what could be the problem ? I guess it has to do with asynchronous update of readyForDescription array ... Between the while test and upnpdevice assignment, readyForDescription may have changed !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant