robreuss / VirtualGameController

Software-based game controllers for iOS, tvOS, OS X and watchOS in Swift 4.2.
MIT License
462 stars 44 forks source link

Peripheral disconnect causes EXC_BREAKPOINT #24

Closed rkreutz closed 8 years ago

rkreutz commented 8 years ago

Hi Rob,

as the title suggests, I'm trying to disconnect my peripheral from the central service but once I do it Xcode throws this error inside VgcBrowser.disconnectFromCentral() at vgcLogDebug()

I'm attaching an image with the error.

Thanks untitled

rkreutz commented 8 years ago

Any ideas on what may be happening and how to fix it?

rkreutz commented 8 years ago

I managed to avoid this error by simply commenting that line from the library source code. Most likely its a problem when calling peripheral.controller.deviceInfo.vendorName

robreuss commented 8 years ago

Hi Rodrigo,

Sorry about the slow response. I've modified the logging line to remove the peripheral.controller.deviceInfo.vendorName - I was making the assumption that disconnectFromCentral was being called from the context of a bridge being used, in which case peripheral.controller would have been set. Thanks for calling this to my attention!

Rob