Strange Console App Errors
-
I have a console app that reads and writes from a virtual comport pair. It works great when only one instance of the program is running. But when I execute another app that opens a different virtual comport pair, I get some strange errors. I have tried different (brand) virtual comport devices, resulting in the same effect. Once I enter data on the comport for the second application to read, the first app will respond erroneously. The second app fails to perform as it should as well. So my real question: Do console apps share memory space somehow? These are not threads but separate processes. Any help is appreciated. Thanks.
-
I have a console app that reads and writes from a virtual comport pair. It works great when only one instance of the program is running. But when I execute another app that opens a different virtual comport pair, I get some strange errors. I have tried different (brand) virtual comport devices, resulting in the same effect. Once I enter data on the comport for the second application to read, the first app will respond erroneously. The second app fails to perform as it should as well. So my real question: Do console apps share memory space somehow? These are not threads but separate processes. Any help is appreciated. Thanks.
switang wrote:
So my real question: Do console apps share memory space somehow? These are not threads but separate processes.
No, but the virtual com port might be doing so.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac
-
switang wrote:
So my real question: Do console apps share memory space somehow? These are not threads but separate processes.
No, but the virtual com port might be doing so.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac
I never have any problems when using terminals to connect between the comports. I'd rule out the virtual ports as the culprit. I've used two different virtual devices (com0com and VSPD). I have noticed that entering data in the input com of one app causes the other app to respond as if it received data. I'll have to try this setup on another system to rule mine out.
-
I never have any problems when using terminals to connect between the comports. I'd rule out the virtual ports as the culprit. I've used two different virtual devices (com0com and VSPD). I have noticed that entering data in the input com of one app causes the other app to respond as if it received data. I'll have to try this setup on another system to rule mine out.
switang wrote:
I never have any problems when using terminals to connect between the comports.
What I meant was that it might create the same buffer for multiple connections. Thus, if you have 2 programs opening a virtual port to talk to each other, and then you open another instance of each program, depending on how the virtual com ports are implemented (e.g. if they are a COM service), they may be considered the same session, or may try to use the same buffers.
switang wrote:
I have noticed that entering data in the input com of one app causes the other app to respond as if it received data.
So if you enter data in 1 of the apps, both the app you expect to received the data and the app you don't expect to receive it are getting it? If that is the case, it would seem to indicate what I said above (and that the virtual port isn't thread-safe).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac
-
switang wrote:
I never have any problems when using terminals to connect between the comports.
What I meant was that it might create the same buffer for multiple connections. Thus, if you have 2 programs opening a virtual port to talk to each other, and then you open another instance of each program, depending on how the virtual com ports are implemented (e.g. if they are a COM service), they may be considered the same session, or may try to use the same buffers.
switang wrote:
I have noticed that entering data in the input com of one app causes the other app to respond as if it received data.
So if you enter data in 1 of the apps, both the app you expect to received the data and the app you don't expect to receive it are getting it? If that is the case, it would seem to indicate what I said above (and that the virtual port isn't thread-safe).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac