Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Xbox UWP games crash whenever doing any resource-intensive process

Discussion in 'Windows' started by Pindowngamesbysemoaction, Feb 4, 2023.

  1. Pindowngamesbysemoaction

    Pindowngamesbysemoaction

    Joined:
    Nov 19, 2021
    Posts:
    5
    Hi,
    I published a game in the Microsoft Store for Xbox, I'm using Xbox Series S to test it but the game seems to crash whenever anything is loading really, that includes any heavy calculations done on the main thread, Instantiating players/models, loading scenes, etc..

    It used to crash whenever the game starts I'm guessing because I load all the items(177 total) we have in the game (and by load, I mean just fetching each item's data from the server, assigning a Sprite for each item, and store them in Dictionaries) to correctly display the items in the items menu in the main menu.
    I fixed that by just running each step for these calculations on another thread using
    await Task.Run(() => .....);

    But I cannot do that for every reason a crash occurs for, like instantiating because doing anything UnityEngine.Object related must be on the main thread.

    I really have no idea what is causing those crashes. The game runs perfectly on my PC and it's not even that good, it's just a Ryzen 5 2400G with no external GPU, so the Xbox Series S should be way better, or at least could handle instantiating a model of a gun in the main menu.

    Thank you.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    Do you have a callstack for the crash? Any idea what kind of crash it is?
     
  3. Pindowngamesbysemoaction

    Pindowngamesbysemoaction

    Joined:
    Nov 19, 2021
    Posts:
    5
    No callstack but the Partner Center reports some as memory failures and others just labeled "Crashes", not sure how to further diagnose that though.
    upload_2023-2-6_20-17-55.png
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    Are you not able to reproduce this yourself? Does the partner center not give you any callstacks?
     
  5. Pindowngamesbysemoaction

    Pindowngamesbysemoaction

    Joined:
    Nov 19, 2021
    Posts:
    5
    It does not give callstacks or at least I can't find any, I am not able to reproduce it on my PC at all, but it always crashes on my tester's Xbox Series S.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    Is your tester downloading directly from the Store? Or installing the package themselves?

    It's really hard to say what could cause this. It could be a simple out of memory issue. It could be something entirely unrelated.
     
  7. Pindowngamesbysemoaction

    Pindowngamesbysemoaction

    Joined:
    Nov 19, 2021
    Posts:
    5
    He's downloading it directly from the store, I tried to download it directly from the store too but on my Windows PC because I thought something went wrong in the building process somehow, but it still worked perfectly on my end.
     
  8. Pindowngamesbysemoaction

    Pindowngamesbysemoaction

    Joined:
    Nov 19, 2021
    Posts:
    5
    Hi again, I came across this.
    Do I need those packages even if I'm just deploying for UWP?
    If yes, how do I get the packages needed for Xbox?
     
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    You do not need them if you're using UWP.