I don’t see the attached file.
But that said, if you’re getting an OutOfMemoryException, then that means you’ve exceeded the max amount of memory WP8 will allow your app to use. If this indeed is what you’re running into, then that’s not a Corona bug. Your app is simply using too much memory, such as loading too many images and/or too much audio at once.
In Visual Studio, notice that the Play toolbar button [>] that you use to build and run your app in the emulator is a drop-down box. If you click the down arrow on that toolbar button, you’ll see other devices that Visual Studio you can emulate. By default, it emulates a low-end WP8 device named “WVGA 512” which only has 512 MB of RAM. However, your app does not get to have 512 MB of RAM because the operating system needs some of it for its own purposes. On a 512 MB device, your app can only have 150 MB by default. This is documented by Microsoft here…
http://msdn.microsoft.com/en-us/library/windows/apps/hh855081(v=vs.105).aspx
So, first I recommend that you switch to using a different device emulator that supports more RAM to confirm that this is what you’re running into. The “WVGA” (without the 512 at the end) or “WXGA” device emulators support 1024 MB of RAM. If you’re using “Update 2” of Visual Studio, then you can use the “Emulator 8.1 1080P” device which supports 2048 MB of RAM.
Once you’ve confirmed that this is an out of memory issue, then you have 2 options:
1) Lower the memory footprint of your app by loading less images, loading smaller images in size/resolution, load less sounds or stream them audio instead (which you always be doing for large audio files like music).
- You can try to request the WP8 device to provide your app more memory via the ID_FUNCCAP_EXTEND_MEM manifest entry documented by Microsoft via the link below. Note that this raises the max memory limit to 180 MB (not a lot), but might be worth a shot if your app is on the edge.
http://msdn.microsoft.com/en-us/library/windows/apps/jj681682(v=vs.105).aspx
- You can set up your app to only support 1080 MB of RAM devices only via the ID_REQ_MEMORY_300 manifest entry. The link above talks about this as well.
Does this help?