Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

VS 2019 hangs when adding UA .net controls and running debug mode

More
04 May 2020 11:35 #8456 by support
Please do not not use "Quick Reply", it app[ears to be broken.

I tried to reproduce this again, with the precise VS version etc., but still I could not reproduce it. With the repro it is fairly difficult to propse the way forward.

As a workaround, maybe the customer can just take the demo project that works for him, and strip it off the parts he does not need (there aren't too many anywa), and use it as a basis for his new project.

Regarding these details of the behavior:

*when you start a program in VS19, you have 2 options. ‘Start Debugging’ and ‘Start without debugging’. When I choose the ‘Start without Debugging’ the program waited (sort of hanging) for a couple of minutes, then started. When I choose the ‘Start Debugging’ option, it hangs. Once it hangs, my only option is to kill devenv.


Maybe, if there is at least a process in the Task Manager at that time indicating that the program has started, he can use another VS instance and "Attach to Process" and break into it and then obtain the list of threads and the call stacks. The second VS instance might also be used to the same and break into the hung VS instance, but I am afraid that would result in too many running threads (inside VS) and no useful way to sort out what's happening. If it were me, I would try it, but not sure if the customer wants to go to such lengths.

Regards

Please Log in or Create an account to join the conversation.

More
01 May 2020 13:32 #8448 by Restrepo
I apologize if you already received this but I tried "quick reply" and it looked like it did not submit anything so I am sending it again trough regular reply.

Below are the answers to your questions from the customers perspective:

1. Yes, VS 2019 version 16.5.4

2. When I start, the build is OK. I know this because I’ve set the logging level to ‘diagnostic’ and it spews out lots of data and at the end it says no errors or warnings. The next step is to kick off the debugger – this is where it hangs.

3. There is no UI form and Alt+Tab shows nothing.

4. I can’t do anything once it hangs. All the vs controls are unresponsive. I have to shutdown the development studio (devenv.exe) with task manager.


Additional information:

*when you start a program in VS19, you have 2 options. ‘Start Debugging’ and ‘Start without debugging’. When I choose the ‘Start without Debugging’ the program waited (sort of hanging) for a couple of minutes, then started. When I choose the ‘Start Debugging’ option, it hangs. Once it hangs, my only option is to kill devenv.


Please let me know if you do have any other ideas on how to troubleshoot this issue or if you have any questions. Thank you in advance.

Please Log in or Create an account to join the conversation.

More
22 Apr 2020 15:58 #8383 by support
Hello,

can you please find out the additional details below? Thank you.

1. "latest VS 19 rev" - does that mean 16.5.4 ? They are now updating fairly frequently.

2. At which point does it hang? Does the program manage to show its initial UI form? Or does it appear to hang even before that?

3. If it does not show anything: I have seen situations in which Visual Studio decided to stay on top of everything on the desktop, covering the launched app and causing similar confusion. Use Alt+Tab to make sure the app isn't actually there in the list of windows, but hidden.

4. Please ask the customer to follow the procedure here: kb.opclabs.com/Troubleshooting_program_hangs

Best regards

Please Log in or Create an account to join the conversation.

More
21 Apr 2020 13:32 #8382 by Restrepo
Hello Z,

I am currently working with a customer that is experiencing a VS 2019 hang whenever he adds the easyUAClient .net control to his form and he tries to run in debug mode. The strange thing is the following:

*Customer is able to Compile, Run and debug the EasyUADemo project that it's included with the Data CLient toolkit
*I am not able to replicate the behavior on my end with his test applications nor my own test application. I tried to see if I could replicate the issue so I tested it using two virtual machines and my workstation and the toolkit worked as expected.
*It appears that the issue only occurs during debugging

I know there is not much to go with but I have exhausted all my ideas and I was wondering if you have seen this behavior before or if you have any other suggestions for me to look at.

The customer performed the test below:

from the customer:
1. If I start your EasyOPCUADemo test program, all works OK. If I keep your basic OPC controls and modify the program by adding SQL and other windows controls needed for our application, it works normal. Your demo program uses 3 OPC controls: uaDataDialog, uaHostandEndpointDialog, and easyUAClient.
2. Next, I build a new program from scratch, initially with no OPC controls, everything works normally. I just put Inputboxes when I needed OPC inputs.
3. Next, I verified that there were no OPC references in the Project. There were no references.
4. Next, I added the uaDataDialog control. I verified that references were added to the project. All were version 5.58.146.1. I made no code changes, I just added the uaDataDialog control.
5. I tested my program and it ran normally.
6. Next, I added the uaHostandEndpointDialog control to the Project, verified the references were still version 5.58.146.1. Again, no code changes. I tested the program and it ran normally.
7. Next, I added the UAClient cotrol and verified the references. Again, no code changes were made. I tried to run my program, and it hung, just as it had before.
8. The program works perfectly outside the development environment (VS19). The issue is when it tries to run in the debug mode. It builds and publishes with no errors or warnings.
9. I’ve updated VS19 and Windows 10 to the latest revs and still no improvement.


Environment:

Windows 10 - Up to date
VS2019 - Up to date
OPC Data Client 2020.2 - 5.58
.NET framework 4.7

Please let me know if you have any suggestions or any questions. Thank you in advance.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.060 seconds