Corona Simulator crashes in ML

Hi,

Since I upgraded my MBA to Mountain Lion i have started to get frequent crashes of the Corona Simulator.
Im using Corona build 840.

The crashes happens when i save changes of a file in my project directory and the simulator then tries to relaunch the game. It dont happen every time, but for 1/5 times maybe.

And its not a problem with my code, its the simulator. Because when i relaunch the simulator directly after a crash the simulator works fine with the game. But some changes later it crashes again.

Someone else who have the same problem? [import]uid: 126729 topic_id: 29608 reply_id: 329608[/import]

Hey there, have you filed a bug for this? [import]uid: 52491 topic_id: 29608 reply_id: 118872[/import]

No I have not. Should I? [import]uid: 126729 topic_id: 29608 reply_id: 118875[/import]

This is the error message that i got in the terminal upon the latest crash

Corona Simulator[1718] : ImageIO: ImageProviderReleaseInfoCallback $$$ ImageProviderReleaseInfoCallback: cookie without releaseInfo - leaking
/Applications/CoronaSDK/Corona Terminal: line 9: 1718 Segmentation fault: 11 “$path/Corona Simulator.app/Contents/MacOS/Corona Simulator” $* [import]uid: 126729 topic_id: 29608 reply_id: 118878[/import]

Hey - yeah, I’m not certain on what the cause of that error is but if you didn’t have this issue then upgraded and it occurs with sample code as well as your own projects then yes, please do file a bug report so someone in the office can explore this. [import]uid: 52491 topic_id: 29608 reply_id: 119021[/import]

I just got the same problems. I updated my home MacBook Air to ML from SL (will not mention how much other stuff are giving me problems) and now I get frequent crashes on Public Build 840.

It’s the same as Erik, Launching it often works fine. But even here is sometimes get an instant crash. But in general its after saving/updating the code that it crashes.

Also now when the simulator starts/relaunches its makes some ugly animation transition. The actual screen pops in as it should but the rest of the device gfx tries to catch up in a transition animation. I presume this has something to to with the OS, in Snow Leopard I did not have this.

Also when restarting the simulator it triggers system preferences saying “This script utilities the built in Graphic User Interface Scripting architecture of Mac OSX which is currently disabled”

I can not currently activate "Enable access for assistive devices so I can not confirm that this is solving the issue. But I never run into this problem on Snow Lepoard. Could have something to do with this as the error I get is somehow linked to “-skin iPhone” and this sound like have something to do with the GUI scripting.

/Users/Clara/Library/Application Support/CoronaComplete/CCTerminal: line 9: 2284 Segmentation fault: 11 “/Applications/CoronaSDK//Corona Simulator.app/Contents/MacOS/Corona Simulator” -skin iPhone “$project”
[import]uid: 37802 topic_id: 29608 reply_id: 119499[/import]

Its seems that we experience the exact same issues. Every word of your problem description is the same problem that I am having.

Even the simulator transition animation happens for me. It did not when i was running on Lion.

I have not had the time to file the bug report to Corona. Maybe you @StefanHQ have time to do that or Peach might wanna step in. I might get some time for that on Tuesday but not today. [import]uid: 126729 topic_id: 29608 reply_id: 119503[/import]

Got also the same other bug you Erik “pasted” here.
Have filed this as a bug now and when I get the chance to enable assistive devices I will report if it solves this issue.

I could unfortunately not file a true crash report file as I could now not find the crashlog folder here in ML, so I just pasted our “pasted” stuff. Hopefully this crash bug is just something to do with some ML settings and not in the actual build
[import]uid: 37802 topic_id: 29608 reply_id: 119505[/import]

I started getting the very same line 9: xxxx Segmentation fault: 11 crashes on simulator last night. (xxxx would be a different set of numbers each time – or at least it seems so.)

I’m still using Lion, so I don’t think it is related to updating it to ML. As noted by others on this thread, the Simulator crash happens when it tries to relaunch upon lua file update (i.e., when I save changes made to lua files in the project folder.) I have no problem with initial launch of the Simulator.

I think I can reproduce this issue fairly reliably, and it feels like it’s about how Simulator handles the relaunch (rather than the code I’m writing) – but I could be wrong. (Because if I save an update to a lua file after I take specific action on simulator, like clicking on a button, the Simulator won’t crash. Only if I update the file before I click on a button it causes the crash.)

Naomi [import]uid: 67217 topic_id: 29608 reply_id: 119527[/import]

