Skip to content

List widgets are unusable and crashing #180

@ppelikan

Description

@ppelikan

First of all, thank you for this great library!

ListView

When using the ListView widget with big amount of items, it renders the items randomly as shown below, index should go from 0 to 20000.
When scrolling and selecting random items, the app prints a lot of Gtk-CRITICAL errors, and suddenly crashes.

Image

Image

(process:107203): Gtk-CRITICAL **: 19:47:09.427: gtk_widget_set_margin_top: assertion 'GTK_IS_WIDGET (widget)' failed
(process:107203): Gtk-CRITICAL **: 19:47:09.427: gtk_widget_set_margin_bottom: assertion 'GTK_IS_WIDGET (widget)' failed
(process:107203): Gtk-CRITICAL **: 19:47:09.427: gtk_widget_set_margin_start: assertion 'GTK_IS_WIDGET (widget)' failed
(process:107203): Gtk-CRITICAL **: 19:47:09.427: gtk_widget_set_margin_end: assertion 'GTK_IS_WIDGET (widget)' failed
(process:107203): Gtk-CRITICAL **: 19:47:09.427: gtk_widget_set_margin_top: assertion 'GTK_IS_WIDGET (widget)' failed
(process:107203): Gtk-CRITICAL **: 19:47:09.427: gtk_widget_set_margin_bottom: assertion 'GTK_IS_WIDGET (widget)' failed
(process:107203): Gtk-CRITICAL **: 19:47:09.427: gtk_widget_set_margin_start: assertion 'GTK_IS_WIDGET (widget)' failed
(process:107203): Gtk-CRITICAL **: 19:47:09.427: gtk_widget_set_margin_end: assertion 'GTK_IS_WIDGET (widget)' failed

Steps to reproduce:

  1. Build and run the included owl_listview_test.nim example
  2. Scroll the list vigorously, and select random items.
  3. Observe printed errors and see that items changed their order.
  4. Continue stress testing, to see it eventually crash.

ListBox

When I try the same with ListBox, items are being properly shown, but it takes 100% CPU usage (from single core), and the whole app becomes unusable.

Included examples:

owl_list_widgets.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions