Comments (4)
@konimarti setting GOARCH
to 386 worked. Thank you for responding. I'll close this issue!
from opc.
Investigating and it might have to do with NewAutomationObject
method in connection_windows.go
. At line 223, you declare a pointer of type ole.IUnknown
as such var unknown *ole.IUknown
but maybe anytime you declare a pointer, you should do it this way var unknown *ole.IUnknown = new(ole.IUnknown)
based on this article
from opc.
goroutine 1 [running]:
github.com/go-ole/go-ole.(*IDispatch).VTable(...)
C:/Users/<redacted>/go/pkg/mod/github.com/go-ole/[email protected]/idispatch.go:18
github.com/go-ole/go-ole.getIDsOfName(0x0, {0xc0000cf7c8, 0x1, 0x12994c40598})
C:/Users/<redacted>/go/pkg/mod/github.com/go-ole/[email protected]/idispatch_windows.go:20 +0xc8
github.com/go-ole/go-ole.(*IDispatch).GetIDsOfName(...)
C:/Users/<redacted>/go/pkg/mod/github.com/go-ole/[email protected]/idispatch.go:22
github.com/go-ole/go-ole.(*IDispatch).GetSingleIDOfName(0xac4ea5, {0xcea9a4, 0x9bd487})
C:/Users/<redacted>/go/pkg/mod/github.com/go-ole/[email protected]/idispatch.go:47 +0x3b
github.com/go-ole/go-ole.(*IDispatch).InvokeWithOptionalArgs(0xc0000cf8b8, {0xcea9a4, 0x0}, 0x8, {0xc0000cf8a8, 0x1, 0x1})
C:/Users/<redacted>/go/pkg/mod/github.com/go-ole/[email protected]/idispatch.go:63 +0x3b
github.com/go-ole/go-ole/oleutil.CallMethod(...)
C:/Users/<redacted>/go/pkg/mod/github.com/go-ole/[email protected]/oleutil/oleutil.go:51
github.com/konimarti/opc.(*AutomationObject).GetOPCServers(0x0, {0xc00001a0d0, 0xc0000cf9b8})
C:/Users/<redacted>/go/src/github.com/konimarti/opc/connection_windows.go:183 +0x88
main.listCommand(0xc0000f4160)
Or maybe it's the go-ole package that needs to fix some pointer dereferencing issue.
from opc.
Did you go through the Troubleshooting section? Try setting the architecture to $ENV:GOARCH="386" in Powershell and compile everything again. Most of the time, this is the issue or a wrong ProgID. Also, please add opc.Debug() before the opc.NewConnection call to print more debug-related information.
from opc.
Related Issues (20)
- reconnect & read opc data is zero HOT 1
- Question regarding group by different refreshRate HOT 1
- Question regarding program sometimes crashes at readFromOpc HOT 6
- How to deal with concurrent reading of tags HOT 1
- Influxdb Authentication HOT 2
- Could not load OPC Automation object with wrapper OPC.Automation.1 HOT 3
- How config dcomcnfg.exe in win10
- read() to get discribe and datatype info
- Reading OPC data from device HOT 1
- How to confirm param in opc.NewConnection HOT 4
- read item quality value is uncertain
- the return of CreateBrowser items can include datetype?
- something wrong in cgo when I try read tag by "opc-cli.exe read localhost Graybox.Simulator.1 options.sinfreq numeric.sin.float" HOT 5
- tag/{id} api not support slash
- The opc server Matrikon.OPC.Simulation.1 cannot be obtained using opc-cli.exe
- opc-cli.exe扫描不到Matrikon.OPC.Simulation.1
- it's can be build to wasm file?
- Higher versions of Golang will crash HOT 4
- opc.NewConnection error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opc.