Application Not Responding?

BlitzPlus Forums/BlitzPlus Programming/Application Not Responding?

VIP3R(Posted 2004) [#1]
I have an application that is showing some very odd behaviour.

The application reads a file into a bank, reads various contents of this bank and writes them to a new bank, then saves the new bank into a new file.

If the above process takes longer than 5-6 seconds (i.e. processing several files), the menu bar goes blank (white) and the canvas and status bar no longer update. If I look at the Windows Task Manager at this point, it shows 'two' applications running and both are showing 'Not Responding'. During this time the application is still working away normally, once it has finished, the second mystery application disappears from the task manager and the application returns to normal (menu reappears, canvas and status bar display normally).

The CPU usage percentage never goes higher than 10%. I've tried putting delays in everywhere to prevent timing problems & CPU overload, but nothing works.

Has anyone else experienced this problem before now?

Or any ideas what might be causing this?


Murilo(Posted 2004) [#2]
Try thowing in a WaitEvent(0) every now and then and it should fix the problem.


Hotcakes(Posted 2004) [#3]
It's not really a problem - your application is busy. If it's busy, it's not talking to Windows. If Windows doesn't see your app wasting time talking to Windows, Windows gets angry. Windows is a moody mistress. But some PeekEvent() or WaitEvent(0) commands /should/ 'fix' it, as Daze suggested.


VIP3R(Posted 2004) [#4]
Arrggg, I don't believe it!

Windows was indeed being a moody bugger, WaitEvent(0) fixed it. Why isn't this in the docs? :/

Thanks Daze and Hotcakes ;)