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.

StackOverflow error after upgrading to version QuickOPC-2023.1

More
02 Oct 2023 12:15 - 02 Oct 2023 12:15 #12270 by support
Hello.
I can calm you down in this respect.

Some more details: The problem was with the setting in the control word that causes the FPU to throw an exception whenever it encounters "infinite" values. And I mean "encounter". Not just Infinite results, but it throws also when an attempt is made to simply load an infinite value into an FPU register, e.g. for later comparison (which was our case). The FPU control word came in set this way and caused problems. .NET only works when the control word is set to *not* throw in this case.

So, the interim workaround that I sent you was just about this - reverting the control word value. This could have global effect and change the behavior on your side (even though it does not affect precision or anything like that, just the error behavior). And that was also the reason why I said it was an interim workaround and that it was better to wait.

Our final solution does not alter the control word, so you are safe. We have changed the code so that we do not actually need the Infinite value internally (or better said, the code was changed that it does not attempt to load it into any FPU register).

Best regards
Last edit: 02 Oct 2023 12:15 by support.
The following user(s) said Thank You: ColinOPC

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

More
02 Oct 2023 10:39 #12269 by ColinOPC
Hi,
GREAT NEWS !!! ...great work over the weekend....thanks

What seems strange is the fact that Delphi is blind to the final machine the client will run the code on, as the system is compiled as a 32bit application I am unaware that it has the ability at run time to say..'hey i'm running on a 64 bit machine lets do things differently...' I think you were correct when you said that the implementation on Windows 11 is the key factor. as my main dev machine works fine with windows 11, but using the QuickOPC-2021 version (No issue).

Also my worry is that what effect will this have on all my floating point maths that take places in my application, as I have to calculate roll weights ,lengths and diameter's using floating point maths. I cant have my system now print weights and measures labels for the same rolls now showing different values....Will this "update" affect my applications maths routines now or is it only in my call to you and your sub level .NET calls ? :unsure: :unsure: :unsure: :unsure: :unsure:

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

More
02 Oct 2023 08:35 #12267 by support
Hello.

The problem should be resolved in QuickOPC 2023.1 build 401.1 and later, now available for download on our Web site (verification: version 5.71.401.1 or later should be listed on the first page of the Setup wizard, when you run it).

Instructions: Uninstall QuickOPC on the target computer, and install the new one. You do not need to rebuild your own Delphi application.

Bottom note: This is provably not our fault (except maybe for the testing part, but that is a tough call). It is a bug either by Microsoft (.NET / COM), or in Delphi. I can create a very simple "bug-free" code with the same faulty behavior. This problem is in the settings of floating point unit (FPU). .NET expects the FPU control word to be set in certain way. But when the call is made from Delphi (in 32-bit process, and on Windows 11), the FPU control word is set differently. Either there is a requirement for certain parameters of the FPU control word in the Windows or COM world, and in such case Delphi is at fault, by calling out with improper settings in effect. Or there is no such requirement, and in such case .NET is at fault, because it should assure the proper settings at each entry point.

We have made a workaround in our code for the most common cases.

Best regards

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

More
01 Oct 2023 13:31 - 01 Oct 2023 13:32 #12263 by support
Hello.

We will probably have the update to 2023.1 ready during Monday. If you can wait, I recommend to wait.

Best regards
Last edit: 01 Oct 2023 13:32 by support.
The following user(s) said Thank You: ColinOPC

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

More
01 Oct 2023 13:20 #12262 by ColinOPC
Went into your Demo source code and tested that...IT WORKS !!!

Just going to load my full application... Now our main application is WORKING (Well the application does not ejected by windows now) :) :) :) :)

Shall I risk doing a release build for the production team or wait until you have released another version of your software, what would you recommend ?

Colin

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

More
01 Oct 2023 12:09 #12261 by support
Hello.
One more interim solution:

Please add following code right after 'begin' of your main program:
{$IFDEF CPUX86} 
System.Set8087CW(System.Default8087CW or $01); 
{$ENDIF CPUX86} 
This should help. Please let me know if it works. We are still working on a solution on our side.

Best regards

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

More
30 Sep 2023 15:13 #12260 by ColinOPC
Thanks, that's really good news, we really appreciate your help with this, as well as also working through the weekend to get this sorted. I wouldn't be surprised if more of you customers come to you over the following weeks with an issue similar to this one.

WELL DONE !!!

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

More
30 Sep 2023 15:09 #12259 by support
Hello,
Yes, the log output from the demo app is basically good, as expected.

Regards

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

More
30 Sep 2023 15:08 #12258 by support
Hello.
I understand - it's unfortunate that you cannot switch to 64 bits now - but as I said, I believe we are on a good way to resolve the issue in 32 bits too.

Regards

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

More
30 Sep 2023 15:02 #12257 by ColinOPC
During our few weeks of testing the OPC issue we already made a standalone version, so i will dig that out and test it on Windows 64, but i can confirm, if i build your Demo under 64 it definitely runs ok. we get the attached output, not sure if this is good or bad ...?

File Attachment:

File Name: Example48output.txt
File Size:10 KB
Attachments:

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

Moderators: support
Time to create page: 0.080 seconds