473,749 Members | 2,356 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 990

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

Similar topics

11
1765
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
4223
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
4314
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
1086
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
9887
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
1445
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
1350
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
1031
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
1550
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
8996
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
8832
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
9566
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
9388
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...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
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...
0
8256
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...
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
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.