cogent icon indicating copy to clipboard operation
cogent copied to clipboard

Having project main lang set wrong can cause crashes

Open rohrlich opened this issue 5 years ago • 1 comments

I open the project on a different computer and the main lang was set to markdown instead of go. I got "Gi Debug: File type Markdown not supported" trying to debug. The non-debug executable was fine.

Got a couple of crashes while narrowing down the problem. Here is top of stack.

2020/03/27 19:26:41 Gi Debug: File type Markdown not supported

panic: runtime error: index out of range [2] with length 2

goroutine 358 [running]: github.com/goki/gi/giv.(*TableView).LayoutHeader(0xc025100000) /Users/rohrlich/go/src/github.com/goki/gi/giv/tableview.go:480 +0xc18 github.com/goki/gi/giv.(*TableView).Layout2D(0xc025100000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4150000000000000) /Users/rohrlich/go/src/github.com/goki/gi/giv/tableview.go:884 +0x8f github.com/goki/gi/gi.(*Node2DBase).Layout2DChildren(0xc041ab0b00, 0x0, 0x9d) /Users/rohrlich/go/src/github.com/goki/gi/gi/node2d.go:850 +0x167 github.com/goki/gi/gi.(*Layout).Layout2D(0xc041ab0b00, 0x7d8, 0x9d, 0x9e3, 0x549, 0x0, 0x41500000409c0000)

rohrlich avatar Mar 28 '20 02:03 rohrlich

I couldn't get it to crash -- can you reproduce? I added a much more informative error message.

rcoreilly avatar Apr 06 '20 10:04 rcoreilly