malloc error instantiating VisionReplayManager
avi-c opened this issue · 5 comments
Description
malloc error and crash trying to instantiate Vision replay with a particular recorded session. Session worked fine in vision 0.11.x and below.
Session can be found here: https://drive.google.com/open?id=1oeOTbyFBjDZ3xCS2caIOSVCvhbeHKssh
Expected behavior
Replay begins as normal
Actual behavior
malloc allocation error in ManagerDependencies.swift:47, in the call VisionReplayManagerNative.create. Error causes a crash.
Configuration
- Device: iPad 10.2
- OS: iOS 13.3.1
- Frameworks versions (leave the ones you're using):
- MapboxVisionNative 0.12.0
- MapboxVisionARNative 0.12.0
- MapboxVision 0.12.0
- MapboxVisionAR 0.12.0
Additional context
Add any other context about the problem here.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Unexpectedly found nil while initialising the VisionReplayManager
let documentsPath =
NSSearchPathForDirectoriesInDomains(.documentDirectory,
.userDomainMask,
true).first!
let path = documentsPath.appending("/safety-alerts-drawing")
// create VisionReplayManager with a path to recorded session
visionManager = try? VisionReplayManager.create(recordPath: path)
Hey @cisnayan. Were you able to download the session and put it in the right place as described in the tutorial?
Hey @cisnayan. Were you able to download the session and put it in the right place as described in the tutorial?
Yes @chezzdev I just follow the same code and try to run the same but when i debug i got to know that the visionManager is nil and crashed when we try to assign the delegate of it.
As the VisionReplayManager returning the nil object.
You need to download the recorded session and put it on the device. Please follow the instructions at https://docs.mapbox.com/help/tutorials/ios-vision-safety-alerts/#getting-started.