linux-wifi-hotspot icon indicating copy to clipboard operation
linux-wifi-hotspot copied to clipboard

Segmentation fault after the latest update 4.7.1

Open niksingh710 opened this issue 6 months ago • 23 comments

(wihotspot-gui:70910): GLib-GObject-CRITICAL **: 20:52:22.586: invalid cast from 'GtkEntry' to 'GtkTextView'

(wihotspot-gui:70910): Gtk-CRITICAL **: 20:52:22.586: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed

(wihotspot-gui:70910): GLib-GObject-CRITICAL **: 20:52:22.587: invalid (NULL) pointer instance

(wihotspot-gui:70910): GLib-GObject-CRITICAL **: 20:52:22.587: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
/usr/bin/wihotspot: line 4: 70910 Segmentation fault      (core dumped) /usr/bin/wihotspot-gui

getting this on arch linux wayland.

niksingh710 avatar Jan 02 '24 15:01 niksingh710

Is it regular or occurs time to time? Can you build it from source?

lakinduakash avatar Jan 02 '24 16:01 lakinduakash

Is it regular or occurs time to time? Can you build it from source?

yep it is regular. okay will report after testing.

niksingh710 avatar Jan 02 '24 18:01 niksingh710

building from source runs the ui but gives error in terminal saying


(wihotspot-gui:10717): GLib-GObject-CRITICAL **: 23:35:52.236: invalid cast from 'GtkEntry' to 'GtkTextView'

(wihotspot-gui:10717): Gtk-CRITICAL **: 23:35:52.236: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed

(wihotspot-gui:10717): GLib-GObject-CRITICAL **: 23:35:52.237: invalid (NULL) pointer instance

(wihotspot-gui:10717): GLib-GObject-CRITICAL **: 23:35:52.237: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
sh: line 1: iw: command not found

image and the choice for Wifi Interface is blocked.

niksingh710 avatar Jan 02 '24 18:01 niksingh710

Wifi interface is blocked due to iw is not installed. Please check all the dependencies before installation.

lakinduakash avatar Jan 02 '24 18:01 lakinduakash

Wifi interface is blocked due to iw is not installed. Please check all the dependencies before installation.

Having the same crash despite iw being installed edit: only happens when I set the network as "Open" edit2: deleting the config file fixed the issue

awsms avatar Jan 08 '24 07:01 awsms

What's the path of that config file? @awsms

lakinduakash avatar Jan 08 '24 13:01 lakinduakash

What's the path of that config file? @awsms

/etc/create_ap.conf I think.

