Skip to content

Instantly share code, notes, and snippets.

@wilfrem
Created November 24, 2013 18:50
Show Gist options
  • Save wilfrem/7630796 to your computer and use it in GitHub Desktop.
Save wilfrem/7630796 to your computer and use it in GitHub Desktop.
MonoGameのTexture2DでFromStreamをasync/await内で呼び出すと、(理由が不明だが)処理が帰ってこない
例えば、Windows Store App(WinRT)ではファイル読み込みは非同期なので読み込み処理内でasync/awaitを使うと楽だが(そして、外ではTask.Waitする)
その中でTexture2D.FromStreamを呼び出すと、何故か処理が帰ってこない。。。(Task.Waitのところで)
DirectXかWICのどちらかでデッドロックしてる???
回避方法は、FromStreamを呼び出すところを同期的に呼び出す
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment