Jean28518 / linux-assistant

A daily linux helper with powerful integrated search, routines checks and administrative tasks. The Project is built with flutter and python.
https://www.linux-assistant.org
GNU General Public License v3.0
87 stars 12 forks source link

Speicherzugriffsfehler (segmentation fault) after closing Linux Assistant #111

Closed jjk4 closed 1 year ago

jjk4 commented 1 year ago

When I close the linux assistant, I get the following error message: /usr/bin/linux-assistant: Zeile 6: 94189 Speicherzugriffsfehler (Speicherabzug geschrieben) /usr/lib/linux-assistant/linux_assistant Ubuntu 22.04.1, Linux Assistant 0.1.9

Nati0ns commented 1 year ago

Looks like this is not distro specific, since I get the same error on openSUSE. On Ubuntu this is especially annoying because you get a crash report message from apport everytime this happens. But I think after a few times you can choose to ignore it, so apport will stop notifying you about this error.

For further investigation, here's the output of gdb:

Thread 1 "linux_assistant" received signal SIGSEGV, Segmentation fault.
0x00007ffff6ed0078 in g_type_check_instance_cast (type_instance=0x1, iface_type=16418128) at ../../../gobject/gtype.c:4122

And the stack trace:

#0  0x00007ffff6ed0078 in g_type_check_instance_cast (type_instance=0x1, iface_type=16418128) at ../../../gobject/gtype.c:4122
#1  0x00007ffff7fa6cc3 in on_window_hide(_GtkWidget*, _GdkEvent*, void*) () from /usr/lib/linux-assistant/lib/libwindow_manager_plugin.so
#2  0x00007ffff6eaaf50 in g_closure_invoke (closure=0xfa8d20, return_value=0x0, n_param_values=1, param_values=0x7fffffffda90, invocation_hint=0x7fffffffda10) at ../../../gobject/gclosure.c:832
#3  0x00007ffff6ed8d66 in signal_emit_unlocked_R.isra.0 (node=node@entry=0x4d91a0, detail=detail@entry=0, instance=instance@entry=0x6322a0, emission_return=emission_return@entry=0x0, 
    instance_and_params=instance_and_params@entry=0x7fffffffda90) at ../../../gobject/gsignal.c:3796
#4  0x00007ffff6ec917a in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffdc30) at ../../../gobject/gsignal.c:3549
#5  0x00007ffff6ec9403 in g_signal_emit (instance=instance@entry=0x6322a0, signal_id=<optimized out>, detail=detail@entry=0) at ../../../gobject/gsignal.c:3606
#6  0x00007ffff699c07f in gtk_widget_hide (widget=0x6322a0) at ../../../../gtk/gtkwidget.c:4953
#7  0x00007ffff69a4c07 in gtk_widget_dispose (object=0x6322a0) at ../../../../gtk/gtkwidget.c:12157
#8  0x00007ffff69b457e in gtk_window_dispose (object=0x6322a0) at ../../../../gtk/gtkwindow.c:3168
#9  0x00007ffff67202cf in gtk_application_window_dispose (object=0x6322a0) at ../../../../gtk/gtkapplicationwindow.c:804
#10 0x00007ffff6eb95f0 in g_object_run_dispose (object=0x6322a0) at ../../../gobject/gobject.c:1448
#11 0x00007ffff6850d50 in gtk_main_do_event (event=<optimized out>) at ../../../../gtk/gtkmain.c:1837
#12 gtk_main_do_event (event=<optimized out>) at ../../../../gtk/gtkmain.c:1691
#13 0x00007ffff69a783a in send_delete_event (data=<optimized out>) at ../../../../gtk/gtkwindow.c:1333
#14 0x00007ffff6f2b2ab in gdk_threads_dispatch (data=0x67bc80) at ../../../../gdk/gdk.c:769
#15 0x00007ffff614e43f in g_main_dispatch (context=0x4422a0) at ../../../glib/gmain.c:3444
#16 g_main_context_dispatch (context=0x4422a0) at ../../../glib/gmain.c:4162
#17 0x00007ffff61a33c8 in g_main_context_iterate.constprop.0 (context=0x4422a0, block=<optimized out>, dispatch=1, self=<optimized out>) at ../../../glib/gmain.c:4238
#18 0x00007ffff614bd20 in g_main_context_iteration (context=context@entry=0x4422a0, may_block=may_block@entry=1) at ../../../glib/gmain.c:4303
#19 0x00007ffff631245d in g_application_run (application=0x4400f0, argc=<optimized out>, argv=0x7fffffffe118) at ../../../gio/gapplication.c:2571
#20 0x000000000040246e in main ()
Jean28518 commented 1 year ago

Thanks for reporting. I don't know if it's linux assisstant itself or flutter. If the following versions also have this behavior we need to do more investigation

Nati0ns commented 1 year ago

I think I found the root cause of the problem. See this pull request on the window_manager plugin GitHub page. This matches our error pattern: accessing a wrong memory location in the window_hide event of an gtk widget.

Updating the plugin to a version >= 0.3.0 seems to fix the error for me. Can you reproduce this?