Ok, I also get frequent the same error as Erik:

“Corona Simulator[1718] : ImageIO: ImageProviderReleaseInfoCallback $$$ ImageProviderReleaseInfoCallback: cookie without releaseInfo - leaking”

And the segmenation one:

/Applications/CoronaSDK/Corona Terminal: line 9: 1718 Segmentation fault: 11 “$path/Corona Simulator.app/Contents/MacOS/Corona Simulator” $*

And the “skin” one:
/Users/Clara/Library/Application Support/CoronaComplete/CCTerminal: line 9: 2284 Segmentation fault: 11 “/Applications/CoronaSDK//Corona Simulator.app/Contents/MacOS/Corona Simulator” -skin iPhone “$project”

None of them where present on Snow Leopard as I can remember. Should note that I up to some weeks ago, had a subscription so I just recently switch to the latest public release.
(now I get an reminder to renew every time I reload the app from scratch, do not know if this has something to do with it)

It turned on the GUI scriptning and it still crashes so it had nothing to do with that.

Also is that it do not seem to crash when I start it and keep it in the default iPhone 3DS skin. But because this is shown in half size (0.5) and iPhone4 skin is not (strange, the iPhone4 skin is shown 1:1) I need to use the iPhone4 skin.

How is your crashes, do they occur when using the iPhone 3DS skin?

I am positive this has nothing at all to do with the code.

[import]uid: 37802 topic_id: 29608 reply_id: 119534[/import]

We are unable to reproduce the problems you describe. We need multiple things from you guys to help us solve this problem.

  • We need a reliable way of reproducing the crash. Please tell us how to do that.
  • We need to know if the problem is cleared up in the Daily Build.
  • We need to know your system profile. (Mac model and graphics card info might be very helpful.)
  • Your full crash log might be helpful (Submit it with a bug report to us. Do not copy and paste it, but send the original crash log file.)
  • If this does not happen on 10.7 and is not fixed in the Daily Build, filing an Apple bug marked as a regression might help (attach the same crash log). My current theory is that this is a Core Animation bug introduced in 10.8 (they made a lot of changes/optimizations in this area). And it might be graphics card specific since we have a really hard time reproducing it here. The few stack traces I’ve seen show a problem in ImageKit. We use ImageKit to draw the skin around the window. It is pretty uninteresting code.
  • One of you reported this console message:
    CoreAnimation: warning, deleted thread with uncommitted CATransaction; set
    CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces.
    If some of you would try running the simulator from the command line doing this, it might give us more info.
    Open Terminal.app and do:
    export CA_DEBUG_TRANSACTIONS=1
    /Applications/CoronaSDK/Corona\ Simulator.app/Contents/MacOS/Corona\ Simulator

Then keep an eye out for any messages related to this problem in the Terminal output and show us if you see anything interesting.
[import]uid: 7563 topic_id: 29608 reply_id: 119557[/import]

Another thing to look at is how much free memory you have in your system when this happens. You can open Activity Monitor and click on “System Memory” at the bottom of the screen. You will see “Free” in the lower left of the window. I’ve seen things like this happen when the system is running low on memory. [import]uid: 7559 topic_id: 29608 reply_id: 119561[/import]

Eric @ewing and Tom, thank you for the reply posts.

I tried to put together a very simple project to see if I could reproduce this, but I couldn’t.

The game project I’m working on that manifested this issue is way too big to be of any use. I’ll keep an eye out and see if I notice anything. FYI, the simulator crash happened on iPhone skin in my case (on horizontal mode, and I didn’t check it on iPhone4 or iPad skins.) I’m using OSX 10.7.4, and daily build 876. It happened on non-animation intensive scene.

If it means anything at all, here’s how I kept getting the crash last night.

  1. I use storyboard api.

  2. I was creating a user registration screen where I show custom alert popup with yes/no button (it works just like native alert, except that it’s custom function). I needed to make sure the text fits within the window dimension I specify, so I called the alert inside scene:enterScene function. This way, I can see the alert immediately upon entering the scene.

  3. As soon as I enter the scene, the alert would appear, and I could see what edits I’d have to make to get it to look right. So, I’d edit the text, and then save the scene lua file. As soon as I save it, Simulator would try to relaunch the project, only to fail/crash.

  4. If I click on yes or no button before saving the updated lua file, and then save the file, Simulator would relaunch without any problem.

  5. I tried to create a simple project with storyboard scenes to reproduce this, but without fail.

