Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nil pointer deref when using dispatch #48

Open
Le0Developer opened this issue Jul 7, 2024 · 0 comments
Open

nil pointer deref when using dispatch #48

Le0Developer opened this issue Jul 7, 2024 · 0 comments

Comments

@Le0Developer
Copy link

Getting a nil pointer deref here:

f()

I have no idea how to reproduce this, I've been getting this for months randomly and I can't narrow it down or reproduce consistently.

We use webview.Dispatch to evaluate code that sends RPC responses to JS land (we built our own RPC ontop of webview RPC because we needed async procedures).
This works without issues 99.999% of time, until it doesn't and crashes.

According to our observations, this might be related to navigations? We do "reloadless" navigations in our SPA and crashes seem to happen frequently imminently before/after one.

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7ff62432dbcd]

goroutine 1 [running, locked to thread]:
github.com/webview/webview_go._webviewDispatchGoCallback(0xc8)
        C:/Users/runneradmin/go/pkg/mod/github.com/webview/webview_go@v0.0.0-20230901181450-5a14030a9070/webview.go:217 +0xad
github.com/webview/webview_go._Cfunc_webview_run(0x15d0933d130)
        _cgo_gotypes.go:238 +0x49
github.com/webview/webview_go.(*webview).Run.func1(0xc00009fcb8?)
        C:/Users/runneradmin/go/pkg/mod/github.com/webview/webview_go@v0.0.0-20230901181450-5a14030a9070/webview.go:157 +0x34
github.com/webview/webview_go.(*webview).Run(0xc00007e630?)
        C:/Users/runneradmin/go/pkg/mod/github.com/webview/webview_go@v0.0.0-20230901181450-5a14030a9070/webview.go:157 +0x13
// .... our code that just calls Run
@Le0Developer Le0Developer changed the title nil pointer deref when calling callbacks nil pointer deref when running eval Jul 7, 2024
@Le0Developer Le0Developer changed the title nil pointer deref when running eval nil pointer deref when using dispatch Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant