The public Microsoft Windows UWP sample HolographicSpatialMapping found here works fine on a HoloLens generation 1 device, but consistently crashes on a generation 2 device after 2-3 minutes with an Access Violation in a mutex lock when updating mesh resources. Compiled using VisualStudio 2019, target platform set to 10.0.18362.0, and Hololens is up-to-date. Happens in both Retail and Debug builds.
I have already spent a significant time investigating, but before spending more time, wanted to share and hear if anyone else has been running into this same or similar issue, and/or has any suggestions as to what is going on.
Source: Windows Questions C++