Skip to content

Long string callback will make "Overlapped I/O operation is in progress" panic of v1.0.12 #12

@lanyeeee

Description

@lanyeeee

func (e *Chromium) Eval(script string) {
if e.webview == nil {
return
}
_script, err := windows.UTF16PtrFromString(script)
if err != nil && !errors.Is(err, windows.ERROR_SUCCESS) {
e.errorCallback(err)
}
_, _, err = e.webview.vtbl.ExecuteScript.Call(
uintptr(unsafe.Pointer(e.webview)),
uintptr(unsafe.Pointer(_script)),
0,
)
if err != nil && !errors.Is(err, windows.ERROR_SUCCESS) {
e.errorCallback(err)
}
}

Error "Overlapped I/O operation is in progress" occurs if the length of the script parameter in Eval function is relatively long (approximately len(script) >= 9000). The corresponding Windows error code is 997.

Steps to reproduce:

  1. Download this project myproject.zip
  2. Run wails dev
  3. Click the Greet button

Then you will see the error message on the console.

I'm sorry to open a new issue, but I wanted to clarify that the previous issue was closed with the comment that it was fixed in v1.0.12. However, I have tested the latest version and can confirm that the problem still persists in v1.0.12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions