tcolar / goed

Terminal based code editor / development environment
MIT License
133 stars 6 forks source link

GUI : Frequently crashes on OSX when making window fullscreen #136

Closed tcolar closed 8 years ago

tcolar commented 8 years ago
[signal SIGBUS: bus error code=0x2 addr=0xc422a40000 pc=0x7fff81791f49]

runtime stack:
runtime.throw(0x44ac9cb, 0x2a)
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/panic.go:566 +0x95
runtime.sigpanic()
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/sigpanic_unix.go:12 +0
x2cc

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x43b0460, 0xc420449a88, 0xc400000000)
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/cgocall.go:130 +0x110 
fp=0xc420449a58 sp=0xc420449a18
github.com/skelterjohn/go.wde/cocoa._Cfunc_flushWindowScreen(0x590d250)
        ??:0 +0x41 fp=0xc420449a88 sp=0xc420449a58
github.com/skelterjohn/go.wde/cocoa.(*Window).FlushImage.func1()
        /Users/thibaut/DEV/go/src/github.com/skelterjohn/go.wde/cocoa/cocoa_darw
in.go:154 +0x77 fp=0xc420449ad0 sp=0xc420449a88
github.com/skelterjohn/go.wde/cocoa.onMainThread.func1()
        /Users/thibaut/DEV/go/src/github.com/skelterjohn/go.wde/cocoa/cocoa_darw
in.go:188 +0x32 fp=0xc420449b08 sp=0xc420449ad0
github.com/skelterjohn/go.wde/cocoa.runTask()
        /Users/thibaut/DEV/go/src/github.com/skelterjohn/go.wde/cocoa/cocoa_darw
in.go:198 +0x56 fp=0xc420449b38 sp=0xc420449b08
github.com/skelterjohn/go.wde/cocoa._cgoexpwrap_a4cbc65d50bf_runTask()
        ??:0 +0x14 fp=0xc420449b40 sp=0xc420449b38
runtime.call32(0x0, 0x7fff5fbfd8b8, 0x7fff5fbfd957, 0x0)
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/asm_amd64.s:479 +0x4c 
fp=0xc420449b70 sp=0xc420449b40
runtime.cgocallbackg1(0x0)
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/cgocall.go:282 +0x17d 
fp=0xc420449be8 sp=0xc420449b70
runtime.cgocallbackg(0x0)
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/cgocall.go:169 +0x84 f
p=0xc420449c50 sp=0xc420449be8
runtime.cgocallback_gofunc(0x4005798, 0x43b0400, 0xc420449ce8, 0x474f8a0)
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/asm_amd64.s:728 +0x74 
fp=0xc420449c70 sp=0xc420449c50
runtime.asmcgocall(0x43b0400, 0xc420449ce8)
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/asm_amd64.s:575 +0x42 
fp=0xc420449c78 sp=0xc420449c70
runtime.cgocall(0x43b0400, 0xc420449ce8, 0xc400000000)
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/cgocall.go:131 +0x128 
fp=0xc420449cb8 sp=0xc420449c78
github.com/skelterjohn/go.wde/cocoa._Cfunc_NSAppRun()
        ??:0 +0x41 fp=0xc420449ce8 sp=0xc420449cb8
github.com/skelterjohn/go.wde/cocoa.Run()
        /Users/thibaut/DEV/go/src/github.com/skelterjohn/go.wde/cocoa/cocoa_darw
in.go:169 +0x14 fp=0xc420449cf0 sp=0xc420449ce8
github.com/skelterjohn/go%2ewde.Run()
        /Users/thibaut/DEV/go/src/github.com/skelterjohn/go.wde/wde.go:87 +0x1b 
fp=0xc420449cf8 sp=0xc420449cf0
github.com/tcolar/goed/ui.(*GuiTerm).Listen(0xc420192f00)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/term_gui.go:248 +0x4
4 fp=0xc420449d20 sp=0xc420449cf8
github.com/tcolar/goed/ui.(*Editor).Start(0xc420190000, 0x0, 0x0, 0x0)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/editor.go:147 +0xbe6
 fp=0xc420449ec0 sp=0xc420449d20
main.main()
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/main.go:107 +0x308 fp=0
xc420449f48 sp=0xc420449ec0
runtime.main()
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/proc.go:183 +0x1f4 fp=
0xc420449fa0 sp=0xc420449f48
runtime.goexit()
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/asm_amd64.s:2086 +0x1 
fp=0xc420449fa8 sp=0xc420449fa0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/asm_amd64.s:2086 +0x1

goroutine 18 [syscall]:
os/signal.signal_recv(0xc42002dfa8)
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/sigqueue.go:116 +0x157
os/signal.loop()
        /usr/local/Cellar/go/1.7beta2/libexec/src/os/signal/signal_unix.go:22 +0
x22
created by os/signal.init.1
        /usr/local/Cellar/go/1.7beta2/libexec/src/os/signal/signal_unix.go:28 +0
x41

goroutine 8 [IO wait]:
net.runtime_pollWait(0x58461f0, 0x72, 0x0)
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/netpoll.go:160 +0x59
net.(*pollDesc).wait(0xc4201907d0, 0x72, 0xc42003ed68, 0xc4200141d0)
        /usr/local/Cellar/go/1.7beta2/libexec/src/net/fd_poll_runtime.go:73 +0x3
8
net.(*pollDesc).waitRead(0xc4201907d0, 0x471a680, 0xc4200141d0)
        /usr/local/Cellar/go/1.7beta2/libexec/src/net/fd_poll_runtime.go:78 +0x3
