Re: Backgroundworker chokes



Henry99 <Henry99@xxxxxxxxxxxxxxxxx> wrote:
What happens here?
The backgroundworker (bgw) unzips RTF-Helpfiles (up to 1 MB in size).
The ProgressChanged-Event gets the unzipped files (to display them in a
RichtTextBox)

It follows the Trace that prints always what bgw has unzipped and what
ProgressChanged received:

1. bgw: HelpFilelistgzip
2. ProgressChanged: HelpFilelistgzip OK!
3. bgw: HelpThreadprioritygzip
4. ProgressChanged: HelpThreadprioritygzip OK!
5. bgw: HelpPathgzip
6. bgw: HelpRegexgzip
7. ProgressChanged: HelpRegexgzip NOT OK!!
8. ProgressChanged: HelpRegexgzip

Initially its all good.
But after line 4 (HelpPathgzip) all goes crazy.
bgw works, one after the other, on two separate files (line 5 and 6)
Then ProgressChanged receives TWO times the same unzipped File (lines 7 and 8)

The File in line 5 (HelpPathgzip) is very small (1 kBytes)
The file in line 6 (HelpRegexgzip) is also a nothing (3 kBytes)
In comparison the file in line 1 (HalpFilelistgzip) is enormous (1 MB)

How come that bgw choked?

I'm afraid I find it fairly tricky to understand what you've written.

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.


Loading