Windows Phone XNA Games Hangs on Resume when Guide is Visible on WP7.x

My Windows Phone XNA game calls Guide.BeginShowKeyboardInput to get the user's name. While the Guide's input screen is shown, if the user presses the Home or Search (hardware) buttons, the game is deactivated as usual - but if the user then presses the Back (hardware) button, the game should resume but it doesn't. Instead it shows the "Resuming..." message until Windows Phone gives up trying to resume the game and kills the process.

Please note:

  • My app is failing Microsoft certification because of this problem - I really need to fix it!
  • This only happens in my game when the Guide input screen is shown - when it's not shown, the game resumes properly after being deactivated.
  • This problem only occurs when the game is run on WP7.x (verified problem on WP7.5 and WP7.8) - although the game seems to resume properly on WP8 devices.
  • I've created a blank XNA game project, called Guide.BeginShowKeyboardInput and tested it using WP7.x devices, and this problem-behavior doesn't occur.
  • I've tested the game without enabling Music & my Trial License manager (they use timers) and it still does this.
  • Exact same behavior occurs in the emulator (resume-failure on WP7.x emulators, works fine on WP8 emulator)
  • I used threads to asynchronously download content during the loading screen - but they already completed and exited. I don't believe other threads are running, although this seems like it could be a thread-blocking issue.
  • Any other ideas on what could be blocking the game from resuming when the Guide.IsVisible or how to debug/resolve this problem?


    解决此问题的方法很简单,就是在处理任何将应用程序传递到应用程序之外的操作(例如启动器,选择器和指南)时,不要使用SuppressDraw。


    Have you tried calling "Guide.EndShowKeyboardInput" in either the Deactivating or closing events?

    So that the guide is closed before the app suspends, you do get 10 seconds to suspend so this might be worth looking into. If you want the guide to re-show on resume, then in your state saving code just have a flag and open the guide if it's set.

    链接地址: http://www.djcxy.com/p/22776.html

    上一篇: 如何将Silverlight与XNA整合

    下一篇: Windows Phone XNA游戏在WP7.x上可见指南时挂起