Windows Store 8.1 and memory issues

I’m having issues with Unity 5.0.2f and the Windows Store platform. My game runs fine on low end Android and even an iPhone 4 (albeit, it’s slow). But when I compile for Windows Store Universal I get memory issues running it on a Nokia 920, which is much faster than an iPhone 4 and has far more memory.

At first, some of my textures just don’t draw. And I see this error in visual studio:
d3d11: failed to create staging 2d texture

The problem gets worse as I change scenes until finally it just crashes completely.

Oddly enough, if I switch platforms to Windows Phone 8.0, the game performs great and has no memory issues.

1 Like

Intresting, could be some issue with performance I also having.
I think you need to try and debug this bit more, any chance you could to try and see what could be making slow and crash.

Could we get a bug report on this? We haven’t observed increased memory usage on Windows Store target as opposed to Windows Phone 8.0 target so far, apart from 1-3 MB that the multithreaded renderer needs. It must be something that’s specific to your project.

I can submit a bug report. But I’m not sure how to even debug this. The game works great on every other platform including windows phone 8.0 and on devices with far less capability that the windows phone I have. It also works fine when I run it as a windows store app on my PC. But of course it has tons of memory available.

When I was testing it in visual studio there were no other errors other than the one I posted above.

The problem only occurs when its run as a windows store app on a windows phone. So in sorry, but, it really doesn’t seem like its my project that has the problem.

If you submit a bug, we can take a look at it. Don’t forget to post the case number here.

As for debugging it yourself: we can work on that in this thread. First of all, have you actually confirmed that it’s a memory issue? Did you check what’s the memory usage on WP8.0 app vs WP8.1 app or are you just guessing? When it crashes, do you have a callstack or the player log?

Before the error I posted above there is a debug message about removing unused textures to reduce memory. I didn’t have a chance to see how much memory it was using but it was a best guess looking at what was occurring. The game would stop dropping textures more and more frequently until the whole thing crashed. Memory issue seems the most likely. Especially given that the game works fine on other platforms, I can already rule out any errors made in my scripts. I have 2000 downloads so far on my other platforms and not a single crash has been reported.

I can get the call stack when I’m off work and back at home.

Unity doesn’t really unload unused textures because it’s low on memory, it unloads them just because they aren’t used. But yea, I can’t really tell what’s going on without more information.

Yeah that message didn’t concern me. Just seemed like standard garbage collection.

I’ll submit the bug tonight and get it to crash while I’m plugged into visual studio and see if there’s any call stack.

If there isn’t I’m kinda stuck though. I can’t fix anything if there’s nothing for me to fix.

Bug report submitted. Hope you guys can figure this one out cause it has me stumped. Case number is 705456.

Thanks.