Segfault when resizing the window during training
Opened this issue · 0 comments
taiqihe commented
Can be replicated for multiple programs under emer/examples
. Go version is 1.14.4; dependencies downloaded with go get -u ./...
with GO111MODULE=off
.
Error log (ra25):
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x5cf855]
goroutine 51 [running]:
image.(*RGBA).Bounds(0x0, 0xc0045357b0, 0x10, 0x10, 0x1469f20)
/usr/local/go/src/image/image.go:72 +0x5
image/draw.clip(0x18ccd60, 0x0, 0xc00272f1d0, 0x18c8ea0, 0xc002f6a280, 0xc00272f200, 0x0, 0x0, 0xc00272f220)
/usr/local/go/src/image/draw/draw.go:75 +0x54
image/draw.DrawMask(0x18ccd60, 0x0, 0x433, 0x57, 0x445, 0x69, 0x18c8ea0, 0xc002f6a280, 0x0, 0x0, ...)
/usr/local/go/src/image/draw/draw.go:107 +0xab
image/draw.Draw(...)
/usr/local/go/src/image/draw/draw.go:101
github.com/goki/gi/gi.(*Viewport2D).DrawIntoParent(0xc0026de000, 0xc000160000)
/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:362 +0x11a
github.com/goki/gi/gi.(*Viewport2D).RenderViewport2D(0xc0026de000)
/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:542 +0x72
github.com/goki/gi/svg.(*Icon).Render2D(0xc0026de000)
/home/theo/Projects/go/src/github.com/goki/gi/svg/icons.go:128 +0x11b
github.com/goki/gi/gi.(*Node2DBase).Render2DChildren(0xc004788000)
/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:908 +0xa2
github.com/goki/gi/gi.(*Icon).Render2D(0xc004788000)
/home/theo/Projects/go/src/github.com/goki/gi/gi/icon.go:153 +0x61
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc0026d50f0)
/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*Layout).Render2D(0xc0026d50f0)
/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:2107 +0xc3
github.com/goki/gi/gi.(*Node2DBase).Render2DTree(0xc0026d50f0)
/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:869 +0x78
github.com/goki/gi/gi.(*PartsWidgetBase).Render2DParts(...)
/home/theo/Projects/go/src/github.com/goki/gi/gi/widget.go:853
github.com/goki/gi/gi.(*ButtonBase).Render2D(0xc0026d4c80)
/home/theo/Projects/go/src/github.com/goki/gi/gi/buttons.go:696 +0xd0
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc00263bdf0)
/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*Layout).Render2D(0xc00263bdf0)
/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:2107 +0xc3
github.com/goki/gi/gi.(*Node2DBase).Render2DTree(0xc00263bdf0)
/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:869 +0x78
github.com/goki/gi/gi.(*PartsWidgetBase).Render2DParts(...)
/home/theo/Projects/go/src/github.com/goki/gi/gi/widget.go:853
github.com/goki/gi/gi.(*ButtonBase).Render2D(0xc00263b980)
/home/theo/Projects/go/src/github.com/goki/gi/gi/buttons.go:696 +0xd0
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc000287180)
/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*Frame).Render2D(0xc000287180)
/home/theo/Projects/go/src/github.com/goki/gi/gi/frame.go:167 +0xc4
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc0008b2600)
/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*TabView).Render2D(0xc0008b2600)
/home/theo/Projects/go/src/github.com/goki/gi/gi/tabview.go:511 +0xb6
github.com/goki/gi/gi.(*SplitView).Render2D(0xc0005b6000)
/home/theo/Projects/go/src/github.com/goki/gi/gi/splitview.go:418 +0x1c9
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc000465180)
/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*Frame).Render2D(0xc000465180)
/home/theo/Projects/go/src/github.com/goki/gi/gi/frame.go:167 +0xc4
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc000463b80)
/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*Layout).Render2D(0xc000463b80)
/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:2107 +0xc3
github.com/goki/gi/gi.(*Node2DBase).Render2DChildren(0xc000160000)
/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:908 +0xa2
github.com/goki/gi/gi.(*Viewport2D).Render2D(0xc000160000)
/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:643 +0x62
github.com/goki/gi/gi.(*Node2DBase).Render2DTree(0xc000160000)
/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:869 +0x78
github.com/goki/gi/gi.(*Node2DBase).FullRender2DTree(0xc000160000)
/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:728 +0x89
github.com/goki/gi/gi.(*Viewport2D).FullRender2DTree(0xc000160000)
/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:563 +0x91
github.com/goki/gi/gi.(*Viewport2D).UpdateNodes(0xc000160000)
/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:837 +0x4d5
github.com/goki/gi/gi.(*Viewport2D).NodeUpdated(0xc000160000, 0x195df40, 0xc0008d2000, 0x1, 0x13a06a0, 0xc00312d1c8)
/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:749 +0x166
github.com/goki/gi/gi.SignalViewport2D(0x1930040, 0xc000160000, 0x1932140, 0xc0008d2000, 0x1, 0x13a06a0, 0xc00312d1c8)
/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:703 +0x1d2
github.com/goki/ki/ki.(*Signal).Emit(0xc0008d2058, 0x1932140, 0xc0008d2000, 0x1, 0x13a06a0, 0xc00312d1c8)
/home/theo/Projects/go/src/github.com/goki/ki/ki/signal.go:173 +0x1a7
github.com/goki/ki/ki.(*Node).UpdateEnd(0xc0008d2000, 0xc0008d2001)
/home/theo/Projects/go/src/github.com/goki/ki/ki/node.go:1935 +0x20a
github.com/emer/emergent/netview.(*NetView).GoUpdate(0xc00076f800)
/home/theo/Projects/go/src/github.com/emer/emergent/netview/netview.go:126 +0xf6
main.(*Sim).UpdateView(0x2d754a0, 0x18e2001)
/home/theo/Projects/go/src/github.com/emer/leabra/examples/ra25/ra25.go:349 +0x92
main.(*Sim).AlphaCyc(0x2d754a0, 0x18dd101)
/home/theo/Projects/go/src/github.com/emer/leabra/examples/ra25/ra25.go:416 +0x37b
main.(*Sim).TrainTrial(0x2d754a0)
/home/theo/Projects/go/src/github.com/emer/leabra/examples/ra25/ra25.go:474 +0xa1
main.(*Sim).Train(0x2d754a0)
/home/theo/Projects/go/src/github.com/emer/leabra/examples/ra25/ra25.go:574 +0x32
created by main.(*Sim).ConfigGui.func4
/home/theo/Projects/go/src/github.com/emer/leabra/examples/ra25/ra25.go:1263 +0x6f