limetext / lime

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

runtime error: cgo result has Go pointer #571

Closed stevenroose closed 7 years ago

stevenroose commented 7 years ago

I built Lime on Arch Linux and got this runtime error:

$ ./main 
[10/18/16 13:16:39] [INFO] Initializing
[10/18/16 13:16:39] [DEBG] OnInit callbacks executing
[10/18/16 13:16:39] [DEBG] OnInit callbacks finished
[10/18/16 13:16:39] [DEBG] Scanning ../packages for packages
[10/18/16 13:16:39] [DEBG] Loading package ASP
[10/18/16 13:16:39] [DEBG] Loading package ActionScript
[10/18/16 13:16:39] [DEBG] Loading package AppleScript
[10/18/16 13:16:39] [DEBG] Loading package Batch File
[10/18/16 13:16:39] [DEBG] Loading package C#
[10/18/16 13:16:39] [DEBG] Loading package C++
[10/18/16 13:16:39] [DEBG] Loading package CSS
[10/18/16 13:16:39] [DEBG] Loading plugin CSS.css_completions
[10/18/16 13:16:39] [INFO] Python sez: Loading plugin CSS.css_completions
[10/18/16 13:16:39] [DEBG] Loading package Clojure
[10/18/16 13:16:39] [DEBG] Loading package D
[10/18/16 13:16:39] [DEBG] Loading package Default
[10/18/16 13:16:39] [DEBG] Loading plugin Default.history_list
[10/18/16 13:16:39] [INFO] Python sez: Loading plugin Default.history_list
[10/18/16 13:16:39] [DEBG] Loading package Diff
[10/18/16 13:16:39] [DEBG] Loading plugin Diff.diff
[10/18/16 13:16:39] [INFO] Python sez: Loading plugin Diff.diff
panic: runtime error: cgo result has Go pointer

goroutine 16 [running]:
panic(0x777700, 0xc4201dd9e0)
    /usr/lib/go/src/runtime/panic.go:500 +0x1a1
github.com/limetext/gopy._cgoexpwrap_14798609a186_goGenericAlloc.func1(0xc42024f300)
    ??:0 +0x3a
github.com/limetext/gopy._cgoexpwrap_14798609a186_goGenericAlloc(0x1567d00, 0x0, 0xc420255000)
    ??:0 +0x6f
github.com/limetext/gopy._Cfunc_typeAlloc(0x1567d00, 0x0, 0x0)
    ??:0 +0x4e
github.com/limetext/gopy.(*Type).Alloc(0x1567d00, 0x0, 0x489e01, 0xc42024f530, 0x558d4c, 0xc42024f570)
    /home/steven/gocode/src/github.com/limetext/gopy/type.go:40 +0x99
github.com/limetext/gopy.goClassNew(0x1567d00, 0x7f1c98b910b8, 0x0, 0xc42024f5e0)
    /home/steven/gocode/src/github.com/limetext/gopy/class.go:449 +0x162
github.com/limetext/gopy._cgoexpwrap_14798609a186_goClassNew(0x1567d00, 0x7f1c98b910b8, 0x0, 0x0)
    ??:0 +0x72
github.com/limetext/gopy._Cfunc_PyObject_CallObject(0x7f1c880f3950, 0x7f1c98b764a8, 0x0)
    ??:0 +0x4e
github.com/limetext/gopy.(*BaseObject).CallMethodObjArgs(0x7f1c98b74a98, 0x7d406c, 0xd, 0xc42024f868, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0)
    /home/steven/gocode/src/github.com/limetext/gopy/base.go:230 +0x3ff
github.com/limetext/sublime.(*plugin).Load(0xc42008a9e0)
    /home/steven/gocode/src/github.com/limetext/sublime/plugin.go:40 +0x309
github.com/limetext/sublime.(*pkg).loadPlugin(0xc420276840, 0xc42008a9c0, 0x18)
    /home/steven/gocode/src/github.com/limetext/sublime/package.go:114 +0x86
github.com/limetext/sublime.(*pkg).loadPlugins(0xc420276840)
    /home/steven/gocode/src/github.com/limetext/sublime/package.go:107 +0x2f2
github.com/limetext/sublime.(*pkg).Load(0xc420276840)
    /home/steven/gocode/src/github.com/limetext/sublime/package.go:78 +0x1b2
github.com/limetext/backend/packages.load(0xb8b0e0, 0xc420276840)
    /home/steven/gocode/src/github.com/limetext/backend/packages/package.go:109 +0x35
github.com/limetext/backend/packages.Scan.func1(0xc420499c00, 0x2f, 0x40)
    /home/steven/gocode/src/github.com/limetext/backend/packages/package.go:83 +0x4d
github.com/limetext/backend/packages.Scan(0x7d31f6, 0xb)
    /home/steven/gocode/src/github.com/limetext/backend/packages/package.go:85 +0x441
github.com/limetext/backend.(*PathEvent).call(0xb9c8c0, 0x7d31f6, 0xb)
    /home/steven/gocode/src/github.com/limetext/backend/events.go:145 +0x1dc
github.com/limetext/backend.(*Editor).AddPackagesPath(0xc4200a69a0, 0x7d31f6, 0xb)
    /home/steven/gocode/src/github.com/limetext/backend/editor.go:407 +0x9b
main.(*frontend).loop(0xc420380b90, 0x0, 0x0)
    /home/steven/gocode/src/github.com/limetext/lime-qml/main/frontend.go:371 +0x101
main.(*frontend).(main.loop)-fm(0x7f8650, 0x0)
    /home/steven/gocode/src/github.com/limetext/lime-qml/main/frontend.go:63 +0x2a
github.com/limetext/qml-go.Run.func1(0xc4203c5aa0, 0xc4203af2d0)
    /home/steven/gocode/src/github.com/limetext/qml-go/bridge.go:69 +0x37
created by github.com/limetext/qml-go.Run
    /home/steven/gocode/src/github.com/limetext/qml-go/bridge.go:71 +0xc5
stevenroose commented 7 years ago

Should I have put this in the QML frontend repo?

erbridge commented 7 years ago

This is actually an issue with gopy, and can be worked around using GODEBUG=cgocheck=0.