I don’t know if the above helps at all, but I thought I’d mention. I’ll post again if I notice anything more.

Naomi

Edit: Here’s the Terminal output when the crash happens:
[text]
/Applications/CoronaSDK/Corona Terminal: line 9: 791 Segmentation fault: 11 “$path/Corona Simulator.app/Contents/MacOS/Corona Simulator” $*
logout

[Process completed]
[/text]

Crash log is super long, but if interested, let me know. I can email it.
[import]uid: 67217 topic_id: 29608 reply_id: 119574[/import]

@Naomi

Did you figure out why this error occurs?
I am getting the line 9: 209 Segmentation fault: 11 error as well.
All I do is change the position of a text display object and Corona crashes next build.

  • David [import]uid: 152065 topic_id: 29608 reply_id: 119641[/import]

Hi David, as of today I have briefly tested the same project on my SL MacBook Pro and had no crashes. Had no time to look into it further, but me crash seems very much likely to have to do with the Build 840 under ML. Either I will se if I can get it to work or I think we have to wait for the next public release that also most likely are more functional under ML.
[import]uid: 37802 topic_id: 29608 reply_id: 119643[/import]

Can everyone who is seeing the crash please check the amount of "free’ memory in their system (see my previous post for instructions).

We are seeing a memory leak that occurs every time you reload a project (Cmd-R). You can see this if you watch the Corona Simulator line in Activity Monitor app. If your system is low on memory the Simulator may crash after you reload the project a number of times. The memory does come back when you close Corona.

I have seen Safari on Mountain Lion consume lots of system memory the longer it’s open and this could add to the problem. Closing and restarting Safari does free up lots of memory on my system.

We are looking into fixing the Simulator memory issue but would like to confirm that low memory is causing the crash others are seeing.

Thanks,
Tom [import]uid: 7559 topic_id: 29608 reply_id: 119647[/import]

I am running a 2gb MacBook Air late 2009, under Mountain Lion with public build 840
Because it’s only 2gb the crash might now have with ML do do apart than ML is probably consuming more system memory than SL (just guessing)

I often also get a direct re-crash after the simulator crashes:

Reload projects until it crashes.
Restart Corona, often direct crash (when starting up from terminal) then the error is just from the app itself no error message but a system message something “app terminated by unknow reason etc.”
Then i restart it again, the app jumps on the dock giving me “renew” dialogue and then kicks in right. And then after several reloads (very random, often i crashes quite fast, say after just 10 reloads or if it “passes” that it usually keeps going for a good while)

Regarding the memory leak, strange that it often re-crashes when I launch it again directly after an crash. Can it be that some memory has not been cleaned up yet?

And yes I rung Safari a lot (because Chrome also crashes on ML so I can not use it)

Hope this help somewhat, and Tom while you are at it throw in some way to make the scaling/device type stick between reload/relaunches :wink:

[import]uid: 37802 topic_id: 29608 reply_id: 119649[/import]

@ Tom

I have 950 MB of free memory while corona is in use.
I think that is plenty but im not sure.
[import]uid: 152065 topic_id: 29608 reply_id: 119685[/import]

Tom, I followed exactly the same steps I used on post #12 above, and I also had Activity Monitor turned on. It’s a shame, but the simulator won’t crash anymore (even though I set up my project to exactly how I had it yesterday when testing this.) So I can’t tell the state of memory when the crash happens.

That said, now that it refuses to crash, I have to agree that it could possibly be something to do with memory issue. Today, I was mostly working on this troublesome user-flow, and I have not opened up tons of web-pages or tons of other files on desktop yet (so not much is using up the memory.)

I’ll post back if/when I see this crash again (and will turn the Activity Monitor on as soon as I experience the crash.)

Naomi [import]uid: 67217 topic_id: 29608 reply_id: 119687[/import]

Thanks everyone for the replies.

We have found that the amount of memory consumed for each Corona reload is dependent on which skin you’re using. The iPhone skin takes the least and iPad Retina, the most. We are still hunting down the code causing this.

Closing tabs in Safari will give you back more system RAM. Closing and restarting Safari will help too.

@davidgmonical, with only 950 MB free, reloading Corona with the iPad Rentia skin will consume half of that memory in about 10 reloads. You will start seeing things slow down and getting “beach balls” when you are running low on memory.

-Tom [import]uid: 7559 topic_id: 29608 reply_id: 119689[/import]