{"action":"created","issue":{"url":"https://api.github.com/repos/limetext/lime-qml/issues/23","repository_url":"https://api.github.com/repos/limetext/lime-qml","labels_url":"https://api.github.com/repos/limetext/lime-qml/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/limetext/lime-qml/issues/23/comments","events_url":"https://api.github.com/repos/limetext/lime-qml/issues/23/events","html_url":"https://github.com/limetext/lime-qml/issues/23","id":151009218,"number":23,"title":"lime-qml crashes when using RGBA and render","user":{"login":"zgiles","id":692659,"avatar_url":"https://avatars.githubusercontent.com/u/692659?v=3","gravatar_id":"","url":"https://api.github.com/users/zgiles","html_url":"https://github.com/zgiles","followers_url":"https://api.github.com/users/zgiles/followers","following_url":"https://api.github.com/users/zgiles/following{/other_user}","gists_url":"https://api.github.com/users/zgiles/gists{/gist_id}","starred_url":"https://api.github.com/users/zgiles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zgiles/subscriptions","organizations_url":"https://api.github.com/users/zgiles/orgs","repos_url":"https://api.github.com/users/zgiles/repos","events_url":"https://api.github.com/users/zgiles/events{/privacy}","received_events_url":"https://api.github.com/users/zgiles/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-25T23:54:20Z","updated_at":"2016-04-26T16:11:13Z","closed_at":null,"body":"I've gotten lime-qmp/main to build. When it runs, it crashes with a panic that something is null\r\n\r\nSpecifically:\r\n\r\n```\r\n2016/04/25 19:49:58 View.qml:50: Buffer: updateMyView:  frontendView(0x7c7be50)\r\n[04/25/16 19:49:58] [INFO] Fix: &{0xfa9eab0 0xc82022e150}  59  7452\r\n2016/04/25 19:49:58 Buffer.qml:457: Bad currentSelection! null\r\n[04/25/16 19:49:58] [INFO] Python sez:\r\n[04/25/16 19:49:58] [INFO] Python sez:\r\npanic: runtime error: invalid memory address or nil pointer dereference\r\n[signal 0xb code=0x1 addr=0x28 pc=0x4005999]\r\n\r\ngoroutine 1 [running, locked to thread]:\r\nmain.(*qmlfrontend).DefaultBg(0xc820275170, 0x0)\r\n\t/Users/zrg/go/src/github.com/limetext/lime-qml/main/frontend.go:131 +0x99\r\nreflect.Value.call(0x442c840, 0xc820275170, 0x313, 0x444b210, 0x4, 0xc820405ad8, 0x0, 0xa, 0x0, 0x0, ...)\r\n\t/usr/local/go/src/reflect/value.go:432 +0x120a\r\nreflect.Value.Call(0x442c840, 0xc820275170, 0x313, 0xc820405ad8, 0x0, 0xa, 0x0, 0x0, 0x0)\r\n\t/usr/local/go/src/reflect/value.go:300 +0xb1\r\ngithub.com/limetext/qml-go.hookGoValueCallMethod(0x7c1a1f0, 0xc820240000, 0x7fff00000001, 0x7fff5fbfcd40)\r\n\t/Users/zrg/go/src/github.com/limetext/qml-go/bridge.go:515 +0x425\r\ngithub.com/limetext/qml-go._Cfunc_componentCreateWindow(0x7d66c50, 0x0, 0x0)\r\n\t??:0 +0x36\r\n```\r\n\r\nBased on this, I assume `DefaultBg` was the issue.\r\nChanging the return of `DefaultBg` (and `DefaultFg`) to a constant, it returns properly and lime-qml runs.. but with bad colors.\r\n\r\nChanged code that makes it run instead of crash:\r\n```\r\n@@ -18,7 +18,6 @@ import (\r\n        \"github.com/limetext/backend\"\r\n        \"github.com/limetext/backend/keys\"\r\n        \"github.com/limetext/backend/log\"\r\n-       \"github.com/limetext/backend/render\"\r\n        . \"github.com/limetext/text\"\r\n        \"github.com/limetext/util\"\r\n )\r\n@@ -128,15 +127,11 @@ func (t *qmlfrontend) qmlChanged(value, field interface{}) {\r\n }\r\n\r\n func (t *qmlfrontend) DefaultBg() color.RGBA {\r\n-       c := t.ColorScheme().Spice(&render.ViewRegions{})\r\n-       c.Background.A = 0xff\r\n-       return color.RGBA(c.Background)\r\n+       return color.RGBA{ R: 100, G: 105, B: 255, A: 0}\r\n }\r\n\r\n func (t *qmlfrontend) DefaultFg() color.RGBA {\r\n-       c := t.ColorScheme().Spice(&render.ViewRegions{})\r\n-       c.Foreground.A = 0xff\r\n-       return color.RGBA(c.Foreground)\r\n+       return color.RGBA{ R: 255, G: 100, B: 255, A: 0}\r\n }\r\n```\r\n\r\nMy guess is that likely `render.ViewRegions{}` is broke, but I don't know enough about it.\r\n\r\nWill research more, but if someone knows, perhaps it's an easy fix.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/limetext/lime-qml/issues/comments/214797080","html_url":"https://github.com/limetext/lime-qml/issues/23#issuecomment-214797080","issue_url":"https://api.github.com/repos/limetext/lime-qml/issues/23","id":214797080,"user":{"login":"ricochet1k","id":76901,"avatar_url":"https://avatars.githubusercontent.com/u/76901?v=3","gravatar_id":"","url":"https://api.github.com/users/ricochet1k","html_url":"https://github.com/ricochet1k","followers_url":"https://api.github.com/users/ricochet1k/followers","following_url":"https://api.github.com/users/ricochet1k/following{/other_user}","gists_url":"https://api.github.com/users/ricochet1k/gists{/gist_id}","starred_url":"https://api.github.com/users/ricochet1k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricochet1k/subscriptions","organizations_url":"https://api.github.com/users/ricochet1k/orgs","repos_url":"https://api.github.com/users/ricochet1k/repos","events_url":"https://api.github.com/users/ricochet1k/events{/privacy}","received_events_url":"https://api.github.com/users/ricochet1k/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T16:11:13Z","updated_at":"2016-04-26T16:11:13Z","body":"Yeah, I got exactly the same issue. Make sure to run `git submodules update --init --recursive`.\r\n\r\n@zoli Updating lime-qml is rather complex right now. We need to make it easier somehow."}}