Game Crashes on Lumia 520?

Hi, I’ve been trying to build my game for WP8 for a while now.

The game works fine on all low end android devices and tested on Lumia 520 (Don’t have any other windows device to test on)

The BGM of my game stops in between, slows down, gets messed up, and eventually, the game just crashes.
I get this error on my device log:

There was previously an issue with using a 4096 x 4096 texture which just didn’t show up on the 520, although the internet says wp8 devices can handle 4096 textures.

Any one can give me insight as to why this might be happening? Is it device specific for the 520 or might I expect same results on all devices?

Such error is typically shown when you have enabled network capability in development build. Try NOT to select ‘Develp building’ in Unity editor and select ‘Master’ configuration in Visual Studio.

Did you check memory usage? OS will kill the application if you reach 180 MB.

Could you guide me on how to check it for my WP8 Lumia 520?

In Unity I haven’t selected Developement Build. As for Visual Studio, my build is ‘Release’ so I can get the debug log

You can use DeviceStatus class for that in exported VS solution.

Honestly, I have no idea how to drop VS code into my Unity code. I can never even open my Unity code in VS.

I’m going to assume that 180 mb is being taken by my game as the music, and the gameplay both get hiccups and then eventually the game turns off.

Is this only for the 520, or is it an all around WP thing, 180mb?

180 MB is the limit for devices with 512 MB Physical RAM. You can read about it here:

Here’s a guide of how to communicate from exported VS solutions with your scripts:

http://docs.unity3d.com/Documentation/Manual/wp8-unity-interaction.html

Alright thanks, I will have a look at that! :slight_smile:

Meanwhile, could you suggest me some fix (let’s assume I crossed 180 mb) or a reason as to why the audio and gameplay are experiencing hiccups?

I would like you to know that this is a problem I face only on low end WP8 devices as I have tested on some of the lowest Android devices and it doesn’t give any issues

First two things I’d personally check would be texture compression and audio playback settings. Never use uncompressed textures, use either DXT1 or DXT5. Also, make sure that audio is set to stream from disk, rather than load it all into memory.

Unity 4.5 comes with huge optimisations on its utilisation of Windows Phone 8 memory.
Try the optimisations Tautvydas suggested in his post above. I they don’t work, it may be worth waiting for 4.5 to be released.

Unfortunately the unity-wp interaction document is not helpful enough.

The code given on the bottom, I’m not sure whether that goes into the XAML or my unity code. And the attached project is also unavailable.
And the XAML given in that page as an example is nothing like the XAML I am seeing in my project.

If possible could you please write a small code explaining how I’d be able to check the device memory being used in my unity game? Or atleast guide me properly as the current page given is not helping me much.

Puneet did you read the Windows Porting guide PDF’s?

Hmm, the link for the example project works for me. The code at the bottom goes to MainPage.xaml.cs.