How to Crash Flash

Miles and I submitted our new Flash game to the 4th Jay Is Games competition. In Space Kitteh (pronounced something like “Space Kitty”), the object is to rescue cats in an outer space environment. The physics are a real treat — it’s impossible to “fall” off the landscape. If you get lost, just wait for the solar system’s gravitational pull to drag you home.

It’s a lot of fun, but I need to warn you about a serious problem in Space Kitteh. This is a heads-up for users of Windows Flash Player —

Our game will crash your browser.

And we don’t know why. It has something to do with this level:

Every Windows user who spends a little time on this level reports the same problem: the game crashes hard, and takes down their browser. Sometimes it’s after a few seconds, sometimes it’s minutes, but eventually, this level will get you.

And the frustrating thing is, we have no idea why. Mac users (including myself) have no problems, PowerPC- or Intel-based. Perhaps it’s due to the glut of sun ray shapes in the center of the solar system? Look at the size of those things! Do these malloc huge chunks of memory, and overflow the heap? Who knows. One day, Miles reigned in the rays, so they wouldn’t grow to immense proportions, but that didn’t remedy the crash. Then he disabled the sun rays completely, and this seemed to work, although the game did crash in another area thereafter. It’s all very confusing.

I feel like we’re sitting on a time bomb. This is going to ruin our chance of winning a prize. (Not that we entered to win, but it would be nice! We both put serious time and energy into Space Kitteh.) Jay Is Games devotees are going to enjoy some of our hard work, but it crashes, irritatingly so, and you can’t win the game.

In addition to this method of crashing Flash, I stumbled on another nuclear exploit that even crashed Flash on my Mac (it took down the Flash CS3 application). Here it is, the purpose of this code is to play a sound after a short delay:

var snd:Sound = fetchSoundByName( name );
var timer:Timer = new Timer( delayInSeconds * 1000, 1 ); // seconds => milliseconds
timer.addEventListener( TimerEvent.TIMER, );

In this example, I’m guessing that the native method barfs because it’s not equipped to handle any arguments, such as the TimerEvent it receives? Whatever the cause, enjoy the exploit. Play practical jokes on your friends, and the whole of, and whatnot.

I doubt we can mend Space Kitteh in time for its debut, which happens in a few days. I don’t know what to do, really. We put a lot of love into Space Kitteh, and tried to create a quality experience. And I’m already grieving in anticipation of our (otherwise wonderful) game crashing browsers worldwide.

What would you do?

One thought on “How to Crash Flash

  1. i have a similiar problem, managed to fix it most of the times but not allways, it’s a huge memory guzzling app and thats probably related.

    we still hav’nt cought all the crashes but creating destructors for all the classes (that free all the vars connecting in or out of objects that are not needed) seemed to help quite a lot

Leave a Reply

Your email address will not be published.