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.

"An invalid handle was specified" after app. 25 sec.

More
20 Jan 2018 11:44 - 20 Jan 2018 11:45 #5893 by Renoo
Excuse me, the program works fine when the libraries are imported but not used. The following bit appears to be the issue.

In UserInterface.Designer.vb:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class UserInterface
    Inherits System.Windows.Forms.Form
 
    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()>
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub
 
    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
 
    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()>
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Me.OPCInstance = New OpcLabs.EasyOpc.UA.EasyUAClient(Me.components)
 
        <SNIP>
 
        Me.ResumeLayout(False)
 
    End Sub
 
    <SNIP>
 
    Friend WithEvents OPCInstance As OpcLabs.EasyOpc.UA.EasyUAClient
End Class

The two lines combined produce the error. Note that I have only imported the libraries
Imports OpcLabs.EasyOpc.UA
Imports OpcLabs.EasyOpc.UA.OperationModel

And the two lines in the designer. Nothing else of OPC has been defined in the code. The pre-compiled executable works fine, but the demo UA code (which contains the lines above as well) still crashes.
Last edit: 20 Jan 2018 11:45 by Renoo.

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

More
20 Jan 2018 11:00 - 20 Jan 2018 11:46 #5892 by Renoo
Thank you for your reply.

The demo UA .exe which is provided by OPCLabs works fine without any crashes. I also figured out it crashes only while being debugged by visual studio (2017 Community Edition, .NET Framework 4.5.2). When the program is compiled and I browse to the bin/releases folder to run the program it works fine without errors as well.

I suspect I am doing something wrong in Visual Studio itself, or a setting has been faulty configured. Since this only happens when the OPCLabs library is imported in VS, I'm positive it has something to do with it.

Thanks so far, I hope you're able to help to figure out what could be causing this.

Kindest regards,
Reno
Last edit: 20 Jan 2018 11:46 by Renoo.

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

More
19 Jan 2018 18:52 #5891 by support
Hello, and thank you for your interest in our products.

What you reported is pretty weird. Does it only happen when you build the programs in Visual Studio, or does the pre-compiled demo (in binary, .EXE) that is installed with the product also crash in the same way?

Best regards

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

More
19 Jan 2018 15:17 #5886 by Renoo
Hello,

I'm trying to get an EasyUAClient running in a .NET environment. The program works fine, but every time when I import the OpcLabs.EasyOpc.UA library the program crashes after app. 25 seconds with the following error message:
The program '[14212] Program 1.0.exe' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified'.

Even with the example programs provided by OPCLabs an error occurs after 25 sec.
The program '[848] EasyOpcUADemo.exe' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified'.

The full debug log:
'EasyOpcUADemo.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Program Files (x86)\OPC Labs QuickOPC 2017.2\ExamplesNet\VBNET\VS2012\WindowsForms\EasyOpcUADemo\bin\Debug\EasyOpcUADemo.exe'. Symbols loaded.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\Program Files (x86)\OPC Labs QuickOPC 2017.2\ExamplesNet\VBNET\VS2012\WindowsForms\EasyOpcUADemo\bin\Debug\OpcLabs.EasyOpcUA.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\Program Files (x86)\OPC Labs QuickOPC 2017.2\ExamplesNet\VBNET\VS2012\WindowsForms\EasyOpcUADemo\bin\Debug\OpcLabs.BaseLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\Program Files (x86)\OPC Labs QuickOPC 2017.2\ExamplesNet\VBNET\VS2012\WindowsForms\EasyOpcUADemo\bin\Debug\OpcLabs.EasyOpcForms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\Program Files (x86)\OPC Labs QuickOPC 2017.2\ExamplesNet\VBNET\VS2012\WindowsForms\EasyOpcUADemo\bin\Debug\OpcLabs.BaseLibForms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'Opc.Ua.Client'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'Opc.Ua.Core'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'Opc.Ua.Configuration'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_nl_b77a5c561934e089\mscorlib.resources.dll'. Module was built without symbols.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Internals\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Internals.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization.resources\v4.0_4.0.0.0_nl_b77a5c561934e089\System.Runtime.Serialization.resources.dll'. Module was built without symbols.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'BoxedAppSDK.Managed'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EasyOpcUADemo.exe' (CLR v4.0.30319: EasyOpcUADemo.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms.resources\v4.0_4.0.0.0_nl_b77a5c561934e089\System.Windows.Forms.resources.dll'. Module was built without symbols.
The thread 0x4214 has exited with code 0 (0x0).
The thread 0x2878 has exited with code 0 (0x0).
The thread 0x3d1c has exited with code 0 (0x0).
The program '[848] EasyOpcUADemo.exe' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified'.

I guess I am missing something really obvious, but I can't figure out what.

I hope someone is able to help me. Thanks in advance and have a nice day!

Kindest regards,
Reno

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

Moderators: support
Time to create page: 0.059 seconds