J
Jarry
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
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