Error help

Tech-Archive recommends: Fix windows errors by optimizing your registry



The CLR has been unable to transition from COM context 0x1b1f20 to COM
context 0x1b2090 for 60 seconds. The thread that owns the destination
context/apartment is most likely either doing a non pumping wait or
processing a very long running operation without pumping Windows
messages. 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.

Hi there. I'm a bit new, and I got this Error message occasionly when I
load my program, maybe when I switch to another program when I'm
loading it up, I don't know . It has a pretty big memory consumption
when it loads up, as it loads an array from a text file, something like
this:

Dim openFileDialog1 As New OpenFileDialog()
openFileDialog1.FileName =
My.Application.Info.DirectoryPath & "\test.txt"
Dim sr As New System.IO.StreamReader(openFileDialog1.OpenFile)
If Not (sr Is Nothing) Then
For i = 1 To 50
myArray(i) = sr.ReadLine
Next
End If
sr.Close()

Because it only happens sometimes, it's hard to find what is
influencing it? Any ideas n how to stop it happening, or catch it
better?

Thanks in advance

.



Relevant Pages

  • Import JPEG progress dialog gets stuck
    ... In normal operation my subdatasheet has an On Current event that loads ... loading the image, then it vanishes. ... right-clicks (context menu) on another record other than the current ...
    (microsoft.public.access.formscoding)
  • Re: Airplane II
    ... "Airplane", they even managed to change the context of some jokes. ... Loads of times. ...
    (uk.media.tv.misc)
  • Re: Kirks group is a clone of RMCR with an important exception
    ... currently reading in context) the HTML used (<PRE tags) results in ... loads of whitespace and big gaps between lines of text. ...
    (rec.music.classical.recordings)
  • Re: Click link in embeded Object trigger parent window reload?
    ... Mark Anderson wrote: ... Having started out from a context of ... > frames/iframes I'd headed down quite the wrong path. ... IE loads the called page into the clicked. ...
    (comp.lang.javascript)
  • Re: Error help
    ... processing a very long running operation without pumping Windows ... It has a pretty big memory consumption ... when it loads up, as it loads an array from a text file, something like ... Dim openFileDialog1 As New OpenFileDialog ...
    (microsoft.public.dotnet.languages.vb)