473,699 Members | 2,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

potential problems in threading

Hi,

I've had my application going back to desktop randomly when executing
ShowDialog commands.
I posted to this list and was asked to post code but unfortunately I cannot
reproduce this problem with a smaller project and I don't want to post my
entire app on this list.

Anyway, after further troubleshooting it looks like my problem comes from a
threading issue. I have my main interface running in the main thread and
another thread with a class listening to the COM port. This thread in itself
runs good but in combination with my custom forms it crashes every once in a
while.

To implement the COM port listener thread I used a threadControlle r class
and I followed guidelines that I found in books and online.
There is no direct interaction between the window and the COM port listener
thread.

Here is my question: beside GUI access, what else do I have to be aware of
when using multi threading? Is there something (even obvious as I'm kind of
new to threading) that I could have done wrong to make my app unstable?

Thanks for any pointers

Nov 20 '05 #1
0 987

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

Similar topics

11
1760
by: Glen Wolinsky | last post by:
This is my first attempt as asynchronous processing. I have created a small test app as proof of concept, but I am having one proglem. In the example (code listed below), my callback routine has two problems: 1. It runs TWICE; and 2. While it seems to update the web page controls, the results never show up on the page. I am using delegates per a couple of examples I found on MSDN and elsewhere.
4
4220
by: David Mc | last post by:
We recently installed the 1.1 redist of .Net on a new server. Only after installing .Net did I realize that the regional settings of the server had not been localized. The application we have written uses GB style dates i.e. dd/mm/yyyy. When running new server we were getting error message - i.e. incorrect date format. First we removed the app and .net, reset the locale, rebooted and re-installed everything. However server still...
2
4311
by: juky | last post by:
Hi all, I have a loop in the thread checking for a particular service status, whenever the status changes to "stopped" a RaiseEvent is generated by thread and another function runs. At the same time the thread is suspended. When I try to resume it from the another function I have some problems. Thank you. Juky
1
1084
by: mburghdorf | last post by:
I am currently working on a vb.net program that interacts with autocad. The thread processes a building that was created within the program and comes up with a price. I then after the job has been priced give the user an option to display a report that they would be interested in. One of the options interacts with autocad and errors out. If I disable threading it then works perfectly fine. I am not sure why this happens or why threading...
2
9884
by: Jeff | last post by:
hey asp.net 2.0 I've placed a LoginStatus control on a master page (so I don't need to have it on every webpage) in my project. When I click on this control to logout, I get this error: A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll An exception of type 'System.Threading.ThreadAbortException' occurred in
1
1442
by: monica73174 | last post by:
I have migrated a vb.net program to vb 2005. I am going nuts trying to fix this. There is a splash screen that fades in and then in the background some sub procedures are taking place. Here is the original code; This code gives me cross threading errors dealing with the opacity. Private myDebuglog As DebugLog = ApplicationDebugLog Private FormAlpha As Double = 0 Private WithEvents AlphaTimer As New System.Timers.Timer ...
6
1348
by: rh0dium | last post by:
Hi Experts!! I am trying to get the following little snippet to push my data to the function func(). What I would expect to happen is it to print out the contents of a and loglevel. But it's not working. Can someone please help me out. ---------<snip>-------------- #!/usr/bin/env python
2
1030
by: b0ssY | last post by:
Hi all, I have a problem with threading here. In my scenario, I need to do a very long operation after opening a file. Because of the long operation, it will cause the program to become "Not Responding" if the user clicks anywhere in the application. This is where my threading comes into place, replacing the troublesome "Not Responding" with a loading message in a form. However, the problem is that at program load/startup, my program...
3
1549
by: winningElevent | last post by:
I'm thinking of creating simple test program, but before I jump to coding I would like to ask so I can hopefully avoid any tricky threading bug. I plan to have a GUI and will have its own thread. I also want to have a backgroundworker thread to keep checking for the connection between desktop and device. In that thread, I may have timer for periodically checking maybe every half of second to see if connection is still good. The...
0
8705
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
8623
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9196
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
8896
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6546
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
4390
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3071
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
2362
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.