4
net.(*netFD).accept(0xc420190770, 0x0, 0x4717680, 0xc4201c4040)
        /usr/local/Cellar/go/1.7beta2/libexec/src/net/fd_unix.go:396 +0x238
net.(*UnixListener).accept(0xc4200cfb80, 0xc400000001, 0xc420019890, 0x44185e0)
        /usr/local/Cellar/go/1.7beta2/libexec/src/net/unixsock_posix.go:158 +0x3
2
net.(*UnixListener).Accept(0xc4200cfb80, 0xc420019830, 0x44185e0, 0x47347c0, 0x4
448a00)
        /usr/local/Cellar/go/1.7beta2/libexec/src/net/unixsock.go:229 +0x49
net/http.(*Server).Serve(0xc420136000, 0x471d1c0, 0xc4200cfb80, 0x0, 0x0)
        /usr/local/Cellar/go/1.7beta2/libexec/src/net/http/server.go:2223 +0x1ce
net/http.Serve(0x471d1c0, 0xc4200cfb80, 0x0, 0x0, 0xc420052790, 0x4035338)
        /usr/local/Cellar/go/1.7beta2/libexec/src/net/http/server.go:2071 +0x95
github.com/tcolar/goed/api.(*Api).Start.func1(0xc4200fa530, 0x471d1c0, 0xc4200cf
b80)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/api/api.go:30 +0x4b
created by github.com/tcolar/goed/api.(*Api).Start
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/api/api.go:34 +0x111

goroutine 10 [chan receive]:
github.com/skelterjohn/go.wde/cocoa.onMainThread(0xc422a38000)
        /Users/thibaut/DEV/go/src/github.com/skelterjohn/go.wde/cocoa/cocoa_darw
in.go:192 +0x10e
github.com/skelterjohn/go.wde/cocoa.(*Window).FlushImage(0xc42012d830, 0x0, 0x0,
 0x0)
        /Users/thibaut/DEV/go/src/github.com/skelterjohn/go.wde/cocoa/cocoa_darw
in.go:155 +0x61
github.com/tcolar/goed/ui.(*GuiTerm).paint(0xc420192f00)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/term_gui.go:303 +0x1
4d
github.com/tcolar/goed/ui.(*GuiTerm).Flush(0xc420192f00)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/term_gui.go:188 +0x2
b
github.com/tcolar/goed/ui.(*Editor).TermFlush(0xc420190000)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/editor.go:290 +0x34
github.com/tcolar/goed/ui.(*Editor).Render(0xc420190000)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/wm.go:90 +0x274
github.com/tcolar/goed/actions.edRender.Run()
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/actions/actions_ed.go:2
44 +0x38
github.com/tcolar/goed/actions.(*edRender).Run(0x476b428)
        <autogenerated>:23 +0x4d
github.com/tcolar/goed/actions.actionBus.Start(0xc42013b560, 0xc42013b5c0)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/actions/actionbus.go:34
 +0xe7
github.com/tcolar/goed/actions.(*actionBus).Start(0xc42012ea50)
        <autogenerated>:2 +0x5b
created by github.com/tcolar/goed/ui.(*Editor).Start
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/editor.go:141 +0xb8f

goroutine 11 [sleep]:
time.Sleep(0xbebc200)
        /usr/local/Cellar/go/1.7beta2/libexec/src/runtime/time.go:59 +0xe1
github.com/tcolar/goed/ui.(*Editor).autoScroller(0xc420190000)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/editor.go:327 +0x2e
created by github.com/tcolar/goed/ui.(*Editor).Start
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/editor.go:143 +0xbb4

goroutine 12 [chan receive]:
github.com/tcolar/goed/actions.(*ar).CmdbarEnabled(0x476b428, 0xf)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/actions/actions_cmd.go:
38 +0x82
github.com/tcolar/goed/event.handleEvent(0xc420426480, 0xc420445ea8, 0xc420445ef
8)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/event/event_handler.go:
67 +0x104
github.com/tcolar/goed/event.Listen()
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/event/event_handler.go:
44 +0x147
created by github.com/tcolar/goed/ui.(*Editor).Start
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/editor.go:145 +0xbcc

goroutine 13 [chan receive]:
github.com/tcolar/goed/ui.(*GuiTerm).listen(0xc420192f00)
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/term_gui.go:254 +0x1
4d
created by github.com/tcolar/goed/ui.(*GuiTerm).Listen
        /Users/thibaut/DEV/go/src/github.com/tcolar/goed/ui/term_gui.go:247 +0x3
f

goroutine 50 [syscall, locked to thread]:
github.com/skelterjohn/go.wde/cocoa._Cfunc_getNextEvent(0x590d250, 0x0, 0x0, 0x0
)
        ??:0 +0x5c
github.com/skelterjohn/go.wde/cocoa.(*Window).EventChan.func1(0xc42012d830, 0xc4
20454030, 0xc420456000)
        /Users/thibaut/DEV/go/src/github.com/skelterjohn/go.wde/cocoa/events_dar
win.go:62 +0xc5
created by github.com/skelterjohn/go.wde/cocoa.(*Window).EventChan
        /Users/thibaut/DEV/go/src/github.com/skelterjohn/go.wde/cocoa/events_dar
win.go:214 +0xaa
tcolar commented 8 years ago

Fixed, seems it needs at least one paint event before any window maximize event .....