CompCogNeuro / sims

Simulations for the Computational Cognitive Neuroscience textbook
https://compcogneuro.org
BSD 3-Clause "New" or "Revised" License
139 stars 52 forks source link

ch9/sg crashes on ProbeAll on Windows #15

Closed rcoreilly closed 3 years ago

rcoreilly commented 4 years ago
jhwilmot commented 4 years ago

I have the same issue on Mac.

rcoreilly commented 4 years ago

Jake can you post the stack trace from the crash?

jhwilmot commented 4 years ago

I just tried it again and this time it didn't crash. I'm not sure what happened the first few times. If it happens again I'll post it.

hmshreyas7 commented 4 years ago

I did the following on Windows:

This was the order in which the README describes the steps. I ran it manually through the command prompt and got this when it crashed:

2020/06/12 10:00:40 No data points
panic: runtime error: index out of range [1] with length 1

goroutine 9 [running]:
github.com/emer/etable/eplot.(*Plot2D).GenPlotBar(0xc001680e00)
        C:/Users/oreilly/go/src/github.com/emer/etable/eplot/barplot.go:129 +0x10f0
github.com/emer/etable/eplot.(*Plot2D).GenPlot(0xc001680e00)
        C:/Users/oreilly/go/src/github.com/emer/etable/eplot/eplot2d.go:274 +0xe7
github.com/emer/etable/eplot.(*Plot2D).Style2D(0xc001680e00)
        C:/Users/oreilly/go/src/github.com/emer/etable/eplot/eplot2d.go:595 +0x8b
github.com/goki/gi/gi.(*Node2DBase).Style2DTree.func1(0x2081e20, 0xc001680e00, 0x6, 0x1d41a20, 0xc0018e2000, 0x1)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/node2d.go:756 +0x58
github.com/goki/ki/ki.(*Node).FuncDownMeFirst(0xc0018e2000, 0x6, 0x1d41a20, 0xc0018e2000, 0x1e561e8)
        C:/Users/oreilly/go/src/github.com/goki/ki/ki/node.go:1650 +0x77f
github.com/goki/gi/gi.(*Node2DBase).Style2DTree(0xc0018e2000)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/node2d.go:750 +0x110
github.com/goki/gi/gi.(*Node2DBase).FullRender2DTree(0xc0018e2000)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/node2d.go:691 +0x5d
github.com/goki/gi/gi.(*Viewport2D).FullRender2DTree(0xc0018e2000)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/viewport.go:548 +0x98
github.com/goki/gi/gi.(*Viewport2D).UpdateNodes(0xc0018e2000)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/viewport.go:813 +0x4dc
github.com/goki/gi/gi.(*Viewport2D).SetNeedsFullRender(0xc0018e2000)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/viewport.go:773 +0x58
main.(*Sim).ConfigGui.func27(0x208d0a0, 0xc0018d8000, 0x20848a0, 0xc0051e6c80, 0x0, 0x0, 0x0)
        C:/Users/oreilly/go/src/github.com/CompCogNeuro/sims/ch9/sg/sg.go:2004 +0x5d
github.com/goki/ki/ki.(*Signal).Emit(0xc0051e8528, 0x20848a0, 0xc0051e6c80, 0x0, 0x0, 0x0)
        C:/Users/oreilly/go/src/github.com/goki/ki/ki/signal.go:162 +0x1ac
github.com/goki/gi/gi.(*Action).ButtonRelease(0xc0051e6c80)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/action.go:222 +0x119
github.com/goki/gi/gi.(*ButtonBase).MouseEvent.func1(0x20848a0, 0xc0051e6c80, 0x208d0a0, 0xc0018d8000, 0x0, 0x1c7be40, 0xc00b766580)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/buttons.go:438 +0xd4
github.com/goki/gi/gi.(*WinEventRecv).Call(0xc00a8bbcf8, 0x208d0a0, 0xc0018d8000, 0x0, 0x1c7be40, 0xc00b766580)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/events.go:116 +0x93
github.com/goki/gi/gi.(*EventMgr).SendEventSignal(0xc0018d8190, 0x203b640, 0xc00b766580, 0x1)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/events.go:237 +0x556
github.com/goki/gi/gi.(*Window).ProcessEvent(0xc0018d8000, 0x203b640, 0xc00b766580)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/window.go:1521 +0x7b3
github.com/goki/gi/gi.(*Window).EventLoop(0xc0018d8000)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/window.go:1448 +0x3d
github.com/goki/gi/gi.(*Window).StartEventLoop(0xc0018d8000)
        C:/Users/oreilly/go/src/github.com/goki/gi/gi/window.go:854 +0x74
main.guirun()
        C:/Users/oreilly/go/src/github.com/CompCogNeuro/sims/ch9/sg/sg.go:67 +0x52
main.main.func1()
        C:/Users/oreilly/go/src/github.com/CompCogNeuro/sims/ch9/sg/sg.go:59 +0x27
github.com/goki/gi/gimain.Main.func1(0x204db00, 0x1a36980)
        C:/Users/oreilly/go/src/github.com/goki/gi/gimain/gimain.go:31 +0x2b
github.com/goki/gi/oswin/driver/glos.Main.func1()
        C:/Users/oreilly/go/src/github.com/goki/gi/oswin/driver/glos/app.go:87 +0x47
created by github.com/goki/gi/oswin/driver/glos.Main
        C:/Users/oreilly/go/src/github.com/goki/gi/oswin/driver/glos/app.go:86 +0x8e
rcoreilly commented 4 years ago

this is fixed now on mac -- should be on other platforms -- will test

rcoreilly commented 3 years ago

actually fixed now..