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.

QuickOPC .NET : blocking issue on windows 7 x64

More
29 Aug 2015 05:43 #3530 by support
Thank you. I will test on Windows Server 2012 R2 as well, as tell you if I find a solution.

I almost can't believe it, but in 2 days or less, Microsoft has responded to my bug report with this:
"We have fixed this bug internally and the bug fix will be rolled out soon.", although the bug was not easily reproducible (see connect.microsoft.com/VisualStudio/feedback/details/1718934/...-result-when-ryujit-is-enabled ). I assume the fix will also work on Windows Server 2012 R2; if not, will tell them...

Best regards

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

More
28 Aug 2015 11:02 #3529 by s-petit@hotmail.fr
Hi,

I tried the following combinations (on W2012 R2) :

1) Disable RyuJit (set to 0) : same issue
2) Keep RyuJit to 1 and set UseLegacyJit to 1 : same issue
3) Disable RyuJit (set to 0) set UseLegacyJit to 1 : same issue

4) Try to set UseLegacyJit to 1 in app.config file : same issue


Regards.

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

More
27 Aug 2015 15:49 #3527 by support
Thank you. After my initial reply. I have edited the post a little, and suggested a different registry setting instead (because Microsoft does not recommend the original one - but has not explained why).

Can you please try both these settings in Windows 2012 R2 ?

Best regards

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

More
27 Aug 2015 15:43 #3526 by s-petit@hotmail.fr
Hi,

First, Thank you for you answers.

I tried to disable RyuJit compiler and it seems working good.

Sorry but i would like to add one more "issue" related : i do the same test on a Windows 2012 R2 Server (i wanted to ensure that this solution would work also on this OS) and there, the issue is not resolved even after disabling RyuJit compiler...

Regards.

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

More
27 Aug 2015 13:19 #3521 by support
Update: Could not easily reproduce it in a small project. Reported to Microsoft anyway, with details of the debugging session in disassembly: connect.microsoft.com/VisualStudio/feedback/details/1718934/...-result-when-ryujit-is-enabled .

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

More
27 Aug 2015 10:51 - 28 Aug 2015 06:35 #3520 by support
More to this issue: Current state of investigation leads to a conclusion that this is a bug in Microsoft .NET Framework 4.6. It appears to have something to do with the new JITting algorithm; similar to (but not the same) as nickcraver.com/blog/2015/07/27/why-you-should-wait-on-dotnet-46/ .

We have dug down to the assembly level, and found that with .NET 4.6 under 64 bits, certain 'ldiv' call in managed C++ (part of MFC HashKey(...) function) sometimes returns 0xCCCCCCCCCCCCCCCC, or zero, instead of the correct result. The incorrect result can then cause just about anything in the program. In our case, it throws an unhandled exception, because we are proactively checking some assumptions, and they get violated.

We have also found that the problem can be resolved by adding a DWORD 'useLegacyJIT' under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework with value of 1.

(Changing the DWORD 'UseRyuJIT' under the same registry key from 1 to 0 also works, but is not recommended, according to github.com/Microsoft/dotnet/blob/master/docs/testing-with-ryujit.md ).


We will report the problem to Microsoft if we find a way to show it in a small stand-alone project.

Best regards
Last edit: 28 Aug 2015 06:35 by support.
The following user(s) said Thank You: s-petit@hotmail.fr

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

More
26 Aug 2015 14:43 #3517 by support
It is great that you have identified the conditions under which the problem appears. I have reproduced it now as well, by installing .NET Framework 4.6.

(Uninstalling .NET Framework 4.6. fixes the problem, but because it is an in-place upgrade, one needs to follow the uninstallation of 4.6 by an installation of 4.5).

I cannot tell at this moment what is the precise cause. We will investigate, and let you know here.

Thank you for reporting the problem and identifying the circumstances.

Best regards

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

More
26 Aug 2015 12:45 #3514 by s-petit@hotmail.fr
Hi,

In the meantime i made some new tests on a "blank" windows 7 64 bit computer with only framework 4.5 installed and after QuickOPC installation, demo program worked fine.

After checking differences in the installed components, i made a new test : install MS framework 4.6. After this installation, the error occurs.

The MS framework 4.6 is an in place update of framework 4.5. It seems that it has some "bad" effects here...

QuickOPC does it support this framework 4.6 update ?

Regards.

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

More
26 Aug 2015 08:40 #3512 by support
I do not have any "real" suggestions how to deal with it, but couple of things that are worth trying, or answering:

1. Have you had any previous of QuickOPC ever installed on the machine? (trying to look for conflicts)

2. If the machine has not been rebooted after QuickOPC installation, please reboot it, even if the installation program has not asked for it.

3. When under the debugger, please obtain and post exception details - the call stack, and the InnerException, if any, and its call stack, and so on.

4. Any chance to do the same on a different machine?

Thank you, and best regards

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

More
25 Aug 2015 16:55 #3511 by s-petit@hotmail.fr
Hi,

Yes, C++ redist are installed (exactly the same build numbers)

Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.21005
Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.21005

I downloaded the installation package today.

Do you have any idea of another possible cause ?

Regards.

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

Moderators: support
Time to create page: 0.089 seconds