473,325 Members | 2,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Error help

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

Oct 1 '06 #1
1 999
The first most obvious thing I'd do is stick a DoEvents() in the For.. Next
loop;

For i = 1 to 50
myArray(i) = sr.ReadLine
Application.DoEvents()
Next

I believe that sub is in System.Windows.Forms. As an alternative, you can
use
System.Threading.Thread.Sleep(0) instead.

I wholeheartedly agree that "COM context 0x1b1f20 to COM context 0x1b2090"
is abolutely
blinkin' useless unless you're a C++ or machine language type expert!!
__________________________________
The Grim Reaper

"Jarry" <Ha***********@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
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

Oct 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Morten Gulbrandsen | last post by:
C:\mysql\bin>mysql -u elmasri -pnavathe company Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 to server version: 4.1.0-alpha-max-debug Type...
2
by: Maurizio Amoroso | last post by:
.... DTSRun: Executing... DTSRun OnStart: DTSStep_DTSExecuteSQLTask_1 DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2 DTSRun OnStart: DTSStep_DTSExecuteSQLTask_4 DTSRun OnStart:...
6
by: Rowan | last post by:
Hello, I have been trying to solve this problem for a couple of weeks now with no progress. I created a package that works when it runs from my computer but when it runs as a scheduled job, it...
5
by: xuatla | last post by:
Hi, I encountered the following compile error of c++ and hope to get your help. test2.cpp: In member function `CTest CTest::operator+=(CTest&)': test2.cpp:79: error: no match for 'operator='...
2
by: Chuck Martin | last post by:
I am having a most frustrating problem that references, web searches, and other resources are no help so far in solving. Basically, I'm trying to design a pop-up window to be called with a funciton...
10
by: DataBard007 | last post by:
Hello Access Gurus: I use Win98SE and Access97. I just built a simple Access97 application which holds all contact information for my personal contacts, such as first name, last name, address,...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
1
by: kvarada | last post by:
Hello Experts, I am building my application on WinNT.4.0_i386_MSVC.7.1 platform. When I build the application on a stand alone machine, it builds fine. But when I build the same application from a...
0
by: andy3381 | last post by:
Hi, I am having a scheduled job running DTS packages on my production environment. My production server server is having Window 2003 Sp2 installed on it. Before rebuilding the server I was...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.