tags:

views:

142

answers:

4

Sometimes my Flex app, freezes on the preloader, and never reaches the main app. Refreshing the page usually fixes this. But I have no idea what would cause this. I am being told that this is happening in different browsers.

Any ideas?

I have noticed this on other Flex apps as well, so I don't really think its something specific with my app causing it. I am thinking maybe its a bug that there is hopefully a work around for?

Thanks!!

A: 

Make sure you are using the latest Flex 3.5 SDK. I'm not sure if there is a known bug there but it will narrow down the possibilities.

James Ward
A: 

The best thing you could do is to add logging to your app so you can identify what stage your app is in when it freezes.

Sam
+1  A: 

Has this also happened in debugger version of the flash player? Sometimes an error stops the application from initializing properly and a regular player will simply appear to freeze.

The issue probably has to do with your application - for example loading assets, sending url requests, parsing flashVars - though it could be something unpredictable. I haven't encountered such a problem enough times to remember during the two years I've developed Flex, so at least it's not something very common.

Logging is a good idea - at least make traces to events like preinitialize and initialize in your main tag to see how far you get.

tehmou
This has not happened while testing in FB, but I am loading XML and using FlashVars. I have never used logging before so I am looking into that now. Is there a perticular level I should listen for? ALL? FATAL? Thanks.
John Isaacks
Hmm, it makes it more tricky if you haven't been able to catch it, so to say. With logging I actually meant doing many trace's, such astrace("starting to load XML");... load the XML ...trace("finished loading XML!");This is possible to do with Flex logging too, using TraceTarget. Listening to ALL should give you everything there is. However, you should try experimenting with different things that might go wrong and see how your program reacts in the debugger. Getting it to crash in the debugger would be half solved!
tehmou
A: 

This is an IE bug, you need to set the .swf to focus() once the page has finished loading.

John Isaacks