WP8 - SEHException thrown by CoronaLabs.Corona.DotNet.dll

Hey guys,

I’m preparing my latest game for windows phone 8 and ran into this exception:

System.Runtime.InteropServices.SEHException was unhandled

Message: An unhandled exception of type ‘System.Runtime.InteropServices.SEHException’ occurred in CoronaLabs.Corona.DotNet.DLL

Additional information: External component has thrown an exception.

I got it during the normal game play of my app.

My app uses about 34 MBs of texture memory on my lumia 920 phone.

I noticed that as I continue to play game rounds the app gets slower and slower in its response to input touches (looks to me like maybe 500 milliseconds - 1 second for a touch response), and then it died with the exception above. I don’t spot any memory leaks, at least for the texture memory.

I’m wondering if you know what this is or have seen it before?

As a note the app works perfectly on iOS and Android :slight_smile:

Thanks!

CoronaCards WP8 version = 14.0.2511

Are you sure you are not leaking objects on the Lua side?

You can track how much memory is used by Lua via the following function call…

   local memoryUsedInKB = collectgarbage(“count”)

Would you mind running the above on a timer (perhaps every 10 seconds) and print it to Visual Studio’s log?

I ask because I’m not aware of any memory leaks.  I’m also wondering if somewhere in your code you might be using an API that’s not supported, it’s causing a Lua runtime error that’s getting caught, but is leaking a Lua object.  If there is a Lua runtime error, you should be able to see it in Visual Studio’s “Output” panel.

Are you sure you are not leaking objects on the Lua side?

You can track how much memory is used by Lua via the following function call…

   local memoryUsedInKB = collectgarbage(“count”)

Would you mind running the above on a timer (perhaps every 10 seconds) and print it to Visual Studio’s log?

I ask because I’m not aware of any memory leaks.  I’m also wondering if somewhere in your code you might be using an API that’s not supported, it’s causing a Lua runtime error that’s getting caught, but is leaking a Lua object.  If there is a Lua runtime error, you should be able to see it in Visual Studio’s “Output” panel.