Closed rvs314 closed 1 year ago
Thank you for reporting. I was able to reproduce the issue. It is not a Linux GTK only issue, yet a general issue. It happens when doing explicit data-binding of table cell_rows to a model attribute that is an empty array. A similar issue (in table implicit data-binding) was recently reported here (already fixed): https://github.com/AndyObtiva/glimmer-dsl-libui/issues/36
In any case, I fixed your issue and released the fix in version 0.7.5: https://rubygems.org/gems/glimmer-dsl-libui/versions/0.7.5
Cheers.
Here is a screenshot demonstrating the fix by the way.
When I run the following code:
I get a window, but clicking the 'add musician' button doesn't do anything the first time. Clicking it again, a new musician is added. Clicking it a third time, the app crashes with the following error:
Oddly enough, when you add back the commented line in the above code snippet, adding in an initial element before creating and showing the window object, everything works fine. Given the error message and behavior, I think it's safe to say that GTK is using a red-black tree which is entering an invalid state when initialized with zero elements. This makes sense, because from what I gleamed from the LibUI source, they use a
GtkTreeModel
for their table implementation. I don't know if the issue begins here or if it's somewhere upstream, but I'd be happy to move this somewhere if that's what's appropriate.I'm using Debian GNU/Linux 6.1.0-6-amd64, ruby 3.1.2p20, XOrg Version: 1:7.7+23 and dwm-6.2.