wails
wails copied to clipboard
crash with two save file dialog call
Description
path, e3 := runtime.SaveFileDialog(a.ctx, runtime.SaveDialogOptions{DefaultFilename: fname, Title: "Save file", CanCreateDirectories: true}) path2, e4 := runtime.SaveFileDialog(a.ctx, runtime.SaveDialogOptions{DefaultFilename: fname, Title: "Save file", CanCreateDirectories: true})
two save file dialog call, then click cancel , crashed ,showing the follow error.
2023/05/03 15:15:29 The parameter is incorrect. [0503/151529.490:ERROR:window_impl.cc(119)] Failed to unregister class Chrome_WidgetWin_0. Error = 0
To Reproduce
crashed with two save file dialog call
Expected behaviour
cancel and back to application window. but it crashed.
Screenshots
No response
Attempted Fixes
No response
System Details
wails 2.41
Windows 10 19045.2846
Windows Feature Experience Pack 120.2212.4190.0
Additional context
No response
Thanks for using Wails and reporting this issue.
Could you please try the latest master version, there has been a fix for those dialogs. See PR #2606
Could you please also specify what the content of fname
is?
ok,I will try the latest master version
I change to version,and the same ,fname is "abc.p12" v2.4.2-0.20230501125710-516c4853f91e
You're opening 2 save file dialogs after each other. Presumably fname isn't the same value for both?
the same value for fname.
function SaveFile(){ time.Sleep(time.Second) runtime.SaveFileDialog(a.ctx, runtime.SaveDialogOptions{DefaultFilename: "hello.txt", Title: "Save file", CanCreateDirectories: true}) }
call SaveFile() from js when click save button. click save button twice fast . click cancel when two save file dialog displayed.
Awesome, thanks I was able to reproduce it with your latest comment 👍
That is great.Thanks for this great project.
@lilili87222 - is this still an issue?
I experience "The parameter is incorrect." but haven't figured out how to recreate yet. @leaanthony