Skip to content

panic: runtime error: cgo argument has Go pointer to Go pointer #10

@ericrange

Description

@ericrange
package main

import (
	"fmt"

	"github.com/scalingdata/gowinlog"
)

func main() {
	watcher, err := winlog.NewWinLogWatcher()
	if err != nil {
		fmt.Printf("Couldn't create watcher: %v\n", err)
		return
	}
	err = watcher.SubscribeFromBeginning("Application", "*")
	if err != nil {
		fmt.Printf("Couldn't subscribe to Application: %v", err)
	}
	for {
		select {
		case evt := <-watcher.Event():
			fmt.Printf("Event: %v\n", evt)

		case err := <-watcher.Error():
			fmt.Printf("Error: %v\n\n", err)
		}
	}
}

panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 1 [running]:
github.com/scalingdata/gowinlog.CreateListener.func1(0x1156bc0, 0x1156be0, 0x2, 0xc000004440, 0x20)
        C:/Users/ericr/Documents/Repositories/go/src/github.com/scalingdata/gowinlog/event.go:112 +0x4f
github.com/scalingdata/gowinlog.CreateListener(0x4ebc03, 0xb, 0x4eac63, 0x1, 0x2, 0xc000004440, 0xc000018140, 0x0, 0x584420)
        C:/Users/ericr/Documents/Repositories/go/src/github.com/scalingdata/gowinlog/event.go:112 +0x92
github.com/scalingdata/gowinlog.(*WinLogWatcher).subscribeWithoutBookmark(0xc000018140, 0x4ebc03, 0xb, 0x4eac63, 0x1, 0x2, 0x0, 0x0)
        C:/Users/ericr/Documents/Repositories/go/src/github.com/scalingdata/gowinlog/winlog.go:101 +0x216
github.com/scalingdata/gowinlog.(*WinLogWatcher).SubscribeFromBeginning(0xc000018140, 0x4ebc03, 0xb, 0x4eac63, 0x1, 0x584420, 0x4cfa60)
        C:/Users/ericr/Documents/Repositories/go/src/github.com/scalingdata/gowinlog/winlog.go:80 +0x63
exit status 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions