lpc921 / telegraf-execd-opcda

External input plugin for telegraf to gather data from OPC DA
MIT License
6 stars 2 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #3

Closed miguetronic closed 1 day ago

miguetronic commented 2 weeks ago

2024-08-28T16:39:57Z E! [inputs.execd] stderr: "2024/08/28 09:39:57 I! Connecting to Prosys.OPC.Simulation[localhost]" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "panic: runtime error: invalid memory address or nil pointer dereference" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "[signal 0xc0000005 code=0x0 addr=0x0 pc=0x13b7368]" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "goroutine 1 [running]:" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/go-ole/go-ole.(IDispatch).VTable(...)" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Users/BILLP/go/pkg/mod/github.com/go-ole/go-ole@v1.2.4/idispatch.go:18" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/go-ole/go-ole.getIDsOfName(0x0, {0xc0002afb70, 0x1, 0x0})" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Users/BILLP/go/pkg/mod/github.com/go-ole/go-ole@v1.2.4/idispatch_windows.go:20 +0xc8" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/go-ole/go-ole.(IDispatch).GetIDsOfName(...)" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Users/BILLP/go/pkg/mod/github.com/go-ole/go-ole@v1.2.4/idispatch.go:22" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/go-ole/go-ole.(IDispatch).GetSingleIDOfName(0x13969cc, {0x19eb905, 0x1c})" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Users/BILLP/go/pkg/mod/github.com/go-ole/go-ole@v1.2.4/idispatch.go:47 +0x3b" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/go-ole/go-ole.(IDispatch).InvokeWithOptionalArgs(0xc00043a8d0, {0x19eb905, 0xc0002afc30}, 0xfc88, {0xc0002afc68, 0x2, 0x2})" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Users/BILLP/go/pkg/mod/github.com/go-ole/go-ole@v1.2.4/idispatch.go:63 +0x3b" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/go-ole/go-ole/oleutil.CallMethod(...)" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Users/BILLP/go/pkg/mod/github.com/go-ole/go-ole@v1.2.4/oleutil/oleutil.go:51" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/konimarti/opc.(AutomationObject).Connect(0xc00043f0a0, {0xc0002399f8, 0x15}, {0xc00043a8d0, 0x9})" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Users/BILLP/go/pkg/mod/github.com/konimarti/opc@v0.3.1/connection_windows.go:126 +0x20d" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/konimarti/opc.(AutomationObject).TryConnect(0x0, {0xc0002399f8, 0x15}, {0xc00043efb0, 0x1, 0x1397738})" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Users/BILLP/go/pkg/mod/github.com/konimarti/opc@v0.3.1/connection_windows.go:161 +0x113" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/konimarti/opc.NewConnection({0xc0002399f8, 0x15}, {0xc00043efb0, 0x1, 0x1}, {0xc00043f020, 0x1, 0x1})" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Users/BILLP/go/pkg/mod/github.com/konimarti/opc@v0.3.1/connection_windows.go:457 +0x9d" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/lpc921/telegraf-execd-opcda/plugins/inputs/opcda.(Opcda).Start(0xc0003da7e0, {0x1adf460, 0xc0003da7e0})" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Personal/telegraf-execd-opcda/plugins/inputs/opcda/opcda.go:127 +0x10f" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/influxdata/telegraf/plugins/common/shim.(Shim).RunInput(0xc00043d000, 0x3b9aca00)" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Users/BILLP/go/pkg/mod/github.com/influxdata/telegraf@v1.20.0/plugins/common/shim/input.go:40 +0x150" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "github.com/influxdata/telegraf/plugins/common/shim.(*Shim).Run(0xc000066060, 0x1)" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Users/BILLP/go/pkg/mod/github.com/influxdata/telegraf@v1.20.0/plugins/common/shim/goshim.go:78 +0xfa" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "main.main()" 2024-08-28T16:39:57Z E! [inputs.execd] stderr: "\tC:/Personal/telegraf-execd-opcda/cmd/opcda/main.go:40 +0x1f9"

lpc921 commented 2 weeks ago

I updated all dependencies to latest. Please test again.