[v3] Windows: catastrophic failure on cancel SaveFileDialog
Description
Discussion on Discord: https://discord.com/channels/1042734330029547630/1372320919103475743
When the SaveFileDialog is opened and cancelled or closed the application closes with a catastrophic failure.
To Reproduce
- Use the v3-wails branch for wails,
- Clone the repo https://github.com/eryalito/wails-savefiledialogs-bug,
- wails3 dev,
- Press the greet button,
- Cancel or close the dialog
Expected behaviour
The application should not fail in that way. It should return and error or an empty string.
Screenshots
******************************** FATAL *********************************
* There has been a catastrophic failure in your application. *
**************************** Error Details *****************************
panic error: interface conversion: interface {} is nil, not string
runtime.panicdottypeE
at C:/Users/eryalito/go/pkg/mod/golang.org/[email protected]/src/runtime/iface.go:275
github.com/wailsapp/wails/v3/pkg/application.(*windowSaveFileDialog).show.func2
at C:/Users/eryalito/Documents/repos/wails/v3/pkg/application/dialogs_windows.go:201
runtime.goexit
at C:/Users/eryalito/go/pkg/mod/golang.org/[email protected]/src/runtime/asm_amd64.s:1700
************************************************************************
Attempted Fixes
No response
System Details
# System
┌────────────────────────────────────────────────────────────────────────────────────────────┐
| Name | Windows 10 Home |
| Version | 2009 (Build: 26100) |
| ID | 24H2 |
| Branding | Windows 11 Home |
| Platform | windows |
| Architecture | amd64 |
| Go WebView2Loader | true |
| WebView2 Version | 136.0.3240.64 |
| CPU | 11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz |
| GPU 1 | Intel(R) UHD Graphics 750 (Intel Corporation) - Driver: 32.0.101.6078 |
| GPU 2 | NVIDIA GeForce RTX 3060 Ti (NVIDIA) - Driver: 32.0.15.6624 |
| Memory | 32GB |
└────────────────────────────────────────────────────────────────────────────────────────────┘
# Build Environment
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| Wails CLI | v3.0.0-alpha.9 |
| Go Version | go1.23.5 |
| Revision | c186917c34855a286227456386482fc98ca538fe |
| Modified | true |
| -buildmode | exe |
| -compiler | gc |
| CGO_ENABLED | 0 |
| DefaultGODEBUG | asynctimerchan=1,gotypesalias=0,httpservecontentkeepheaders=1,tls3des=1,tlskyber=0,x509keypairleaf=0,x509negativeserial=1 |
| GOAMD64 | v1 |
| GOARCH | amd64 |
| GOOS | windows |
| vcs | git |
| vcs.modified | true |
| vcs.revision | c186917c34855a286227456386482fc98ca538fe |
| vcs.time | 2025-01-13T10:30:16Z |
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
# Dependencies
┌───────────────────────────┐
| npm | 10.9.0 |
| NSIS | Not Installed |
└─ * - Optional Dependency ─┘
# Diagnosis
SUCCESS Your system is ready for Wails development!
Additional context
No response
👋 Thanks for reporting this issue! To help us investigate, could you please:
- Add the output of
wails doctorif not already included - Provide clear steps to reproduce the issue
- If possible, create a minimal reproduction of the issue
This will help us resolve your issue much faster. Thank you!
👋 Thanks for reporting this issue! To help us investigate, could you please:
- Add the output of
wails doctorif not already included - Provide clear steps to reproduce the issue
- If possible, create a minimal reproduction of the issue
This will help us resolve your issue much faster. Thank you!
It works fine on my Windows 10. But I removed the line replace github.com/wailsapp/wails/v3 => ../wails/v3 from your go.mod file. It looks like you're using your own version of wails/v3.
Hi @hkhere. I did this so I could try the latest version on the v3-alpha branch, using the tag v3.0.0-alpha9 works since the change was made afterwards. For reference, ../wails is a clone of the upstream repo (this one) on the last commit on that branch (tested on 3716aca)
@eryalito I see the problem and have reviewed your PR, but I think the changes in your PR are not quite appropriate, so I’ve submitted another PR 4284
@hkhere Indeed your changes look way better, thanks!
Hey! this issue has been fixed (I tried it on alpha.19)
I'm closing the issue now. Thank you @hkhere and @leaanthony