Having SIGABRT while accessing object properties of DFUServiceInitiator
dominique-cosmo opened this issue · 1 comments
Device information (please complete the following information):
- Device: iPhone SE 2020
- OS: iOS 15.1
Describe the bug
The main topic concerns usage of IOS-DFU-Library (version 4.11.0 or 4.11.1) in our SDK development for BLE device control (based on nRF51, nRF SDK version does not really matters for now). The library is used for DFU upgrade within our SDK.
We moved from old version 4.6.1 to 4.11.0 or 4.11.1 due to Xcode update.
We have tow applications using our SDK, both using IOS-DFU-Library :
- A fully native test application for our own SDK development and tests.
- Our final application (which is quite complexe React Native) including our own SDK for production.
In the first app, we have no issue regarding IOS-DFU-Library, everything goes well and upgrade works quite well.
In the second App and given the execution conditions, we are facing SIGABRT error with almost no info in the backtrace.
The error is really similar to the issue reported by a florentin in #461 here.
Indeed the DFUServiceInitiator
can be instantiated (with proper men address) but as soon as we try to access property we got the SIGABRT (.forceDfu
, .with
)
I did tried a lot of tests :
- moving piece of code to try to figure out which instruction provide the error without success.
- moving only
DFUServiceInitiator
to another thread within our SDK without success. - moving only
DFUServiceInitiator
in our SDK caller -> was successful, we could access object property.
It sounds that we face memory issues as soon as we call DFUServiceInitiator
within our SDK in the production application but it is only an assumption.
Here is the code (quite simple indeed...):
let dfuInitiator = DFUServiceInitiator().with(firmware: self.dfuFirmware!) // SIGABRT
or
let dfuInitiator = DFUServiceInitiator()
dfuInitiator.forceDfu = true // SIGABRT
Thank you in advance if you can help us founding the problem... !
Dom
Hi here,
We found our error... no easy but we got it!
We did align the following option in all projects (App, Démo App & SDK): BUILD_LIBRARY_FOR_DISTRIBUTION = NO
Now everything goes smoothly with the library and modules.
Thank you to our team for the good job and also to anyone how helped us :)
Best regards,
Dom