Thread 1 "wihotspot-gui" received signal SIGSEGV, Segmentation fault.
__strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:283
283             VMOVU   (%rdi), %ymm0                                                  
(gdb) bt
#0  __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:283
#1  0x0000555555558fba in init_ui_from_config () at ui/ui.c:562
#2  0x0000555555558c6c in initUi (argc=1, argv=0x7fffffffe2c8) at ui/ui.c:492
#3  0x0000555555557929 in main (argc=1, argv=0x7fffffffe2c8) at ui/main.c:34
(gdb) f 1
#1  0x0000555555558fba in init_ui_from_config () at ui/ui.c:562
562             if(strcmp(values->ieee80211ax,"1")==0){

Archlinux's package manager(pacman) does not automatically merge configuration files, and newer code will get null pointer errors when reading configuration options that don't exist in older versions.

--- /etc/create_ap.conf 2023-12-31 19:42:36.221605149 +0800
+++ /etc/create_ap.conf.pacnew  2024-01-15 16:13:55.000000000 +0800
@@ -11,7 +11,8 @@
 ISOLATE_CLIENTS=0
 SHARE_METHOD=nat
 IEEE80211N=0
-IEEE80211AC=1
+IEEE80211AC=0
+IEEE80211AX=0
 HT_CAPAB=[HT40+]
 VHT_CAPAB=
 DRIVER=nl80211
@@ -20,12 +21,9 @@
 FREQ_BAND=2.4
 NEW_MACADDR=
 DAEMONIZE=0
-DAEMON_PIDFILE=
-DAEMON_LOGFILE=/dev/null
-NO_HAVEGED=1
+NO_HAVEGED=0
 WIFI_IFACE=wlan0
-INTERNET_IFACE=wlan0
-SSID=WifiShare
+INTERNET_IFACE=eth0
+SSID=MyAccessPoint
 PASSPHRASE=12345678
 USE_PSK=0
-ADDN_HOSTS=

bbaa-bbaa avatar Jan 15 '24 08:01 bbaa-bbaa

same issue

  • iw installed.
  • before upgrade, everything is OK, config file not changed

asmoker avatar Jan 23 '24 08:01 asmoker

Is it regular or occurs time to time? Can you build it from source?

This is also segfaulting for me on arch linux under wayland. If I build either the master or lakinduakash-patch-3 branches from source I get the segfault, but when I build lakinduakash-patch-2 from source I get the GUI.

morgan-greywolf avatar Jan 23 '24 19:01 morgan-greywolf

As a temporary solution delete /etc/create_ap.conf and re-install the package

On Wed, 24 Jan 2024 at 01:16, Rob Shinn @.***> wrote:

Is it regular or occurs time to time? Can you build it from source?

This is also segfaulting for me arch linux under wayland. If I build either the master or lakinduakash-patch-3 branches from source I get the segfault, but when I build lakinduakash-patch-2 from source I get the GUI.

— Reply to this email directly, view it on GitHub https://github.com/lakinduakash/linux-wifi-hotspot/issues/371#issuecomment-1906809422, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADA2EXMSLJY4LJL7RUTO3W3YQAHRLAVCNFSM6AAAAABBKF5ZLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWHAYDSNBSGI . You are receiving this because you modified the open/close state.Message ID: @.***>

lakinduakash avatar Jan 23 '24 20:01 lakinduakash

That worked. Thanks.

morgan-greywolf avatar Jan 23 '24 20:01 morgan-greywolf

Had the same issue on the AUR package and deleting /etc/create_ap.conf solved it. Wasnt expecting to have to delete /etc files to fix an issue though...

max-ishere avatar Feb 25 '24 17:02 max-ishere

It still broken without rm /etc/create_ap.conf.

$ wihotspot

(wihotspot-gui:20346): GLib-GObject-WARNING **: 05:10:07.104: invalid cast from 'GtkEntry' to 'GtkTextView'

(wihotspot-gui:20346): Gtk-CRITICAL **: 05:10:07.104: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed

(wihotspot-gui:20346): GLib-GObject-WARNING **: 05:10:07.104: invalid (NULL) pointer instance

(wihotspot-gui:20346): GLib-GObject-CRITICAL **: 05:10:07.104: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
/usr/bin/wihotspot: line 4: 20346 Segmentation fault      (core dumped) /usr/bin/wihotspot-gui

Flashwalker avatar Feb 28 '24 22:02 Flashwalker

Arch linux package is managed by @yochananmarqos Please check this - @yochananmarqos

lakinduakash avatar Mar 08 '24 23:03 lakinduakash

@lakinduakash I just read the whole thread, this is obviously not a packaging issue. I cannot reproduce the issue, therefore I cannot help.

yochananmarqos avatar Mar 09 '24 01:03 yochananmarqos

From @bbaa-bbaa It seems like that issue is from the Arch Linux package manager which does not update the file. Relevant command from the Makefile is install -CDm644 create_ap.conf $(DESTDIR)/etc/create_ap.conf that seems fine. The C flag should update the file if it is different from the current target.

lakinduakash avatar Mar 09 '24 21:03 lakinduakash

It still broken without rm /etc/create_ap.conf.

$ wihotspot

(wihotspot-gui:20346): GLib-GObject-WARNING **: 05:10:07.104: invalid cast from 'GtkEntry' to 'GtkTextView'

(wihotspot-gui:20346): Gtk-CRITICAL **: 05:10:07.104: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed

(wihotspot-gui:20346): GLib-GObject-WARNING **: 05:10:07.104: invalid (NULL) pointer instance

(wihotspot-gui:20346): GLib-GObject-CRITICAL **: 05:10:07.104: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
/usr/bin/wihotspot: line 4: 20346 Segmentation fault      (core dumped) /usr/bin/wihotspot-gui

What is your distro?

lakinduakash avatar Mar 09 '24 21:03 lakinduakash

@lakinduakash

It seems like that issue is from the Arch Linux package manager which does not update the file.

Yes, it does. However, since it's a user configurable file, it is backed up and a pacnew is created if it's modified.

yochananmarqos avatar Mar 09 '24 22:03 yochananmarqos

Thanks for the explanation @yochananmarqos . To fix this I think we need to create a conf file at runtime and use the original conf file as a template. Right now all the user configurations are saved in the same configuration file.

lakinduakash avatar Mar 09 '24 22:03 lakinduakash

@awsms

Having the same crash despite iw being installed

No, you're not. Just because it segfauted doesn't mean it's the same crash. You've hijacked this closed issue and now we're even on to a different subject. This is quite a mess.

yochananmarqos avatar Mar 09 '24 22:03 yochananmarqos

#1  0x0000555555558fba in init_ui_from_config () at ui/ui.c:562
562             if(strcmp(values->ieee80211ax,"1")==0){

Maybe we should check for null pointers. I think if(values->ieee80211ax&&strcmp(values->ieee80211ax,"1") is enough

bbaa-bbaa avatar Mar 11 '24 00:03 bbaa-bbaa

What is your distro?

Pop!_OS 22.04

Flashwalker avatar Mar 11 '24 11:03 Flashwalker

#1  0x0000555555558fba in init_ui_from_config () at ui/ui.c:562
562             if(strcmp(values->ieee80211ax,"1")==0){

Maybe we should check for null pointers. I think if(values->ieee80211ax&&strcmp(values->ieee80211ax,"1") is enough

Yup, simply adding IEEE80211AX to my original conf fixes this issue.

exalented avatar Apr 12 '24 20:04 exalented