GNOME Bugzilla – Bug 786395
zenity --forms crashes with more than one --add-list 's
Last modified: 2021-05-25 17:45:23 UTC
Hi It seems that Zenity (master too) crashes when a form has two lists in gtk_list_store_set_column_types I don't have all symbols installed, but it happens consistantly in my own built Zenity, and Ubuntu's Zenity Easiest way to reproduce it is zenity --forms --add-list=1 --add-list=2 (it crashes with 0, 1, and 2 --list-values= passed) Thanks
Created attachment 358657 [details] [review] Bugfix for lists in form Hi. I explored this bug. When a form has two (and more) lists and not enougth list values, the second (and all following lists) list has not column_types, therefore it crashes. I suggest to set column_types to G_TYPE_STRING by default if values not provided (see patch). Test case: zenity --forms --add-list="foo" --add-list="bar" --add-list="car" --list-values="1|2|3" --add-entry="blank"
This seems to avoid the crash but if I do zenity --forms --add-list=test --list-values="1|2" --add-list=test2 --list-values="1|2" only the first list has the selections in it
Created attachment 359536 [details] [review] Bugfix for lists in form I get it. Column values and list values must count separately. Column values must correspond to list values therefore column number must correspond list number. In line: g_slist_nth_data (forms_data->column_values, list_number); Using there list_number is not valid - it possible that count of columns less than count of lists. In such case, we may use first column for all remaining columns.
Created attachment 359537 [details] Test cases I tested this cases.
This works!
That's still an issue, reported downstream on https://bugs.launchpad.net/zenity/+bug/1802105
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new enhancement request ticket at https://gitlab.gnome.org/GNOME/zenity/-/issues/ Thank you for your understanding and your help.