02-03-2011 11:55 AM
A few more data points supporting high CPU usage, both within the simulator and on the host.
1. I've been trying dual-core mode for quite a while and can now confirm that I have had *no* freezes when using it, so far.
2. I've been watching my CPU usage using Windows Task Manager while running the sim. I tried switching back to single-core mode but with a different setting for the virtualization engine mode (Automatic with Replay). This resulted in the CPU usage dropping by about 40%, and my app ran for significantly longer than it had previously with single-core mode. Only one data point here...
I tried shutting down almost everything, including the above programs.
With my app running, CPU usage hovered consistently just under 20%, and my app just ran for several hours non-stop.
As a further test, when I got back to my computer I reopened Thunderbird, Chrome, and Firefox, and by the time my new email had loaded 15s later, the app had crashed and terminated again.
So to anyone still interested in using the new simulator, do the following:
1. switch to dual-core mode
2. terminate as many other apps on your host machine as possible
3. be gentle: interact minimally, and keep CPU usage low
4. consider smoothing out CPU usage in your app, at least for testing, by doing things like reducing the frame rate, spreading calculations out over a longer time, etc.
5. monitor CPU usage and, if your app dies, look at the graph to see whether you made it spike by whatever you just did before the crash... and try not to do that again.
02-03-2011 11:59 AM
One extra thing... it's definitely not sound-related, but almost certainly CPU-related as @PBDev suggested.
My app was both generating sound and doing some processor-intensive work. I'd been testing with the sound off now, and was still getting the crashes. Now I've "smoothed out" the processor-intensive work by doing it incrementally in an ENTER_FRAME handler (effectively working on one tile at a time in an image, rather than donig the whole image in one go), and since I've done that my crashes have been much rarer.