Giter Club home page Giter Club logo

upnatom's Introduction

UPnAtom: Modern UPnP in Swift Version Platform License Build Status

An open source Universal Plug and Play library with a focus on media streaming coordination using the UPnP A/V profile; written in Swift but for both Objective-C and Swift apps. Supports only iOS 8 and higher due to iOS 7's limitation of not supporting dynamic libraries via Clang module.

Requirements:

  • iOS 8.0+
  • OSX 10.9+
  • Xcode 7.2

Install:

Add following to Podfile:

pod 'UPnAtom'

Usage:

Objective-C
@import UPnAtom;
Swift
import UPnAtom
More documentation is on the way.

For now, it is highly recommended you check out the example projects. They are exactly the same app however one is in Swift, and the other is in Objective-C. They demonstrate almost all of the library's features minus the ability to add your own UPnP service/device classes. If you create your own service/device classes simply register them following UPnAtom.swift as an example.

Note: On iOS, transport security has blocked cleartext HTTP (http://) resource loads since it is insecure. Since many, if not most, UPnP devices serve resources over http, temporary exceptions can be configured via your app's Info.plist file. Remove this restriction at your own risk.

Milestones:

  • Usable in both Swift and Objective-C projects via CocoaPod framework
  • Create your own service and device object via class registration
  • UPnP Version 1 Compliance
  • Ability to archive UPnP objects after initial discovery and persist somewhere via NSCoder/NSCoding
  • OSX 10.9+ support
  • Swift 2.0
  • In-house implementation of SSDP discovery
  • A/V Profile Feature parity with upnpx library
  • Documentation (Until then please check out the example projects)
  • UPnP Version 2 Compliance

Tested Support On:

UPnP Servers:
UPnP Clients:

Contribute:

Currently I'm only taking feature requests, bugs, and bug fixes via Github issue. Sorry no pull requests for features or major changes until the library is mature enough.

  • If you'd like to ask a general question, use Stack Overflow.
  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.

upnatom's People

Contributors

master-nevi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

upnatom's Issues

Swift 1.2: Enums with more than one associated value can't hold a generic value.

Because enum Result could contain a generic value or an NSError, the original compiler error was: unimplemented IR generation feature non-fixed multi-payload enum layout.

The original workaround was to use an autoclosure to enclose the generic value in a block that returned the value. As of Swift 1.2, the @autoclosure attribute is now an attribute on a parameter, not an attribute on the parameter’s type, and can only be used in functions, not init or for an enum's associated value.

New workaround is to use a boxing object to wrap the generic value in.
Discussions:

Discover services and devices defined by device

Devices can list their own services and (sub)devices in the serviceList and deviceList properties (and those can in their place list services and devices, etc). In the current implementation discovery is purely done by the SSDP.

Could not bind socket to multicast port

While developing and constantly running/stopping the project, sometimes there would be a bind error and thus SSDP discovery can't be started. This happens seemingly randomly. The branch used is swift-2.1.

The exact error is SSDP discovery did fail with error: Error Domain=UPnAtom Code=0 "Could not bind socket to multicast port" UserInfo={NSLocalizedDescription=Could not bind socket to multicast port}

I checked and GCDAsyncUdpSocket should set SO_REUSEADDR. Also on that development device there is no other app that is started or installed even that uses port 1900. On app termination I call stopSSDPDiscovery. I'm not exactly sure what else can be the problem or how to recover from this without restarting the app manually.

tvOS Support

It seems to be possible since AFNetworking 3.1.0 supports tvOS

Not receiving all incoming events

I'm not completely sure but I have suspicions that sometimes the event subscriptions miss out some incoming events from time to time. Can anybody else confirm this? Am I missing something maybe when setting up maybe?

How to show an image or play video from iPhone to Sony TV

I'm researching a way to cast image or video to Sony TV. I can discover the device with this lib. But I don't know how to show image and video from my iPhone to TV.

UPNP api a bit complicated. Please help and demo code to do that.

I guess first we upload file to GCDWebServer. And then use AVTransport to display it to TV.

Feature parity with upnpx library

  • Add relevant AVTransport1Service SOAP methods
  • Add relevant ConnectionManager1 SOAP methods
  • Add relevant ContentDirectory1 SOAP methods
  • Add relevant RenderingControl1 SOAP methods

After initial discovery, new and removed devices and services are not reported

This is an issue with the 3rd party library called CocoaSSDP, which partially had a bug and partially hadn't even implemented the removal flow. I've fixed it on my own fork of CocoaSSDP and am waiting for a pull request and new version to go through. Another route would be to roll out an SSDP discovery component from scratch and remove this dependency all together.

Swift 1.2: Compiler forces immutable (let) properties to be initialized in phase 1 of object initialization before super.init is called

Swift 1.2 Release notes: "Previously, immutable (let) properties were completely mutable within the body of initializers. Now, they are only allowed to be assigned to once to provide their value". Fails to mention that they can only be initialized once AND only during phase 1 of initialization, before super.init is called. My guess is that due to their mutability within the initializer body, they were actually set to nil before super.init in phase 1 and then set to an actual value when self was usable in phase 2.

Code in Documentation now fails:
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/AutomaticReferenceCounting.html#//apple_ref/doc/uid/TP40014097-CH20-ID55

Dev Forum Discussions:

Current workaround is to turn these constants into implicitly unwrapped privately set variables since

  • Variables can be mutated at any point during initialization
  • Implicitly unwrapped means they can be nil before self is reference but can be safely assumed to contain something afterwards
  • Privately set as to keep them from being set outside of the class similarly to being constant.
// from
public let serviceID: String!

// to
public private(set) var serviceID: String!

required public init?(usn: UniqueServiceName, descriptionURL: NSURL, descriptionXML: NSData) {
        super.init(usn: usn, descriptionURL: descriptionURL, descriptionXML: descriptionXML)

        // self is referenced for the parser
        let serviceParser = UPnPServiceParser(upnpService: self, descriptionXML: descriptionXML)
        let parsedService = serviceParser.parse().value

        if let serviceID = parsedService?.serviceID {
            self.serviceID = serviceID
        }
        else { return nil }
...

No such module UPnPAtom

I am trying to build the example and when I build the Swift example in XCode I get an error that the UPnAtom pod has syntax that is out of date (lines starting with #)

getVolume returns always zero

line 186 of RenderControl1Service.swift
success(volume: Int(String(stateVariableValue)) ?? 0)

unwrapping stateVariableValue solves the problem
success(volume: Int(String(stateVariableValue!)) ?? 0)

Hope it helps to get the library better and better

ssdDiscoveryRunning doesn't change status when discovery ends

repro:

  1. execute discovery (using sample app)
  2. wait for the discovery to complete the posting in console
  3. read the value of the property

unless you use the stop method the property ssDiscoveryRunning is not switched back to false.
There's no signal/event to know when the discovery is ended to call stop.

Swift 1.2: Failable Initializer Error: All stored properties of a class instance must be initialized before returning nil from an initializer

Dev Forum Discussions:

Workaround:
Initialize all non-optional properties before returning nil from a failable initializer :(

Base class case

// from
if let uuid = returnIfContainsElements(UniqueServiceName.uuid(usn: rawValue)) {
     self.uuid = uuid
}
else { return nil }

// to 
if let uuid = returnIfContainsElements(UniqueServiceName.uuid(usn: rawValue)) {
     self.uuid = uuid
}
else {
     self.uuid = ""
     return nil
}

Subclass case
Another case is where a subclass wants to return nil due to an invalid subclass property but can't because it hasn't called super.init. Here it's even more sketchy because you have to declare the constant property as an implicitly unwrapped optional, set it to the value or nil before super.init is called, then after super.init return nil if the property is nil:

public let resourceURL: NSURL!

override init?(xmlElement: ONOXMLElement) {
    if let resourceURLString = xmlElement.firstChildWithTag("res").stringValue() {
        resourceURL = NSURL(string: resourceURLString)
    }
    else { resourceURL = nil }

    super.init(xmlElement: xmlElement)

    if resourceURL == nil {
        return nil
    }
}

subscriptions fails with swift 2.3

configuration: xcode 8, project uses the SWIFT_LEGACY set to 2.3

same code runs ok under xcode 7

I pinpointed the issue on UPnPEventSubscriptionManager.swift line 178

swift 3

Hello there,

Any plan to migrate to Swift 3.0?

Interface enumeration fails on ATV 4 gen

file: GCDAsyncUDpSocket
line 1446

The matching of the currently in use network adapter fails the condition resulting in not making the binding possible when the code exist the call back.

It runs fine in the simulator as it leverages OSX network stack which seems to be compatible with that code.

The issue seems to have the root cause on this line:
func startExploring(forTypes types: [SSDPType], onInterface interface: String = "en0") -> EmptyResult {
assert(_multicastSocket == nil, "Socket is already open, stop it first!")

why the default parameter on the signature of the method?

Does it support Media Server?

I want to make the Media Server from iPhone X via UPnP protocol, so other devices as the control points can connect and access to sharing folder from iPhone X.
Does this lib support?

subscriber fails under xcode 8

config: xcode 8.1
macOS: sierra
set swift switch to legacy 2.3

everything runs ok but the subscription mechanism wich has a race condition when GCDWebserver is initialized.

Swift 2.0: Swift classes must be rooted to NSObject to be exposed to Objective-C

Using pure Swift classes in Objective-C is getting harder and harder every version. The following now generates the compiler error: "Only classes that inherit from NSObject can be declared @objc"

@objc public class UPnPRegistry

Dev Forum Discussions:

You can still treat any Swift class instance as an AnyObject, mark methods and properties on a Swift class as @objc, and conform to Objective-C protocols; the class just isn't exposed in the generated header and doesn't default to having its members available in Objective-C.

Due to this limitation and to keep supporting Objective-C, I'm forced to make public classes NSObject-rooted. Surprisingly, @objc was not required for the Objective-C demo project code to see the class in the generated UPnAtom-Swift.h header, so I omitted it:

public class UPnPRegistry: NSObject

One gnarly effect to be aware of is that if the class is being used as a key in a dictionary, implementing the Hashable protocol is not enough for dictionary lookups to function. Since the class is now an NSObject, my hypothesis is that the underlying dictionary implementation is now an NSDictionary; these require classes to override public var hash: Int and public func isEqual(object: AnyObject?) -> Bool in order to be used as a key. Doing this fixed my lookup issues.

"attempted to retain deallocated object" crash on device discovery

The example app on the swift-2.1 branch crashes on discovery of only some UPnP devices with a "attempted to retain deallocated object" error.

#0  0x00000001007ed418 in _swift_abortRetainUnowned ()
#1  0x00000001007fb0d8 in swift_unknownRetainUnowned ()
#2  0x000000010035f92c in UPnPServiceParser.(init(UPnPServiceParser.Type) -> (supportNamespaces : Bool, upnpService : AbstractUPnPService, descriptionXML : NSData) -> UPnPServiceParser).(closure #4) at [...]/UPnAtom/Source/UPnP Objects/AbstractUPnPService.swift:340
#3  0x000000010034e798 in thunk ()
#4  0x000000010033fccc in AbstractSAXXMLParser.parser(NSXMLParser, didEndElement : String, namespaceURI : String?, qualifiedName : String?) -> () at [...]/UPnAtom/Source/Parsers/AbstractSAXXMLParser.swift:153
#5  0x00000001003401bc in @objc AbstractSAXXMLParser.parser(NSXMLParser, didEndElement : String, namespaceURI : String?, qualifiedName : String?) -> () ()
#6  0x00000001839f7708 in _endElementNs ()
#7  0x0000000197e3d29c in xmlParseEndTag2 ()
#8  0x0000000197e39274 in xmlParseTryOrFinish ()
#9  0x0000000197e37e78 in xmlParseChunk ()
#10 0x00000001839f4a00 in -[NSXMLParser parseData:] ()
#11 0x00000001839f4c58 in -[NSXMLParser parseData:] ()
#12 0x00000001839f4e04 in -[NSXMLParser parseFromStream] ()
#13 0x000000010033e704 in AbstractSAXXMLParser.(startParser in _8BCF080863E3EC808A94616401B0C7C2)(NSXMLParser) -> EmptyResult at [...]/UPnAtom/Source/Parsers/AbstractSAXXMLParser.swift:110
#14 0x00000001003404e8 in AbstractSAXXMLParser.(parse(AbstractSAXXMLParser) -> (data : NSData) -> EmptyResult).(closure #1) at [...]/UPnAtom/Source/Parsers/AbstractSAXXMLParser.swift:96
#15 0x0000000101604ee8 in autoreleasepool(() -> ()) -> () ()
#16 0x000000010033e604 in AbstractSAXXMLParser.parse(data : NSData) -> EmptyResult at [...]/UPnAtom/Source/Parsers/AbstractSAXXMLParser.swift:98
#17 0x0000000100358e74 in UPnPServiceParser.parse() -> Result<UPnPServiceParser.ParserUPnPService> at [...]/UPnAtom/Source/UPnP Objects/AbstractUPnPService.swift:376
#18 0x0000000100353a04 in AbstractUPnPService.init(usn : UniqueServiceName, descriptionURL : NSURL, descriptionXML : NSData) -> AbstractUPnPService? at [...]/UPnAtom/Source/UPnP Objects/AbstractUPnPService.swift:82
#19 0x000000010037e538 in ConnectionManager1Service.init(usn : UniqueServiceName, descriptionURL : NSURL, descriptionXML : NSData) -> ConnectionManager1Service? ()
#20 0x000000010037e4b8 in ConnectionManager1Service.__allocating_init(usn : UniqueServiceName, descriptionURL : NSURL, descriptionXML : NSData) -> ConnectionManager1Service? ()
#21 0x00000001003f7848 in UPnPRegistry.(createUPnPObject in _7D977E0CCE069527737ED3D090664CDE)(usn : UniqueServiceName, descriptionURL : NSURL, descriptionXML : NSData) -> AbstractUPnP? at [...]/UPnAtom/Source/Management/UPnPRegistry.swift:141
#22 0x00000001003fa908 in UPnPRegistry.(addUPnPObject in _7D977E0CCE069527737ED3D090664CDE)(forSSDPDiscovery : SSDPDiscovery, descriptionXML : NSData, upnpObjects : inout [UniqueServiceName : AbstractUPnP]) -> () at [...]/UPnAtom/Source/Management/UPnPRegistry.swift:238
#23 0x000000010040082c in UPnPRegistry.((getUPnPDescription in _7D977E0CCE069527737ED3D090664CDE)(UPnPRegistry) -> (forSSDPDiscovery : SSDPDiscovery) -> ()).(closure #1).(closure #1) at [...]/UPnAtom/Source/Management/UPnPRegistry.swift:221

Example code does not support Delialet Phantom speakers

Deliavlet Phatoms support UPnP (beta) https://help.devialet.com/hc/en-us/articles/115004436969-How-Can-I-Use-UPNP-with-my-Phantom-

Unarchived upnp object from cache Optional("AbstractUPnPDevice") - Optional("Devialet Phantom")
Unarchived upnp object from cache Optional("AbstractUPnPDevice") - Optional("WANDevice")
Unarchived upnp object from cache Optional("MediaRenderer1Device") - Optional("Devialet Phantom")
Unarchived upnp object from cache Optional("AbstractUPnPService") - Optional("Unknown")
Unarchived upnp object from cache Optional("AbstractUPnPService") - Optional("Devialet Phantom")
Unarchived upnp object from cache Optional("AbstractUPnPDevice") - Optional("WANConnectionDevice")
Unarchived upnp object from cache Optional("AbstractUPnPService") - Optional("Unknown")
Unarchived upnp object from cache Optional("AbstractUPnPDevice") - Optional("LANDevice")
Unarchived upnp object from cache Optional("AbstractUPnPService") - Optional("WANConnectionDevice")
Unarchived upnp object from cache Optional("AbstractUPnPDevice") - Optional("TR064 IGD")
Unarchived upnp object from cache Optional("AbstractUPnPService") - Optional("Unknown")
Unarchived upnp object from cache Optional("AbstractUPnPService") - Optional("Unknown")
Unarchived upnp object from cache Optional("AbstractUPnPService") - Optional("Unknown")
Unarchived upnp object from cache Optional("AbstractUPnPService") - Optional("Devialet Phantom")
Unarchived upnp object from cache Optional("AbstractUPnPService") - Optional("Devialet Phantom")
Re-created upnp object AbstractUPnPService - Optional("Unknown")
Re-created upnp object AbstractUPnPService - Optional("Unknown")
Re-created upnp object AbstractUPnPDevice - Optional("LANDevice")
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008fef0 RootFolderViewController.deviceCountForTableSection(_:) + 52
3    ControlPointDemo                   0x0000000100094874 RootFolderViewController.tableView(_:numberOfRowsInSection:) + 48
4    ControlPointDemo                   0x00000001000948b0 @objc RootFolderViewController.tableView(_:numberOfRowsInSection:) + 80
5    UIKit                              0x000000018c768b7c <redacted> + 68
6    UIKit                              0x000000018c766d10 <redacted> + 2072
7    UIKit                              0x000000018c7f6818 <redacted> + 152
8    UIKit                              0x000000018c7f21f8 <redacted> + 4004
9    UIKit                              0x000000018c7f1c00 <redacted> + 1068
10   UIKit                              0x000000018c7f1a84 <redacted> + 140
11   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
12   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
13   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
14   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
15   Foundation                         0x00000001834e6e78 <redacted> + 16
16   Foundation                         0x0000000183428888 <redacted> + 72
17   Foundation                         0x000000018342795c <redacted> + 848
18   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
19   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
23   Foundation                         0x00000001834e85d8 <redacted> + 376
24   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
25   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
26   CoreFoundation                     0x0000000182a67064 <redacted> + 12
27   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
28   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
29   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
30   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
31   ControlPointDemo                   0x0000000100098148 main + 88
32   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008ffcc RootFolderViewController.deviceForIndexPath(_:) + 116
3    ControlPointDemo                   0x000000010009492c RootFolderViewController.tableView(_:cellForRowAt:) + 448
4    ControlPointDemo                   0x0000000100094d84 @objc RootFolderViewController.tableView(_:cellForRowAt:) + 168
5    UIKit                              0x000000018c79a0a4 <redacted> + 668
6    UIKit                              0x000000018c799fa8 <redacted> + 80
7    UIKit                              0x000000018c7fc958 <redacted> + 5168
8    UIKit                              0x000000018c7f92f8 <redacted> + 140
9    UIKit                              0x000000018c7f83c8 <redacted> + 2428
10   UIKit                              0x000000018c7f21f8 <redacted> + 15284
11   UIKit                              0x000000018c7f1c00 <redacted> + 1068
12   UIKit                              0x000000018c7f1a84 <redacted> + 140
13   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
14   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
15   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
16   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
17   Foundation                         0x00000001834e6e78 <redacted> + 16
18   Foundation                         0x0000000183428888 <redacted> + 72
19   Foundation                         0x000000018342795c <redacted> + 848
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
23   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
24   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
25   Foundation                         0x00000001834e85d8 <redacted> + 376
26   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
27   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
28   CoreFoundation                     0x0000000182a67064 <redacted> + 12
29   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
30   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
31   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
32   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
33   ControlPointDemo                   0x0000000100098148 main + 88
34   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Re-created upnp object AbstractUPnPService - Optional("WANConnectionDevice")
Re-created upnp object AbstractUPnPDevice - Optional("WANConnectionDevice")
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008fef0 RootFolderViewController.deviceCountForTableSection(_:) + 52
3    ControlPointDemo                   0x0000000100094874 RootFolderViewController.tableView(_:numberOfRowsInSection:) + 48
4    ControlPointDemo                   0x00000001000948b0 @objc RootFolderViewController.tableView(_:numberOfRowsInSection:) + 80
5    UIKit                              0x000000018c768b7c <redacted> + 68
6    UIKit                              0x000000018c766d10 <redacted> + 2072
7    UIKit                              0x000000018c7f6818 <redacted> + 152
8    UIKit                              0x000000018c7f21f8 <redacted> + 4004
9    UIKit                              0x000000018c7f1c00 <redacted> + 1068
10   UIKit                              0x000000018c7f1a84 <redacted> + 140
11   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
12   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
13   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
14   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
15   Foundation                         0x00000001834e6e78 <redacted> + 16
16   Foundation                         0x0000000183428888 <redacted> + 72
17   Foundation                         0x000000018342795c <redacted> + 848
18   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
19   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
23   Foundation                         0x00000001834e85d8 <redacted> + 376
24   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
25   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
26   CoreFoundation                     0x0000000182a67064 <redacted> + 12
27   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
28   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
29   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
30   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
31   ControlPointDemo                   0x0000000100098148 main + 88
32   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008ffcc RootFolderViewController.deviceForIndexPath(_:) + 116
3    ControlPointDemo                   0x000000010009492c RootFolderViewController.tableView(_:cellForRowAt:) + 448
4    ControlPointDemo                   0x0000000100094d84 @objc RootFolderViewController.tableView(_:cellForRowAt:) + 168
5    UIKit                              0x000000018c79a0a4 <redacted> + 668
6    UIKit                              0x000000018c799fa8 <redacted> + 80
7    UIKit                              0x000000018c7fc958 <redacted> + 5168
8    UIKit                              0x000000018c7f92f8 <redacted> + 140
9    UIKit                              0x000000018c7f83c8 <redacted> + 2428
10   UIKit                              0x000000018c7f21f8 <redacted> + 15284
11   UIKit                              0x000000018c7f1c00 <redacted> + 1068
12   UIKit                              0x000000018c7f1a84 <redacted> + 140
13   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
14   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
15   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
16   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
17   Foundation                         0x00000001834e6e78 <redacted> + 16
18   Foundation                         0x0000000183428888 <redacted> + 72
19   Foundation                         0x000000018342795c <redacted> + 848
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
23   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
24   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
25   Foundation                         0x00000001834e85d8 <redacted> + 376
26   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
27   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
28   CoreFoundation                     0x0000000182a67064 <redacted> + 12
29   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
30   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
31   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
32   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
33   ControlPointDemo                   0x0000000100098148 main + 88
34   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Re-created upnp object AbstractUPnPDevice - Optional("WANDevice")
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008fef0 RootFolderViewController.deviceCountForTableSection(_:) + 52
3    ControlPointDemo                   0x0000000100094874 RootFolderViewController.tableView(_:numberOfRowsInSection:) + 48
4    ControlPointDemo                   0x00000001000948b0 @objc RootFolderViewController.tableView(_:numberOfRowsInSection:) + 80
5    UIKit                              0x000000018c768b7c <redacted> + 68
6    UIKit                              0x000000018c766d10 <redacted> + 2072
7    UIKit                              0x000000018c7f6818 <redacted> + 152
8    UIKit                              0x000000018c7f21f8 <redacted> + 4004
9    UIKit                              0x000000018c7f1c00 <redacted> + 1068
10   UIKit                              0x000000018c7f1a84 <redacted> + 140
11   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
12   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
13   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
14   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
15   Foundation                         0x00000001834e6e78 <redacted> + 16
16   Foundation                         0x0000000183428888 <redacted> + 72
17   Foundation                         0x000000018342795c <redacted> + 848
18   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
19   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
23   Foundation                         0x00000001834e85d8 <redacted> + 376
24   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
25   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
26   CoreFoundation                     0x0000000182a67064 <redacted> + 12
27   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
28   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
29   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
30   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
31   ControlPointDemo                   0x0000000100098148 main + 88
32   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008ffcc RootFolderViewController.deviceForIndexPath(_:) + 116
3    ControlPointDemo                   0x000000010009492c RootFolderViewController.tableView(_:cellForRowAt:) + 448
4    ControlPointDemo                   0x0000000100094d84 @objc RootFolderViewController.tableView(_:cellForRowAt:) + 168
5    UIKit                              0x000000018c79a0a4 <redacted> + 668
6    UIKit                              0x000000018c799fa8 <redacted> + 80
7    UIKit                              0x000000018c7fc958 <redacted> + 5168
8    UIKit                              0x000000018c7f92f8 <redacted> + 140
9    UIKit                              0x000000018c7f83c8 <redacted> + 2428
10   UIKit                              0x000000018c7f21f8 <redacted> + 15284
11   UIKit                              0x000000018c7f1c00 <redacted> + 1068
12   UIKit                              0x000000018c7f1a84 <redacted> + 140
13   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
14   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
15   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
16   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
17   Foundation                         0x00000001834e6e78 <redacted> + 16
18   Foundation                         0x0000000183428888 <redacted> + 72
19   Foundation                         0x000000018342795c <redacted> + 848
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
23   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
24   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
25   Foundation                         0x00000001834e85d8 <redacted> + 376
26   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
27   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
28   CoreFoundation                     0x0000000182a67064 <redacted> + 12
29   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
30   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
31   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
32   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
33   ControlPointDemo                   0x0000000100098148 main + 88
34   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Re-created upnp object AbstractUPnPService - Optional("Unknown")
Re-created upnp object AbstractUPnPService - Optional("Unknown")
Re-created upnp object AbstractUPnPService - Optional("Unknown")
Re-created upnp object AbstractUPnPDevice - Optional("TR064 IGD")
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008fef0 RootFolderViewController.deviceCountForTableSection(_:) + 52
3    ControlPointDemo                   0x0000000100094874 RootFolderViewController.tableView(_:numberOfRowsInSection:) + 48
4    ControlPointDemo                   0x00000001000948b0 @objc RootFolderViewController.tableView(_:numberOfRowsInSection:) + 80
5    UIKit                              0x000000018c768b7c <redacted> + 68
6    UIKit                              0x000000018c766d10 <redacted> + 2072
7    UIKit                              0x000000018c7f6818 <redacted> + 152
8    UIKit                              0x000000018c7f21f8 <redacted> + 4004
9    UIKit                              0x000000018c7f1c00 <redacted> + 1068
10   UIKit                              0x000000018c7f1a84 <redacted> + 140
11   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
12   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
13   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
14   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
15   Foundation                         0x00000001834e6e78 <redacted> + 16
16   Foundation                         0x0000000183428888 <redacted> + 72
17   Foundation                         0x000000018342795c <redacted> + 848
18   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
19   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
23   Foundation                         0x00000001834e85d8 <redacted> + 376
24   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
25   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
26   CoreFoundation                     0x0000000182a67064 <redacted> + 12
27   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
28   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
29   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
30   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
31   ControlPointDemo                   0x0000000100098148 main + 88
32   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008ffcc RootFolderViewController.deviceForIndexPath(_:) + 116
3    ControlPointDemo                   0x000000010009492c RootFolderViewController.tableView(_:cellForRowAt:) + 448
4    ControlPointDemo                   0x0000000100094d84 @objc RootFolderViewController.tableView(_:cellForRowAt:) + 168
5    UIKit                              0x000000018c79a0a4 <redacted> + 668
6    UIKit                              0x000000018c799fa8 <redacted> + 80
7    UIKit                              0x000000018c7fc958 <redacted> + 5168
8    UIKit                              0x000000018c7f92f8 <redacted> + 140
9    UIKit                              0x000000018c7f83c8 <redacted> + 2428
10   UIKit                              0x000000018c7f21f8 <redacted> + 15284
11   UIKit                              0x000000018c7f1c00 <redacted> + 1068
12   UIKit                              0x000000018c7f1a84 <redacted> + 140
13   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
14   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
15   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
16   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
17   Foundation                         0x00000001834e6e78 <redacted> + 16
18   Foundation                         0x0000000183428888 <redacted> + 72
19   Foundation                         0x000000018342795c <redacted> + 848
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
23   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
24   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
25   Foundation                         0x00000001834e85d8 <redacted> + 376
26   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
27   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
28   CoreFoundation                     0x0000000182a67064 <redacted> + 12
29   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
30   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
31   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
32   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
33   ControlPointDemo                   0x0000000100098148 main + 88
34   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Re-created upnp object AbstractUPnPService - Optional("Devialet Phantom")
Re-created upnp object MediaRenderer1Device - Optional("Devialet Phantom")
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008fef0 RootFolderViewController.deviceCountForTableSection(_:) + 52
3    ControlPointDemo                   0x0000000100094874 RootFolderViewController.tableView(_:numberOfRowsInSection:) + 48
4    ControlPointDemo                   0x00000001000948b0 @objc RootFolderViewController.tableView(_:numberOfRowsInSection:) + 80
5    UIKit                              0x000000018c768b7c <redacted> + 68
6    UIKit                              0x000000018c766d10 <redacted> + 2072
7    UIKit                              0x000000018c7f6818 <redacted> + 152
8    UIKit                              0x000000018c7f21f8 <redacted> + 4004
9    UIKit                              0x000000018c7f1c00 <redacted> + 1068
10   UIKit                              0x000000018c7f1a84 <redacted> + 140
11   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
12   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
13   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
14   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
15   Foundation                         0x00000001834e6e78 <redacted> + 16
16   Foundation                         0x0000000183428888 <redacted> + 72
17   Foundation                         0x000000018342795c <redacted> + 848
18   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
19   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
23   Foundation                         0x00000001834e85d8 <redacted> + 376
24   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
25   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
26   CoreFoundation                     0x0000000182a67064 <redacted> + 12
27   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
28   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
29   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
30   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
31   ControlPointDemo                   0x0000000100098148 main + 88
32   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008ffcc RootFolderViewController.deviceForIndexPath(_:) + 116
3    ControlPointDemo                   0x000000010009492c RootFolderViewController.tableView(_:cellForRowAt:) + 448
4    ControlPointDemo                   0x0000000100094d84 @objc RootFolderViewController.tableView(_:cellForRowAt:) + 168
5    UIKit                              0x000000018c79a0a4 <redacted> + 668
6    UIKit                              0x000000018c799fa8 <redacted> + 80
7    UIKit                              0x000000018c7fc958 <redacted> + 5168
8    UIKit                              0x000000018c7f92f8 <redacted> + 140
9    UIKit                              0x000000018c7f83c8 <redacted> + 2428
10   UIKit                              0x000000018c7f21f8 <redacted> + 15284
11   UIKit                              0x000000018c7f1c00 <redacted> + 1068
12   UIKit                              0x000000018c7f1a84 <redacted> + 140
13   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
14   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
15   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
16   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
17   Foundation                         0x00000001834e6e78 <redacted> + 16
18   Foundation                         0x0000000183428888 <redacted> + 72
19   Foundation                         0x000000018342795c <redacted> + 848
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
23   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
24   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
25   Foundation                         0x00000001834e85d8 <redacted> + 376
26   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
27   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
28   CoreFoundation                     0x0000000182a67064 <redacted> + 12
29   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
30   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
31   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
32   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
33   ControlPointDemo                   0x0000000100098148 main + 88
34   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Re-created upnp object AbstractUPnPService - Optional("Devialet Phantom")
Re-created upnp object AbstractUPnPService - Optional("Devialet Phantom")
Re-created upnp object AbstractUPnPDevice - Optional("Devialet Phantom")
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008fef0 RootFolderViewController.deviceCountForTableSection(_:) + 52
3    ControlPointDemo                   0x0000000100094874 RootFolderViewController.tableView(_:numberOfRowsInSection:) + 48
4    ControlPointDemo                   0x00000001000948b0 @objc RootFolderViewController.tableView(_:numberOfRowsInSection:) + 80
5    UIKit                              0x000000018c768b7c <redacted> + 68
6    UIKit                              0x000000018c766d10 <redacted> + 2072
7    UIKit                              0x000000018c7f6818 <redacted> + 152
8    UIKit                              0x000000018c7f21f8 <redacted> + 4004
9    UIKit                              0x000000018c7f1c00 <redacted> + 1068
10   UIKit                              0x000000018c7f1a84 <redacted> + 140
11   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
12   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
13   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
14   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
15   Foundation                         0x00000001834e6e78 <redacted> + 16
16   Foundation                         0x0000000183428888 <redacted> + 72
17   Foundation                         0x000000018342795c <redacted> + 848
18   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
19   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
23   Foundation                         0x00000001834e85d8 <redacted> + 376
24   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
25   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
26   CoreFoundation                     0x0000000182a67064 <redacted> + 12
27   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
28   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
29   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
30   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
31   ControlPointDemo                   0x0000000100098148 main + 88
32   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Simultaneous accesses to 0x147e9c790, but modification requires exclusive access.
Previous access (a modification) started at ControlPointDemo`closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1140 (0x100093914).
Current access (a read) started at:
0    libswiftCore.dylib                 0x0000000100af6938 swift_beginAccess + 436
1    ControlPointDemo                   0x000000010008af20 RootFolderViewController._archivedDeviceUSNs.getter + 72
2    ControlPointDemo                   0x000000010008ffcc RootFolderViewController.deviceForIndexPath(_:) + 116
3    ControlPointDemo                   0x000000010009492c RootFolderViewController.tableView(_:cellForRowAt:) + 448
4    ControlPointDemo                   0x0000000100094d84 @objc RootFolderViewController.tableView(_:cellForRowAt:) + 168
5    UIKit                              0x000000018c79a0a4 <redacted> + 668
6    UIKit                              0x000000018c799fa8 <redacted> + 80
7    UIKit                              0x000000018c7fc958 <redacted> + 5168
8    UIKit                              0x000000018c7f92f8 <redacted> + 140
9    UIKit                              0x000000018c7f83c8 <redacted> + 2428
10   UIKit                              0x000000018c7f21f8 <redacted> + 15284
11   UIKit                              0x000000018c7f1c00 <redacted> + 1068
12   UIKit                              0x000000018c7f1a84 <redacted> + 140
13   ControlPointDemo                   0x00000001000902bc RootFolderViewController.insertDevice(deviceUSN:deviceUSNs:inSection:) + 672
14   ControlPointDemo                   0x00000001000934a0 closure #1 in closure #1 in RootFolderViewController.loadArchivedUPnPObjects() + 1180
15   UPnAtom                            0x00000001006f8f18 closure #1 in closure #1 in closure #2 in UPnPRegistry.createUPnPObject(upnpArchivable:callbackQueue:success:failure:) + 56
16   UPnAtom                            0x0000000100662944 thunk for @escaping @callee_guaranteed () -> () + 52
17   Foundation                         0x00000001834e6e78 <redacted> + 16
18   Foundation                         0x0000000183428888 <redacted> + 72
19   Foundation                         0x000000018342795c <redacted> + 848
20   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
21   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
22   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
23   libdispatch.dylib                  0x00000001013296e4 _dispatch_block_invoke_direct + 232
24   libdispatch.dylib                  0x0000000101329648 dispatch_block_perform + 104
25   Foundation                         0x00000001834e85d8 <redacted> + 376
26   libdispatch.dylib                  0x000000010131d18c _dispatch_client_callout + 16
27   libdispatch.dylib                  0x0000000101321890 _dispatch_main_queue_callback_4CF + 1180
28   CoreFoundation                     0x0000000182a67064 <redacted> + 12
29   CoreFoundation                     0x0000000182a642e8 <redacted> + 2272
30   CoreFoundation                     0x0000000182984b80 CFRunLoopRunSpecific + 552
31   GraphicsServices                   0x0000000184969fbc GSEventRunModal + 100
32   UIKit                              0x000000018c9a38e0 UIApplicationMain + 236
33   ControlPointDemo                   0x0000000100098148 main + 88
34   libdyld.dylib                      0x0000000182415fbc <redacted> + 4
Optional("Devialet Phantom") - has no AV transport service

crash on adding an event observer to a service after another service is already observed

Observing events on one service is working ok, however when adding an observer to a second service immediately crashes the app

#0  0x0000000199fff140 in __pthread_kill ()
#1  0x000000019a0c8ef8 in pthread_kill ()
#2  0x0000000199f72b78 in abort ()
#3  0x00000001014a9288 in -[GCDWebServer startWithOptions:error:] at [...]/Pods/GCDWebServer/GCDWebServer/Core/GCDWebServer.m:690
#4  0x00000001014a9da0 in -[GCDWebServer(Extensions) startWithPort:bonjourName:] at [...]/Pods/GCDWebServer/GCDWebServer/Core/GCDWebServer.m:757
#5  0x0000000101600360 in UPnPEventSubscriptionManager.(startHTTPServer in _03549FAA32A914163C51D5E5649E52B4)() -> Bool at [...]/Pods/UPnAtom/Source/Management/UPnPEventSubscriptionManager.swift:453
#6  0x000000010160b950 in UPnPEventSubscriptionManager.((eventCallBackURL in _03549FAA32A914163C51D5E5649E52B4)(UPnPEventSubscriptionManager) -> ((eventCallBackURL : NSURL?) -> ()) -> ()).(closure #1) at [...]/Pods/UPnAtom/Source/Management/UPnPEventSubscriptionManager.swift:305

Working with the swift-2.1 branch

Swift 1.2: Release/Archive versions of UPnAtom crash the Swift compiler ಠ_ಠ

Without fixing this issue, I can't publish a new version as "pod trunk push" will perform a lint which involves compiling the code in release mode which will fail.

Developer Forum Discussions:

Exhaustive search by commenting out and in code traced back to these source files:

  • SSDPExplorer.swift and SSDPExplorerDiscoveryAdapter.swift (very consistent)
    • The compiler appears to vomit when using Set, the workaround is to use an array instead which makes me very sad.
  • UPnPRegistry.swift (50/50 chance)

'UPnAtom' does not specify a Swift version and none of the targets

[!] Unable to determine Swift version for the following pods:

  • UPnAtom does not specify a Swift version and none of the targets (ControlPointDemo) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.