TLDR - I might have discovered a corner case bug causing
EXC_BAD_ACCESS errors during colorizer task but could not identify what was causing the issue. Finally found that the issue had to do with poorly setting the target face count. Reached out to developer team to see if they could confirm this was the issue and make some fix to prevent this issue for other developers.
Hi all, @JacobErvin ,
I’ve been working on putting together a Swift application for the Structure SDK and have been running into frequent EXC_BAD_ACCESS crashes, specifically when running the STColorizer background task. Based on the crash reports, this seems to occur within the Structure SDK and there is some illegal memory access. Along with this, I am fairly certain that I am safely handling pointers and Swift optionals that could trigger the same exception. Here are some additional details I can share for more context:
- Been experiencing this issue with the 0.11 release and even with 0.10.3, but not sure whether or not this issue existed before. I was sure that this issue was one of the many issues that had to do with the SDKs instability and that it was going to be addressed with the latest release but I don’t know if it was ever uncovered.
- The colorizer background task is run immediately after scanning is complete and not up to the user like in the Scanner App. I experience this issue both when choosing to wait for the background task using
STBackgroundTask.waitUntilCompletion()and when choosing not to wait.
- Based on the progress reported to the delegate, the task always manages to reach between 40-45% completion before raising the exception. I’m not sure if this would help internal developers pinpoint which sub-step in the colorizer process is the culprit.
- Often times this bug occurs after multiple scans are made consecutively, but I am positive there are no memory leaks due to this.
Has anyone experienced similar issues regarding spontaneous crashing or have some sort of solution for a workaround if the issue is coming from Structure framework?