limetext / lime

Open source API-compatible alternative to the text editor Sublime Text
http://limetext.github.io
BSD 2-Clause "Simplified" License
15.3k stars 1.06k forks source link

qml frontend crash on closing file #490

Closed pjoe closed 9 years ago

pjoe commented 9 years ago

Getting following crash when starting qml frontend and then closing a file (using menu):

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x90 pc=0x492eb8]

goroutine 1 [running, locked to thread]:
main.(*frontendView).RegionLines(0xc208195640, 0x0)
    /home/pelle/go/src/github.com/limetext/lime/frontend/qml/main.go:409 +0x128
reflect.Value.call(0x7dfe80, 0xc208195640, 0xd13, 0x80c1f0, 0x4, 0xc2084b1cc0, 0x0, 0xa, 0x0, 0x0, ...)
    /usr/lib/go/src/reflect/value.go:419 +0x10e5
reflect.Value.Call(0x7dfe80, 0xc208195640, 0xd13, 0xc2084b1cc0, 0x0, 0xa, 0x0, 0x0, 0x0)
    /usr/lib/go/src/reflect/value.go:296 +0xbc
gopkg.in/qml%2ev1.hookGoValueCallMethod(0x22ac3f0, 0xc2082bc1e0, 0x6, 0x7fffd1ab8050)
    /home/pelle/go/src/gopkg.in/qml.v1/bridge.go:515 +0x42e
gopkg.in/qml%2ev1._Cfunc_applicationExec()
    /home/pelle/go/src/gopkg.in/qml.v1/:59 +0x45
gopkg.in/qml%2ev1.Run(0xc20800af80, 0x0, 0x0)
    /home/pelle/go/src/gopkg.in/qml.v1/bridge.go:63 +0x204
main.main()
    /home/pelle/go/src/github.com/limetext/lime/frontend/qml/main.go:857 +0x192

FYI: running with Qt5.4 and go-qml with PR: https://github.com/go-qml/qml/pull/140