5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 17:09:23 +08:00
wails/v2/internal
Amin Yahyaabadi 35eb1e0160
fix: avoid app crashing when the Linux GTK key is empty (#2672)
* fix: avoid app crash when the Linux GTK key is empty

Fixes this error:

```
DEBUG | Log dir is: /root/.config/surrealdb_explorer/log.txt

Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if you want WebKit to use a different signal
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running, locked to thread]:
github.com/wailsapp/wails/v2/internal/frontend/desktop/linux.parseKey({0x0, 0x0})
        /home/aminya/go/pkg/mod/github.com/wailsapp/wails/v2@v2.5.1/internal/frontend/desktop/linux/keys.go:87 +0xa5
github.com/wailsapp/wails/v2/internal/frontend/desktop/linux.acceleratorToGTK(0xc0001c5f20)
        /home/aminya/go/pkg/mod/github.com/wailsapp/wails/v2@v2.5.1/internal/frontend/desktop/linux/keys.go:72 +0x2c
github.com/wailsapp/wails/v2/internal/frontend/desktop/linux.processMenuItem(0x866bc0?, 0xc0001c8a80, 0xc0001c8a80?)
        /home/aminya/go/pkg/mod/github.com/wailsapp/wails/v2@v2.5.1/internal/frontend/desktop/linux/menu.go:159 +0x40b
github.com/wailsapp/wails/v2/internal/frontend/desktop/linux.processSubmenu(0xc0001c8a20, 0x79a2a9?)
        /home/aminya/go/pkg/mod/github.com/wailsapp/wails/v2@v2.5.1/internal/frontend/desktop/linux/menu.go:99 +0xdc
github.com/wailsapp/wails/v2/internal/frontend/desktop/linux.processMenu(0xc00021f6c0, 0x12?)
        /home/aminya/go/pkg/mod/github.com/wailsapp/wails/v2@v2.5.1/internal/frontend/desktop/linux/menu.go:82 +0x46
github.com/wailsapp/wails/v2/internal/frontend/desktop/linux.(*Window).SetApplicationMenu(0xc00021f6c0, 0xc000128dc8)
        /home/aminya/go/pkg/mod/github.com/wailsapp/wails/v2@v2.5.1/internal/frontend/desktop/linux/menu.go:75 +0x1b6
github.com/wailsapp/wails/v2/internal/frontend/desktop/linux.NewWindow(0xc00011ba40, 0x0)
        /home/aminya/go/pkg/mod/github.com/wailsapp/wails/v2@v2.5.1/internal/frontend/desktop/linux/window.go:126 +0x37b
github.com/wailsapp/wails/v2/internal/frontend/desktop/linux.NewFrontend({0x1cea4e8?, 0xc00023b890}, 0xc00011ba40, 0xc000128e40, 0xc0001c8b40, {0x1ce7480?, 0xc000139840})
        /home/aminya/go/pkg/mod/github.com/wailsapp/wails/v2@v2.5.1/internal/frontend/desktop/linux/frontend.go:182 +0x5c5
github.com/wailsapp/wails/v2/internal/frontend/desktop.NewFrontend(...)
        /home/aminya/go/pkg/mod/github.com/wailsapp/wails/v2@v2.5.1/internal/frontend/desktop/desktop_linux.go:16
github.com/wailsapp/wails/v2/internal/app.CreateApp(0xc00011ba40)
        /home/aminya/go/pkg/mod/github.com/wailsapp/wails/v2@v2.5.1/internal/app/app_production.go:84 +0x5a5
github.com/wailsapp/wails/v2/pkg/application.(*Application).Run(0xc000131940)
        /home/aminya/go/pkg/mod/github.com/wailsapp/wails/v2@v2.5.1/pkg/application/application.go:57 +0x29
wails_vue/backend.BootApplication(0xc000131640, 0xc000138a40, 0xc0001c5320, 0xc0001c55c0, 0xc000128b40, 0xc00012ec30, 0xc000131880)
        /home/aminya/Documents/GitHub/teamnoon/SurrealDB-Explorer/backend/Application.go:103 +0x718
reflect.Value.call({0x874160?, 0x1c761f0?, 0xc000138a00?}, {0x8e263d, 0x4}, {0xc0001584d0, 0x7, 0x1c761f0?})
        /usr/local/go/src/reflect/value.go:586 +0xb0b
reflect.Value.Call({0x874160?, 0x1c761f0?, 0x1c761f0?}, {0xc0001584d0?, 0x0?, 0x1c761f0?})
        /usr/local/go/src/reflect/value.go:370 +0xbc
github.com/Envuso/go-ioc-container.(*Invocable).CallMethodWith(0xc000138a00, 0x1c761f0?, {0x0?, 0x1cef290?, 0x8bd180?})
        /home/aminya/go/pkg/mod/github.com/!envuso/go-ioc-container@v0.0.5/invocable.go:149 +0xad
github.com/Envuso/go-ioc-container.(*ContainerInstance).Call(0xc00011c630?, {0x874160?, 0x1c761f0?}, {0x0, 0x0, 0x0})
        /home/aminya/go/pkg/mod/github.com/!envuso/go-ioc-container@v0.0.5/container_invocation.go:30 +0x6c
main.main()
        /home/aminya/Documents/GitHub/teamnoon/SurrealDB-Explorer/main.go:34 +0x112
```

* fix: merge the key length comparison
2023-05-25 18:40:37 +10:00
..
app [v2] DevServer improvements and fixes (#2664) 2023-05-16 09:35:48 +02:00
binding fix: parse struct references for type generation (#2552) 2023-04-26 23:23:39 +10:00
colour feature/turn off color terminal output of dev command (#1947) 2022-10-20 21:11:20 +11:00
frontend fix: avoid app crashing when the Linux GTK key is empty (#2672) 2023-05-25 18:40:37 +10:00
fs Chore/refactor assetserver (#2250) 2022-12-31 10:36:07 +11:00
github Refactored build command (#2123) 2022-12-01 18:18:02 +11:00
go-common-file-dialog Move go-common-file-dialog into project. Fix Title bug. 2022-06-01 21:00:52 +10:00
gomod Bugfix/sync go mod (#2222) 2022-12-20 22:15:36 +11:00
goversion [cli] Add check for minimum required go version (#1853) 2022-09-15 07:28:28 +10:00
logger [windows-x] Huge updates to devmode, runtime, build command. 2021-08-22 23:05:22 +10:00
menumanager Add BackgroundColour and deprecate RGBA (#1475) 2022-06-21 19:47:05 +10:00
platform Remove all systray related for v2. (#2329) 2023-01-26 18:11:31 +11:00
process [v2] Fix killing dev command on Windows 2021-10-03 22:19:40 +11:00
project fix: fix go test errors (#2169) 2022-12-06 06:45:06 +11:00
s Update Svelte to Vite 3 (#1643) 2022-07-24 20:20:02 +10:00
shell [bindings] Pass ts_generation flags as env variable (#2194) 2022-12-11 07:38:06 +11:00
signal Better signal handling (#1488) 2022-06-25 09:26:17 +10:00
staticanalysis Bump golang.org/x/net in /v2/internal/staticanalysis/test/standard (#2458) 2023-03-08 08:30:51 +11:00
system Update zypper.go (#2593) 2023-04-16 10:00:39 +10:00
typescriptify Fix reserve word check. 2023-03-07 19:48:30 +11:00
webview2runtime [v2] NSIS installer support for Windows (#1184) 2022-03-02 19:44:31 +11:00
wv2installer fix: fix go test errors (#2169) 2022-12-06 06:45:06 +11:00