CompCogNeuro/sims

ch7/pvlv/pvlv.go crashes when multi-condition sequence PosExt transitions fm 0(PosAcq50) to 1(PosExtinct) WHILE TrialTypeData tab displayed

thazy opened this issue · 1 comments

thazy commented

NEEDS to be incorporated into next published version of the sims. .../emer/leabra/examples/pvlv/pvlv.go has a workaround fix.

Steve Read reported this crash and Randy Gobbel diagnosed the problem:

It appears that the cause of this crash was a bug in etable.Plot2D.GenPlotXY that was using the set of indices from the 3-condition case, in the acquisition phase, when the actual number of rows had decreased, in the extinction phase. I added a call to DeleteInvalidIndices right after the line that sets the number of rows in the TrialTypeData table, and it's now working for me. The new code has been committed to github, not yet incorporated into a release.

-Randy

On Tue, Mar 16, 2021 at 4:36 PM Stephen Read <read@usc.edu> wrote:
To add to this I was running Cataline on a Mac.

I had a student report that PVLV was crashing on her and I was just able to repeat this.  I was going through the Extinction part of the exercise and when I got to the part after training, when I set StepN back to 1, it crashed on me.

Anyone have idea what is going on. This is what was in the terminal window:

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
(base) Stephen-Reads-MacBook-Pro:~ read$ /Applications/emergent_sims\ v1.2.3/mac_binaries/mac-3_sims/ch7/pvlv ; exit;
ComboBox RunParams selected index: 24 data: PosExt
Initializing...
initializing weights
Initializing...
panic: runtime error: index out of range [10] with length 10

goroutine 127 [running]:
github.com/emer/etable/eplot.(*Plot2D).GenPlotXY(0xc0006ab800)
/Users/oreilly/go/pkg/mod/github.com/emer/etable@v1.0.19/eplot/xyplot.go:205 +0x2070
github.com/emer/etable/eplot.(*Plot2D).GenPlot(0xc0006ab800)
/Users/oreilly/go/pkg/mod/github.com/emer/etable@v1.0.19/eplot/eplot2d.go:281 +0x13a
github.com/emer/etable/eplot.(*Plot2D).Layout2D(0xc0006ab800, 0x46a, 0x117, 0xe0d, 0x7a1, 0x0, 0x4218000041640000)
/Users/oreilly/go/pkg/mod/github.com/emer/etable@v1.0.19/eplot/eplot2d.go:685 +0xd4
github.com/goki/gi/gi.(*Node2DBase).Layout2DChildren(0xc0002c5080, 0x0, 0xbb)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/node2d.go:885 +0x167
github.com/goki/gi/gi.(*Layout).Layout2D(0xc0002c5080, 0x45b, 0xbb, 0xe1c, 0x7b0, 0x0, 0x4218000040980000)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/layout.go:2104 +0xfd
github.com/goki/gi/gi.(*Node2DBase).Layout2DChildren(0xc0007eec00, 0x0, 0xb7)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/node2d.go:885 +0x167
github.com/goki/gi/gi.(*Layout).Layout2D(0xc0007eec00, 0xe, 0xb7, 0xe20, 0x7b4, 0x0, 0x0)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/layout.go:2104 +0xfd
github.com/goki/gi/gi.(*Node2DBase).Layout2DChildren(0xc0007b2000, 0x0, 0x50ff460)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/node2d.go:885 +0x167
github.com/goki/gi/gi.(*SplitView).Layout2D(0xc0007b2000, 0xe, 0x56, 0xe20, 0x7b4, 0x0, 0x4218000041640000)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/splitview.go:401 +0x594
github.com/goki/gi/gi.(*Node2DBase).Layout2DChildren(0xc0004b9180, 0x0, 0x0)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/node2d.go:885 +0x167
github.com/goki/gi/gi.(*Layout).Layout2D(0xc0004b9180, 0x0, 0x0, 0xe2e, 0x7c2, 0x0, 0x4218000000000000)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/layout.go:2104 +0xfd
github.com/goki/gi/gi.(*Node2DBase).Layout2DChildren(0xc0004b8100, 0x0, 0x0)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/node2d.go:885 +0x167
github.com/goki/gi/gi.(*Layout).Layout2D(0xc0004b8100, 0x0, 0x0, 0xe2e, 0x7c2, 0x0, 0xa)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/layout.go:2104 +0xfd
github.com/goki/gi/gi.(*Node2DBase).Layout2DChildren(0xc0007db500, 0x0, 0x0)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/node2d.go:885 +0x167
github.com/goki/gi/gi.(*Viewport2D).Layout2D(0xc0007db500, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1e)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/viewport.go:471 +0x85
github.com/goki/gi/gi.(*Node2DBase).Layout2DTree(0xc0007db500)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/node2d.go:841 +0x21a
github.com/goki/gi/gi.(*Node2DBase).FullRender2DTree(0xc0007db500)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/node2d.go:729 +0x7b
github.com/goki/gi/gi.(*Viewport2D).FullRender2DTree(0xc0007db500)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/viewport.go:566 +0x93
github.com/goki/gi/gi.(*Viewport2D).UpdateNodes(0xc0007db500)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/viewport.go:840 +0x4e5
github.com/goki/gi/gi.(*Viewport2D).SetNeedsFullRender(0xc0007db500)
/Users/oreilly/go/pkg/mod/github.com/goki/gi@v1.1.3/gi/viewport.go:800 +0x51
main.(*Sim).ExecuteRun.func1(0x1, 0xc01753e320)
/Users/oreilly/go/src/github.com/CompCogNeuro/sims/ch7/pvlv/pvlv.go:1178 +0xe5
main.(*Sim).ExecuteRun(0x67f0860, 0x1)
/Users/oreilly/go/src/github.com/CompCogNeuro/sims/ch7/pvlv/pvlv.go:1186 +0x117
created by main.(*Sim).RunSteps
/Users/oreilly/go/src/github.com/CompCogNeuro/sims/ch7/pvlv/pvlv.go:916 +0x191
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Stephen J. Read, Mendel B. Silberberg Professor of Social Psychology
3620 McClintock Ave, 501 SGM
University of Southern California
Los Angeles, CA 90089-1061
read@usc.edu
thazy commented

I confirmed that Randy G's fix worked for me also. I also confirmed the crash had occurred with normal Run (i.e., not Stepping) if the TrialTypeData tab is displayed when the transition to 1(PosExtinct) condition occurs. Finally, the ConfigTrialTypeDataPlot(...) function is called ONLY when its tab is clicked in the viewer. THUS, this crash is a potential problem for any project in which a display schema changes over a sequence of conditions as happens here in transition from the acquisition phase of training to the extinction phase.