473,799 Members | 2,924 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Illegal cross-thread operation:

Illegal cross-thread operation: Control 'PopupInfo' accessed from a thread
other than the thread it was created on.

Can I track this down using the debugger?

Thanks.
Nov 17 '05 #1
4 4436
oran johnson <or*****@optonl ine.net> wrote:
Illegal cross-thread operation: Control 'PopupInfo' accessed from a thread
other than the thread it was created on.

Can I track this down using the debugger?


Well, you shouldn't have too many bits of code accessing a control
anyway - it should be fairly simple to find the bit which is doing it
from the wrong thread.

The above looks like the message from an exception though - why not
just change your exception handling to print out the whole stack trace
rather than just the message?

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #2
You can't access a control property from one thread that was created on
another.

Create a delegate that is invoked from your new thread but handled on your
main thread. Inside the delegate handler, make the UI changes your require.

"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com...
oran johnson <or*****@optonl ine.net> wrote:
Illegal cross-thread operation: Control 'PopupInfo' accessed from a
thread
other than the thread it was created on.

Can I track this down using the debugger?


Well, you shouldn't have too many bits of code accessing a control
anyway - it should be fairly simple to find the bit which is doing it
from the wrong thread.

The above looks like the message from an exception though - why not
just change your exception handling to print out the whole stack trace
rather than just the message?

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #3
I would just look at your code for the threads, the figure out which is
accessing "PopupInfo" .

You need to setup delegate(s) if you want to access the control from another
thread.

"oran johnson" <or*****@optonl ine.net> wrote in message
news:1d******** *************** *******@40tude. net...
Illegal cross-thread operation: Control 'PopupInfo' accessed from a thread
other than the thread it was created on.

Can I track this down using the debugger?

Thanks.

Nov 17 '05 #4
Hi,

It should be easy, it's a method that access PopupInfo that that is used
from a thread, see what methods you are using to run threads and start from
there, also do as Jon said.

Note that if you do the same thing ( updating a control from a worker
thread) from more than one point you need to change them all. so even if you
know the s ourc of the current problem you potentialy have more problems
somewhere else.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"oran johnson" <or*****@optonl ine.net> wrote in message
news:1d******** *************** *******@40tude. net...
Illegal cross-thread operation: Control 'PopupInfo' accessed from a thread
other than the thread it was created on.

Can I track this down using the debugger?

Thanks.

Nov 17 '05 #5

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

Similar topics

2
1809
by: Frances Del Rio | last post by:
Pls, what are all illegal chars in e-mail addreses? specif. I'd like to know if apostrophe is allowed, but would be handy to find a list of all illegal chars for e-mail addresses.. searched google but just found hodge-podge of info, not a list w/all illegal chars, which is what I'm looking for.. thank you.. Frances
14
42433
by: deko | last post by:
Is there a way to check user input for illegal characters? For example, a user enters something into a text box and clicks OK. At that point I'd like to run code such as this: illegal = Array(\, /, :, *, ?, ", <, >, |) If Me.TextBox Contains illegal Then MsgBox "You entered illegal characters. Please try again." Me.TextBox = Null
5
3829
by: Dave | last post by:
I need to cut out illegal characters in a string submitted from a mobile phone to a web form. I need a way to check for the illegal characters in a textbox. I intend to loop through the text and remove the illegal characters. Is there an equivalent function to c# to chr() in Visual basic? I want the decimal value of a character, like "A" is 65 in ACII2. If there is a equilvalent command does it return ACII2 or unicode? I know there is a...
0
314
by: Felix Finch | last post by:
I have a perl test program which has about 80 test cases, each of which creates its own schema so I can remove them with DROP SCHEMA xxx CASCADE. Normally each test case creates and drops the same schema, but it can run a mode to preserve each schema and all the disk files for each test. I recently changed my cleanup code to run psql with all -c commands on one command line rather than a separate psql -c for each one ... psql -c 'DROP...
134
9099
by: jacob navia | last post by:
Hi Suppose you have somewhere #define BOOL int and somewhere else typedef BOOL int;
1
13054
by: Manish | last post by:
The code is as ... $folderlistfile = $path."xmlfile.xml"; /* <list> <details id="2"> <name>Books</name>
10
14126
by: webmaster | last post by:
Getting error: Illegal characters in path what's wrong with this? string xmlSR = "<XmlDS><table1><phone>Value1</phone><name>jake</name></table1></XmlDS>"; myDataSet.ReadXml(xmlSR, XmlReadMode.IgnoreSchema); DataList5.DataSource = myDataSet; DataList5.DataBind(); Also, what's the best way to return XML from a method for binding into
8
4800
by: Just another C hacker | last post by:
Hello friends, I'm writing a program in C with some bits in inline asm for efficiency. I'd like to be able to handle illegal instructions from within asm. Here's an example of a standalone asm program, ..data ..text
34
1818
by: raphfrk | last post by:
This program should copy one file onto the other. It works if I compile it with gcc to a cygwin program. However, if I compile it with the -mno-cygwin option, it doesn't work (this targets native windows). Anyway, I just want to check that the program is valid before I see if I can find a way around a compiler bug. It might be something simple that I am doing wrong.
2
17825
by: Kamaria | last post by:
I wrote this program to calculate the income tax of a user depending on whether or not they were married: import javax.swing.JOptionPane; public class Income_Tax { public static void main (String args) {
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10473
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10249
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9068
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7563
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6804
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4138
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.