lakinduakash / linux-wifi-hotspot

Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface. It is also able to create a hotspot using the same wifi card which is connected to an AP already ( Similar to Windows 10).
BSD 2-Clause "Simplified" License
3.01k stars 278 forks source link

CRITICAL: invalid cast from 'GtkEntry' to 'GtkTextView' #389

Closed safocl closed 2 months ago

safocl commented 3 months ago

Describe the bug Application run returns

(wihotspot-gui:58435): GLib-GObject-CRITICAL **: 15:03:23.958: invalid cast from 'GtkEntry' to 'GtkTextView'

(wihotspot-gui:58435): Gtk-CRITICAL **: 15:03:23.958: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed

(wihotspot-gui:58435): GLib-GObject-CRITICAL **: 15:03:23.959: invalid (NULL) pointer instance

(wihotspot-gui:58435): GLib-GObject-CRITICAL **: 15:03:23.959: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
/usr/bin/wihotspot: line 4: 58435 Segmentation fault      (core dumped) /usr/bin/wihotspot-gui

To Reproduce Steps to reproduce the behavior:

  1. Run application
  2. See error

Expected behavior Launching the application

Screenshots Screenshot

Desktop (please complete the following information):

Additional context this error occurs because in the ui.c file GtkEntry is cast to GtkTextView: https://github.com/lakinduakash/linux-wifi-hotspot/blob/fe64e7113a8564c78b67f7b32d5e606e1b631c65/src/ui/ui.c#L426 but https://github.com/lakinduakash/linux-wifi-hotspot/blob/fe64e7113a8564c78b67f7b32d5e606e1b631c65/src/ui/glade/wifih.ui#L377 (entry_gateway is a GtkEntry, not GtkTextView)

safocl commented 3 months ago

TextBuffer and EntryBuffer are incompatible.

safocl commented 3 months ago

oh... -- Should tv_mac_filter be this? https://github.com/lakinduakash/linux-wifi-hotspot/blob/fe64e7113a8564c78b67f7b32d5e606e1b631c65/src/ui/glade/wifih.ui#L401 ???

safocl commented 3 months ago

create PR: https://github.com/lakinduakash/linux-wifi-hotspot/pull/391

lakinduakash commented 2 months ago

Merged PR #391 , Thanks