libretiny-eu / ltchiptool

Universal, easy-to-use GUI flashing/dumping tool for BK7231, RTL8710B and RTL8720C.
MIT License
89 stars 4 forks source link

Segmentation fault on Ubuntu 24 #43

Open andreas-bulling opened 1 day ago

andreas-bulling commented 1 day ago

I installed ltchiptool as described in the docs. I also pip installed upk2esphome and zeroconf, all good.

Upon running ltchiptool/bin/ltchiptool gui and clicking on UPK2ESPHome, however, sometimes the app crashes right away with a segmentation fault. Or latest when I click on "Grab from ESPHome Kickstart".

The error I see on the console is


(ltchiptool:2659377): Gtk-CRITICAL **: 12:12:02.960: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(ltchiptool:2659377): Gtk-CRITICAL **: 12:12:04.972: gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed

(ltchiptool:2659377): Gtk-CRITICAL **: 12:12:04.972: gtk_label_get_angle: assertion 'GTK_IS_LABEL (label)' failed

(ltchiptool:2659377): Gtk-CRITICAL **: 12:12:04.972: gtk_widget_create_pango_layout: assertion 'GTK_IS_WIDGET (widget)' failed

(ltchiptool:2659377): Pango-CRITICAL **: 12:12:04.972: pango_layout_set_alignment: assertion 'layout != NULL' failed

(ltchiptool:2659377): Pango-CRITICAL **: 12:12:04.972: pango_layout_set_ellipsize: assertion 'PANGO_IS_LAYOUT (layout)' failed

(ltchiptool:2659377): Pango-CRITICAL **: 12:12:04.972: pango_layout_set_wrap: assertion 'PANGO_IS_LAYOUT (layout)' failed

(ltchiptool:2659377): Pango-CRITICAL **: 12:12:04.972: pango_layout_set_single_paragraph_mode: assertion 'PANGO_IS_LAYOUT (layout)' failed
**
Gtk:ERROR:../../../gtk/gtklabel.c:3397:gtk_label_update_layout_width: assertion failed: (priv->layout)
Bail out! Gtk:ERROR:../../../gtk/gtklabel.c:3397:gtk_label_update_layout_width: assertion failed: (priv->layout)
[1]    2659377 IOT instruction (core dumped)  ltchiptool/bin/ltchiptool gui

Version 4.11.2 wxpython 4.2.2

Cossid commented 1 day ago

I think there is currently some sort of threading bug, and if you have a lot of ESPHome devices on your network, it takes some time for the list of all devices to process, and if you try to do anything while that list is populated, it will hit that threading bug. Try to wait for the list to stop expanding or number of devices to stop increasing before taking action.

andreas-bulling commented 1 day ago

I tried that and, indeed, the crash happened way later. But it still happened as I wanted to type in the IP address of a ESPHome Kickstart Device.

On the second try it crashed, despite a long waiting time, when I clicked on the Kickstart button.