You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem arrives when I update a dialog (with edit widget inside) in cycle showing the output of a command as it comes. The dialog is created as follows:
Hi @Peter2121 - I'm sorry for the slow support lately.
This backtrace has me puzzled. Is there any chance you have local modifications to the columns widget? The reason I ask is that at line 550 in columns.go, this cast is failing:
for i := 0; i < lenw; i++ {
// Can only be weight here if !helper[i] ; but not sufficient for it to be eligible
if !widthHelper[i] {
cols := int(((float32(dims[i].(gowid.IRenderWithWeight).Weight()) / float32(totalWeight)) * float32(colsToDivideUp)) + 0.5) // <--- cast to IRenderWithWeight fails
...
}
...
}
But at line 475, prior to the failure, this code runs:
for i := 0; i < lenw; i++ {
switch w2 := dims[i].(type) {
case gowid.IRenderFixed:
...
widthHelper[i] = true // <--- puzzle
...
}
...
}
The error indicates an invalid cast from gowid.RenderFixed to gowid.IRenderWithWeight.
I've just checked the sources of the module github.com/gcla/gowid v1.4.1-0.20220717013040-1d7a75b6f5cb declared in go.mod - there is the same code in columns.go. So, for sure, there are no local modifications here.
I think, the important point here is that it works correctly in 95% of cases and crashes sometimes.
Peter2121
added a commit
to Peter2121/gowid
that referenced
this issue
Mar 8, 2024
...with the following error in console:
cbsd-tui.go:1265
is justapp.MainLoop(handler{})
The problem arrives when I update a dialog (with edit widget inside) in cycle showing the output of a command as it comes. The dialog is created as follows:
NewEditWithScrollbar is taken from editor example.
I suppose that there are some race conditions somewhere...
The text was updated successfully, but these errors were encountered: