ltchiptool
ltchiptool copied to clipboard
Segmentation fault on Ubuntu 24
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
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.
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.
I guess I'm a +1 to this... I mean, I think. I just see "Segmentation fault (core dumped)" at various times. No errors logged that I can see. Happens if I click on the Plugins tab. Happens randomly while downloading the flash. Happens when flashing... Basically makes the tool useless since I can't flash anything.
Im having the same issue with 24.04. All basic setup. just installed and I get similar errors like this one:
gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
Basically useless since keeps closing after I try to start dumping a chip for example. So it stays opens, but as soon as I try to do something, it closes.