wails
wails copied to clipboard
crash when invoke runtime function on ubuntu 20.04
Description
add method
func (a *App) SavePosition() {
w, h := runtime.WindowGetSize(a.ctx)
x, y := runtime.WindowGetPosition(a.ctx)
fmt.Printf("%#v %#v\n", w, h)
fmt.Printf("%#v %#v\n", x, y)
}
and invoke in demo greet method.
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
wt-dev-linux-amd64: ../../src/xcb_io.c:260: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
SIGABRT: abort
To Reproduce
Expected behaviour
what is correct way or time to save window position if user change position.
Screenshots
No response
Attempted Fixes
No response
System Details
Wails CLI v2.0.0-beta.37
Scanning system - Please wait (this may take a long time)...Done.
System
------
OS: Ubuntu
Version: 20.04
ID: ubuntu
Go Version: go1.18.3
Platform: linux
Architecture: amd64
Wails
------
Version: v2.0.0-beta.37
Package Manager: apt
Dependency Package Name Status Version
---------- ------------ ------ -------
*docker docker.io Installed 20.10.17
gcc build-essential Installed 12.8ubuntu1.1
libgtk-3 libgtk-3-dev Installed 3.24.20-0ubuntu1.1
libwebkit libwebkit2gtk-4.0-dev Installed 2.36.3-0ubuntu0.20.04.1
npm npm Installed 8.12.1
*nsis nsis Available 3.05-2
pkg-config pkg-config Installed 0.29.1-0ubuntu4
* - Optional Dependency
Diagnosis
---------
Your system is ready for Wails development!
Optional package(s) installation details:
- nsis: sudo apt install nsis
Additional context
No response
another linux issue, runtime.WindowSetPosition can't change position on my ubuntu. (but works on windows)
func (a *App) startup(ctx context.Context) {
a.ctx = ctx
runtime.WindowSetPosition(ctx, 100, 100)
}
Thanks for raising this. Please split into 2 issues.
The first issue, what did google give you? Did you read this? https://github.com/Ulauncher/Ulauncher/issues/667
you could take a look at the zip file to reproduce it. The project is created by wails command and I modified a little. https://github.com/wailsapp/wails/files/8862072/w.zip
Hi @zhangpy - Can you please check the linked PR to see if this fixes your issue? Thanks.
@zhangpy - Any updates?
@leaanthony the pr works, I tested on master branch and did not crash anymore.thanks.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.