Forum Moderators: travelin cat

Message Too Old, No Replies

Application freezing/Activity Monitor question

         

lZakl

10:58 pm on Jun 3, 2005 (gmt 0)

10+ Year Member



I have a silly, but not so silly question. We are all familiar with the "not responding dialog in the "Force Quit" menu and the Activity Monitor. My question is:

If I have a program that isn't responding, how can I tell if the app is truly inactive and needs to be shut dow, or if it is just 'thinking'? The reason I ask, is I have a map for a client that was created and converted to PDF. Well I am trying to place it in InDesign, and it is without a doubt "Not Responding". At the same time it's 'not responding' though, it's eating up 88% of my CPU. I am going to let it sit for a while and see what it does, but the fact that the CPU is going anywhere from 80% to 99% tells me it is still thinking ... or am I wrong, can an app take 90% of your CPU and be "frozen"?

-- Zak

DerekH

12:48 pm on Jun 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Zak
In many ways you are completely correct.
A well written programme can eat CPU time and yet still respond to Apple Events.
A badly written programme can eat CPU time with its head in the sand, and appear frozen (as you describe) for some time before emerging triumphant and behaving normally again.

The particular question you ask - can a programme be locked up and still be eating CPU time, the answer is yes. A programme that doesn't respond can either have turned off its eventing structure and go and waited for something that can't happen (a classical deadlock) - no CPU time - or can be rushing around in an infinite loop sucking up CPU time and not responding.

I don't see a way you can deduce that consuming CPU time means it's not broken... Mind you, I suppose a programme that's broken and eating CPU time will *always* consume the maximum. Fluctuations *might* indicate it's doing something "real".

And yes, I've seen a broken programme (Dreamweaver) eat CPU time and not come back at all.

DerekH

solly

9:52 pm on Jun 5, 2005 (gmt 0)

10+ Year Member



Not to say that Dreamweaver is anything like my sloppily written program, but I have written a program that I thought stopped responding, but it was, in fact, just thinking.

I Force Quit it a few times before figuring out that it was still working. It actually was doing a task that was handed off to MySQL. It was not using much CPU, but MySQL was. It took a while, but it did do its thing and it was happy and so was I.

So, give it a while...maybe an hour if you can find something else to do for that long (OS X is multi-threaded, thankfully), and see.

lZakl

11:48 am on Jun 6, 2005 (gmt 0)

10+ Year Member



Well just for kicks I let it render over 1,900,000 vectors while I was gone (this is a VERY detailed map that measures over 50" x 50" when printed) over the weekend. And even though Adobe says "Not Responding", infact it WAS thinking. I can't guess how long it took, and I am glad I left it over the weekend! I wish there was a way (Like you said DerekH) to tell if it is just looping/deadlocked etc. I would have normally Force Quite the app and started over. What it really needed was time. I suppose a little 'common sense' is needed in these cases where you look at the file you are processing and use size & content to guage the amount of time/effort your PC will need to process it. Adobe might consider a progress bar for larger items such as this! ;0) THought I'd give an update, and thanks for your replies!

-- Zak

microcars

7:45 pm on Jun 7, 2005 (gmt 0)

10+ Year Member



just so you don't feel alone on this, if you use Apple's iDVD it will show progress and keep cranking, but once it is done encoding the video and starts encoding the audio you get the Spinning Beach Ball.
Looking in Activity Monitor it shows iDVD as "hung" and you are tempted to Force Quit it.

But if you just leave it alone , it will finish on its own.

Yeah, a better feedback mechanism should be implemented but its not just Adobe Products that need it.