domino14 / macondo

A crossword board game AI, written in Go
https://domino14.github.io/macondo
GNU General Public License v3.0
48 stars 10 forks source link

runtime error when `s` is run without loading a board #314

Open deerawj opened 8 months ago

deerawj commented 8 months ago
macondo> s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x97c29b]

goroutine 51 [running]:
github.com/domino14/macondo/shell.(*ShellController).show(...)
    /Users/cesar/code/macondo/shell/api.go:139
github.com/domino14/macondo/shell.(*ShellController).standardModeSwitch(0xc000236000, {0xc0002a6030?, 0x0?}, 0x0?)
    /Users/cesar/code/macondo/shell/shell.go:851 +0x9b
github.com/domino14/macondo/shell.(*ShellController).Loop(0xc000236000, 0x0?)
    /Users/cesar/code/macondo/shell/shell.go:932 +0x18c
created by main.main in goroutine 1
    /Users/cesar/code/macondo/cmd/shell/main.go:79 +0x653

No command was run before running s; so nothing was loaded.

I don't know if this would help but I shutdown macondo mid simulation just before starting macondo again.

macondo> sim -plies 2
Simulation started. Please do `sim show` and `sim details` to see more info
macondo> {"level":"info","starting-node-count":0,"message":"nodes"}
{"level":"info","time":"2024-01-07T17:53:31+05:30","message":"Simmer is at 1470 iterations..."}
macondo> ^C
{"level":"info","time":"2024-01-07T17:53:35+05:30","message":"got quit signal..."}
{"level":"info","time":"2024-01-07T17:53:35+05:30","message":"server gracefully shutting down"}