Occasional crash of Solar2d

I occasionally get a full crash on load/reload of a project, usually from a simple typo, usually in main.lua, but sometimes in the first scene called by main. Solar2d just crashes and disappears, no message.

My fix (works 100% of the time) is to start build 3617. That will show the error without crashing. I fix the bug, then can go back to the latest version.

This has been a problem for I think the last 10 builds or so. I keep forgetting to report it because my workaround is fine.

This is on Mac?

I’ve probably run into this (seemed like more than 10 builds going, though :smiley: ), and @clang mentioned https://github.com/coronalabs/corona/issues/310 something about the unwind going bad (he mentioned this on Discord but the comment at the end of the link seems to explain it). Sounds like an annoying bug hunt but probably an easy fix in the end.

1 Like

Yes, Mac. Yes, annoying but not a big deal. I logged it because I have a new collaborator who was going to give up on Solar2d when he ran into this until I told him the fix.

Yes, probably more than 10 builds, but I didn’t want to say what I wasn’t sure about.

1 Like

Here’s a workaround from Discord that involves disabling the console and routing the output Terminal.

  • Disable Solar2d console so errors show up in terminal:
    defaults write com.coronalabs.Corona\_Simulator no-console YES

  • Start from command like this (use current build number):
    /Applications/Corona-3710/Corona\ Simulator.app/Contents/MacOS/Corona\ Simulator

  • Re-enable Solar2d console when done:
    defaults delete com.coronalabs.Corona\_Simulator no-console

It’s a bit fiddly, but has the advantage of not needing to revert to an ancient version of Solar2D for debugging. (And it’s way better than what I’d been doing which was running screen capture on the console and then watching the video to try to see the error message flash by. :rofl:)

3 Likes

Thank you, I will try it. Console on terminal has a few other advantages, though minor. Thanks.

[Later: works great! Thank you.]