-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running StereoKit from an async Main #361
Comments
To be quite honest, I didn't know you could make Main async until @paulmelis mentioned it, and I'm still not entirely sure what the ramifications of that are. It sounds like this may be a more common scenario than I had initially imagined, so I guess it's time for me to do a deeper dive on that! Will let you all know how that goes :) |
Okay, so I learned something new today! It seems as though So using an I think the most I can do in this case is double check the thread Id is the same from |
Interesting! I did not know that either, but it explains a lot. HoloLens requires a lot of async API calls from various UWP libraries for reading/writing files and folders, accessing spatial anchors, etc. We're using such calls for additional initialization between |
…n a separate thread from initialize (or similarly, create GPU assets before step). #361
Okay, I have a pretty good idea how to prevent this in the future, so this situation will continue to improve as async assets develop! In the meantime, I have added a pair of warnings that should help illuminate the situation. |
…n a separate thread from initialize (or similarly, create GPU assets before step). StereoKit#361
I've been experiencing this async strangeness too, and my Program main() is this. public static async Task Main(string[] args) I too depend on async call between Initialize and Step(run). #512 |
Description
I recently updated our apps to use the latest StereoKit nuget (0.3.6-preview.5), but it caused them to crash/hang immediately on startup. I think the problem has to do with the fact that we use an async Main() (
static async Task Main()
) rather thanvoid Main()
. We can work around it by isolating our async stuff and using a regularvoid Main()
, but I thought it was strange. The exception seems to be thrown somewhere deep in the OpenXR native code during initialization, but it's a bit hard to trace. Is this a known issue?Platform / Environment
Observed on ARM and ARM64 (UWP) deploying to the HoloLens 2.
The text was updated successfully, but these errors were encountered: