473,320 Members | 2,048 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,320 software developers and data experts.

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 4400
oran johnson <or*****@optonline.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.com>
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.com> wrote in message
news:MP************************@msnews.microsoft.c om...
oran johnson <or*****@optonline.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.com>
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*****@optonline.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*****@optonline.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
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...
14
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 =...
5
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...
0
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...
134
by: jacob navia | last post by:
Hi Suppose you have somewhere #define BOOL int and somewhere else typedef BOOL int;
1
by: Manish | last post by:
The code is as ... $folderlistfile = $path."xmlfile.xml"; /* <list> <details id="2"> <name>Books</name>
10
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,...
8
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...
34
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...
2
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...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
1
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.