Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

SIGSEGV in xdg_surface_handle_destroy at ../subprojects/wlroots/types/xdg_shell/wlr_xdg_surface.c:281 #1890

Closed
eliasnaur opened this issue Oct 30, 2019 · 2 comments · Fixed by #1964
Labels

Comments

@eliasnaur
Copy link

eliasnaur commented Oct 30, 2019

  • Sway Version:

    $ sway -v
    sway version 1.2-rc1-66-g533acbe6 (Oct 16 2019, branch 'master')

  • Debug Log:

https://paste.sr.ht/%7Eeliasnaur/4206eb363cc600cd03ac9c3000913a961c34560d

  • Configuration File:

https://paste.sr.ht/%7Eeliasnaur/ab8e1fa43e55522724710ff7c54f1bd134cb40d7

Finally, explain the steps you took in plain English to reproduce the problem below.

First, create and run a Gio program. Using Go 1.13,

$ cd $(mktemp -d)
$ go mod init example.com
$ cat > crash.go
package main

import (
	"fmt"
	"log"

	"gioui.org/app"
	"gioui.org/io/system"
	"gioui.org/op"
)

func main() {
	go func() {
		w := app.NewWindow()
		if err := loop(w); err != nil {
			log.Fatal(err)
		}
	}()
	app.Main()
}

func loop(w *app.Window) error {
	first := true
	ops := new(op.Ops)
	for {
		e := <-w.Events()
		switch e := e.(type) {
		case system.DestroyEvent:
			return e.Err
		case system.FrameEvent:
			ops.Reset()
			e.Frame(ops)
			if first {
				w.Invalidate()
				fmt.Println("invalidated")
			}
		}
	}
}
$ go run .

Then, use shift-super-q to quit the Gio program.

You may have to do it several times to trigger the crash.

  • Stack Trace, if sway crashes:
#0  0x00007f2c4beca3e5 in xdg_surface_handle_destroy (client=0xfe8080, resource=0xfeceb0) at ../subprojects/wlroots/types/xdg_shell/wlr_xdg_surface.c:281
swaywm/sway#1  0x00007f2c4b183b28 in ffi_call_unix64 () at /lib64/libffi.so.6
swaywm/sway#2  0x00007f2c4b183339 in ffi_call () at /lib64/libffi.so.6
swaywm/sway#3  0x00007f2c4b87c1b7 in  () at /lib64/libwayland-server.so.0
swaywm/sway#4  0x00007f2c4b878d32 in  () at /lib64/libwayland-server.so.0
swaywm/sway#5  0x00007f2c4b87a36a in wl_event_loop_dispatch () at /lib64/libwayland-server.so.0
swaywm/sway#6  0x00007f2c4b878f25 in wl_display_run () at /lib64/libwayland-server.so.0
swaywm/sway#7  0x000000000041af70 in server_run (server=0x482000 <server>) at ../sway/server.c:205
swaywm/sway#8  0x000000000041a62d in main (argc=1, argv=0x7ffc7e1516f8) at ../sway/main.c:402
@emersion
Copy link
Member

Moving to wlroots since the stack trace doesn't contain any sway symbol.

@emersion emersion transferred this issue from swaywm/sway Oct 30, 2019
@emersion emersion added the bug label Oct 30, 2019
@emersion
Copy link
Member

The PR should fix this issue: #1964

emersion added a commit to emersion/wlroots that referenced this issue Dec 29, 2019
ddevault pushed a commit that referenced this issue Dec 30, 2019
filips pushed a commit to filips/wlroots that referenced this issue Mar 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

2 participants