Processing a very long running operation without pumping windows messages




















August 30, at am. Leave a Reply Cancel reply Enter your comment here Fill in your details below or click an icon to log in:. Email required Address never made public. Name required. Get visible missing templates in Visual Studio. Email Subscription Enter your email address to subscribe to this blog and receive notifications of new posts by email. Join 49 other followers. Blog at WordPress. Follow Following. Early Bites Join 49 other followers.

Sign me up. Already have a WordPress. Log in now. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Sign in to vote.

Part of my addin involves writing to tens or hundreds of thousands of cells in Excel. If this process takes more than a minute I get the following error message. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment STA threads should use pumping wait primitives such as CoWaitForMultipleHandles and routinely pump messages during long running operations.

Can anyone offer some suggestions? Thanks Bernie. Wednesday, October 29, AM. It is firing because you are conducting a long operation without allowing messages to pump.

You can resolve this problem by pumping messages at the end of each pass through the loop. Rob, I'd say it's occurring because you are essentially stalling the message loop by spending a lot of time stepping through code. In your case it's probably more of a nuisance than anything else. I'd just disable it. The implications of disabling it are that you may lose a useful tool for discovering bugs before you release the application. MDAs are disabled in release builds anyway. That's why you only see it during a debugging session.

Ainscough wrote: Brian, How can I determine why it is occuring? No such option under Debug. Is this a C only option? Rob, Right click on the toolbar area and select Customize. You'll find it in the list of commands under Debug.

Just drag it up to your Debug menu. It wasn't in the menu with my install either. Brian thanks, Rob. This discussion thread is closed Start new discussion. Posted Oct am Phionix Add a Solution. Top Rated Most Recent. Accept Solution Reject Solution. I've seen this before and found that it is an error that only shows up when your app is running under the the Debug build under the debugger.

The Release build running outside Visual Studio will never show this problem at all. Posted Oct am Dave Kreskowiak. My app gave me that error even when I ran it in release mode. Dave Kreskowiak 8-Oct pm. If you run it under the debugger, it will throw this message.

If you run the Release outside of Visual Studio, it doesn't happen. I just found this, and it worked for my VB. NET console application although I do not understand what is connection between a "message pump" [which sounds so windows-ly and a console application. Posted Feb am Gjuro Kladaric. I already faced this error message. With Regards.



0コメント

  • 1000 / 1000