Skip to content

phoc.ini: 2x scaling for builtin hwc display#1

Merged
g7 merged 1 commit into
droidian:bullseyefrom
Danct12:hwcomposer-scale
Oct 28, 2020
Merged

phoc.ini: 2x scaling for builtin hwc display#1
g7 merged 1 commit into
droidian:bullseyefrom
Danct12:hwcomposer-scale

Conversation

@Danct12
Copy link
Copy Markdown

@Danct12 Danct12 commented Oct 28, 2020

No description provided.

Signed-off-by: Danct12 <danct12@disroot.org>
@erfanoabdi
Copy link
Copy Markdown
Member

+2 LGTM

@g7
Copy link
Copy Markdown
Member

g7 commented Oct 28, 2020

LGTM, merging.

Thanks!

@g7 g7 merged commit da54b8b into droidian:bullseye Oct 28, 2020
g7 pushed a commit that referenced this pull request Sep 10, 2021
This fixes the overview test crash since pango needs at least
one font:

  #0  0x00007ffff71aafa9 in pango_shape_with_flags
      (item_text=0x7ffff5f9b530 "●", item_length=<optimized out>, paragraph_text=<optimized out>, paragraph_length=<optimized out>, analysis=analysis@entry=0x7ffff6053950, glyphs=glyphs@entry=0x7ffff5f3e060, flags=PANGO_SHAPE_ROUND_POSITIONS) at ../pango/shape.c:323
  #1  0x00007ffff719fce6 in shape_run (line=line@entry=0x7ffff5f600a0, state=state@entry=0x7fffffffd808, item=item@entry=0x7ffff6053940) at ../pango/pango-layout.c:3427
  #2  0x00007ffff71a01a5 in process_item (layout=layout@entry=0x7ffff5cea000 [PangoLayout], line=line@entry=0x7ffff5f600a0, state=state@entry=0x7fffffffd808, force_fit=force_fit@entry=1, no_break_at_end=no_break_at_end@entry=0) at ../pango/pango-layout.c:3714
  #3  0x00007ffff71a23b1 in process_line (state=0x7fffffffd808, layout=0x7ffff5cea000 [PangoLayout]) at ../pango/pango-layout.c:4032
  #4  pango_layout_check_lines (layout=0x7ffff5cea000 [PangoLayout]) at ../pango/pango-layout.c:4412
  #5  pango_layout_check_lines (layout=0x7ffff5cea000 [PangoLayout]) at ../pango/pango-layout.c:4265
  #6  0x00007ffff71a3072 in pango_layout_get_unknown_glyphs_count (layout=layout@entry=0x7ffff5cea000 [PangoLayout]) at ../pango/pango-layout.c:1329
  #7  0x00007ffff794810c in find_invisible_char (widget=0x7ffff5f8c6d0 [GtkEntry]) at ../gtk/gtkentry.c:2763
  #8  0x00007ffff7948182 in gtk_entry_update_cached_style_values (entry=0x7ffff5f8c6d0 [GtkEntry]) at ../gtk/gtkentry.c:5291
  #9  0x00007ffff7948317 in gtk_entry_init (entry=0x7ffff5f8c6d0 [GtkEntry]) at ../gtk/gtkentry.c:2822
  #10 0x00007ffff7464df0 in g_type_create_instance (type=<optimized out>) at ../gobject/gtype.c:1915
  #11 0x00007ffff7453bd9 in g_object_new_internal (class=0x7ffff5f0fb10, params=0x0, n_params=0) at ../gobject/gobject.c:1939
  #12 0x00007ffff745498a in g_object_newv (object_type=0x7ffff5fff0a0 [GtkSearchEntry/GtkEntry/GtkWidget/GInitiallyUnowned], n_parameters=0, parameters=<optimized out>) at ../gobject/gobject.c:2178
  #13 0x00007ffff78d3ecb in _gtk_builder_construct (builder=0x7ffff5ffc330 [GtkBuilder], info=info@entry=0x7ffff60a41e0, error=error@entry=0x7fffffffdd00) at ../gtk/gtkbuilder.c:733
  #14 0x00007ffff78d6162 in parse_custom (error=0x7fffffffdd00, data=0x7ffff609b360, values=0x7fffffffdcb0, names=0x7fffffffdcc0, element_name=0x7ffff5f41610 "style", context=0x7ffff5ff6850) at ../gtk/gtkbuilderparser.c:878
  #15 start_element (context=0x7ffff5ff6850, element_name=0x7ffff5f41610 "style", names=0x7fffffffdcc0, values=0x7fffffffdcb0, user_data=0x7ffff609b360, error=0x7fffffffdd00) at ../gtk/gtkbuilderparser.c:985
  #16 0x00007ffff7378660 in emit_start_element (context=context@entry=0x7ffff5ff6850, error=error@entry=0x7fffffffde30) at ../glib/gmarkup.c:1064
  #17 0x00007ffff737945b in g_markup_parse_context_parse
      (context=0x7ffff5ff6850, text=text@entry=0x5555555df248 <phosh_resource_data+126160> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.22.1 -->\n<interface><requires lib=\"gtk+\" version=\"3.20\"/><template class=\"PhoshAppGrid\" parent=\"GtkBox\"><property name=\"visible\">True"..., text_len=<optimized out>, text_len@entry=5559, error=error@entry=0x7fffffffde30) at ../glib/gmarkup.c:1423
  #18 0x00007ffff78d6b6b in _gtk_builder_parser_parse_buffer
      (builder=0x7ffff5ffc330 [GtkBuilder], filename=0x7ffff7bbc838 "<input>", buffer=0x5555555df248 <phosh_resource_data+126160> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.22.1 -->\n<interface><requires lib=\"gtk+\" version=\"3.20\"/><template class=\"PhoshAppGrid\" parent=\"GtkBox\"><property name=\"visible\">True"..., length=5559, requested_objs=<optimized out>, error=0x7fffffffde30) at ../gtk/gtkbuilderparser.c:1262
  #19 0x00007ffff78d2576 in gtk_builder_extend_with_template
      (builder=builder@entry=0x7ffff5ffc330 [GtkBuilder], widget=widget@entry=0x7ffff5dc1260 [PhoshAppGrid], template_type=template_type@entry=0x7ffff5f540a0 [PhoshAppGrid/GtkBox/GtkContainer/GtkWidget/GInitiallyUnowned], buffer=0x5555555df248 <phosh_resource_data+126160> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.22.1 -->\n<interface><requires lib=\"gtk+\" version=\"3.20\"/><template class=\"PhoshAppGrid\" parent=\"GtkBox\"><property name=\"visible\">True"..., length=length@entry=5559, error=error@entry=0x7fffffffdea0)
      at ../gtk/gtkbuilder.c:1194
  #20 0x00007ffff7b06c69 in gtk_widget_init_template (widget=0x7ffff5dc1260 [PhoshAppGrid]) at ../gtk/gtkwidget.c:17024
  #21 0x00005555555ad4f6 in phosh_app_grid_init (self=0x7ffff5dc1260 [PhoshAppGrid]) at ../src/app-grid.c:322
  #22 0x00007ffff7464e0f in g_type_create_instance (type=<optimized out>) at ../gobject/gtype.c:1921
  #23 0x00007ffff7453bd9 in g_object_new_internal (class=0x7ffff5f0ede0, params=0x0, n_params=0) at ../gobject/gobject.c:1939
  #24 0x00007ffff745498a in g_object_newv (object_type=0x7ffff5f540a0 [PhoshAppGrid/GtkBox/GtkContainer/GtkWidget/GInitiallyUnowned], n_parameters=0, parameters=<optimized out>) at ../gobject/gobject.c:2178
  #25 0x00007ffff78d3ecb in _gtk_builder_construct (builder=0x7ffff60a8a90 [GtkBuilder], info=info@entry=0x7ffff60a4120, error=error@entry=0x7fffffffe1f0) at ../gtk/gtkbuilder.c:733
  #26 0x00007ffff78d507a in builder_construct (error=0x7fffffffe1f0, object_info=0x7ffff60a4120, data=0x7ffff5f59260) at ../gtk/gtkbuilderparser.c:139
  #27 builder_construct (data=0x7ffff5f59260, object_info=0x7ffff60a4120, error=0x7fffffffe1f0) at ../gtk/gtkbuilderparser.c:124
  #28 0x00007ffff78d67fa in end_element (context=<optimized out>, element_name=<optimized out>, user_data=0x7ffff5f59260, error=0x7fffffffe1f0) at ../gtk/gtkbuilderparser.c:1075
  #29 0x00007ffff73787be in emit_end_element (context=context@entry=0x7ffff5ff6610, error=error@entry=0x7fffffffe300) at ../glib/gmarkup.c:1099
  #30 0x00007ffff73791f0 in g_markup_parse_context_parse
      (context=0x7ffff5ff6610, text=text@entry=0x5555555dc970 <phosh_resource_data+115704> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.22.1 -->\n<interface><requires lib=\"gtk+\" version=\"3.20\"/><template class=\"PhoshOverview\" parent=\"GtkBox\"><property name=\"visible\">Tru"..., text_len=<optimized out>, text_len@entry=1375, error=error@entry=0x7fffffffe300) at ../glib/gmarkup.c:1657
  #31 0x00007ffff78d6b6b in _gtk_builder_parser_parse_buffer
      (builder=0x7ffff60a8a90 [GtkBuilder], filename=0x7ffff7bbc838 "<input>", buffer=0x5555555dc970 <phosh_resource_data+115704> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.22.1 -->\n<interface><requires lib=\"gtk+\" version=\"3.20\"/><template class=\"PhoshOverview\" parent=\"GtkBox\"><property name=\"visible\">Tru"..., length=1375, requested_objs=<optimized out>, error=0x7fffffffe300) at ../gtk/gtkbuilderparser.c:1262
  #32 0x00007ffff78d2576 in gtk_builder_extend_with_template
      (builder=builder@entry=0x7ffff60a8a90 [GtkBuilder], widget=widget@entry=0x7ffff60641a0 [PhoshOverview], template_type=template_type@entry=0x7ffff608a770 [PhoshOverview/GtkBox/GtkContainer/GtkWidget/GInitiallyUnowned], buffer=0x5555555dc970 <phosh_resource_data+115704> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.22.1 -->\n<interface><requires lib=\"gtk+\" version=\"3.20\"/><template class=\"PhoshOverview\" parent=\"GtkBox\"><property name=\"visible\">Tru"..., length=length@entry=1375, error=error@entry=0x7fffffffe370)
      at ../gtk/gtkbuilder.c:1194
  #33 0x00007ffff7b06c69 in gtk_widget_init_template (widget=0x7ffff60641a0 [PhoshOverview]) at ../gtk/gtkwidget.c:17024
  #34 0x00007ffff7464e0f in g_type_create_instance (type=<optimized out>) at ../gobject/gtype.c:1921
  #35 0x00007ffff7453bd9 in g_object_new_internal (class=0x7ffff60cf490, params=params@entry=0x0, n_params=n_params@entry=0) at ../gobject/gobject.c:1939
  #36 0x00007ffff745480e in g_object_new_with_properties (object_type=0x7ffff608a770 [PhoshOverview/GtkBox/GtkContainer/GtkWidget/GInitiallyUnowned], n_properties=n_properties@entry=0, names=names@entry=0x0, values=values@entry=0x0) at ../gobject/gobject.c:2108
  #37 0x00007ffff7454e5d in g_object_new (object_type=<optimized out>, first_property_name=first_property_name@entry=0x0) at ../gobject/gobject.c:1779
  #38 0x00005555555a9b39 in phosh_overview_new () at ../src/overview.c:494
  #39 0x00005555555a8559 in test_phosh_overview_new () at ../tests/test-overview.c:16
  #40 0x00007ffff7392355 in test_case_run (tc=0x7ffff6056980) at ../glib/gtestutils.c:2777
  #41 g_test_run_suite_internal (suite=suite@entry=0x7ffff5f3a4a0, path=0x0) at ../glib/gtestutils.c:2865
  #42 0x00007ffff7392568 in g_test_run_suite_internal (suite=suite@entry=0x7ffff5f3a480, path=0x0) at ../glib/gtestutils.c:2882
  #43 0x00007ffff7392568 in g_test_run_suite_internal (suite=suite@entry=0x7ffff5f3a440, path=path@entry=0x0) at ../glib/gtestutils.c:2882
  #44 0x00007ffff739265b in g_test_run_suite (suite=0x7ffff5f3a440) at ../glib/gtestutils.c:2959
  #45 0x00007ffff739268b in g_test_run () at ../glib/gtestutils.c:2170
  #46 0x000055555556aa4a in main (argc=<optimized out>, argv=<optimized out>) at ../tests/test-overview.c:30

See https://gitlab.gnome.org/GNOME/pango/-/issues/588

Thanks to InsanePrawn for the backtrace

Signed-off-by: Guido Günther <guido.gunther@puri.sm>
g7 pushed a commit that referenced this pull request Feb 27, 2022
The wl_display_roundtrip in on_phosh_layer_surface_mapped triggers this
leak:

Depending on the build it show up as:

Direct leak of 160 byte(s) in 2 object(s) allocated from:
    #0 0x7f07d65fb987 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0x7f07d5486d0c in wl_display_read_events (/usr/lib/x86_64-linux-gnu/libwayland-client.so.0+0x6d0c)
    #2 0x7f07d54872b8 in wl_display_dispatch_queue (/usr/lib/x86_64-linux-gnu/libwayland-client.so.0+0x72b8)
    #3 0x7f07d548751e in wl_display_roundtrip_queue (/usr/lib/x86_64-linux-gnu/libwayland-client.so.0+0x751e)
    #4 0x55c439e736e5 in on_phosh_layer_surface_mapped ../src/layersurface.c:318
    #5 0x7f07d58486de in g_closure_invoke (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x146de)
    #6 0x7f07d585ab35  (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x26b35)
    #7 0x7f07d5860f50 in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x2cf50)
    #8 0x7f07d58614fe in g_signal_emit (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x2d4fe)
    #9 0x7f07d60c5adf in gtk_widget_map (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x3a5adf)
    #10 0x7f07d60d2bd1  (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x3b2bd1)
    #11 0x7f07d5848908  (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x14908)
    #12 0x7f07d58612d8 in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x2d2d8)
    #13 0x7f07d58614fe in g_signal_emit (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x2d4fe)
    #14 0x7f07d60bf415 in gtk_widget_show (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x39f415)
    #15 0x55c439e66329 in test_background_new ../tests/test-background.c:67
    #16 0x7f07d577c905  (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x7c905)
    #17 0x7f07d577c62a  (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x7c62a)
    #18 0x7f07d577c62a  (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x7c62a)
    #19 0x7f07d577cdd9 in g_test_run_suite (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x7cdd9)
    #20 0x7f07d577cdfc in g_test_run (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x7cdfc)
    #21 0x55c439e664a6 in main ../tests/test-background.c:80
    #22 0x7f07d52c1e49 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27e49)
    #23 0x55c439dc65a9 in _start (/builds/guidog/phosh/_build-asan/tests/test-background+0x5e5a9)

or:

Direct leak of 160 byte(s) in 2 object(s) allocated from:
    #0 0x7fba41182987 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0x7fba4036ed0c in zalloc ../src/wayland-private.h:232
    #2 0x7fba4036ed0c in wl_proxy_create_for_id ../src/wayland-client.c:477
    #3 0x7fba4036ed0c in create_proxies ../src/wayland-client.c:1311
    #4 0x7fba4036ed0c in queue_event ../src/wayland-client.c:1395
    #5 0x7fba4036ed0c in read_events ../src/wayland-client.c:1491
    #6 0x7fba4036ed0c in wl_display_read_events ../src/wayland-client.c:1574
    #7 0x7fba4036f2b8 in wl_display_dispatch_queue ../src/wayland-client.c:1813
    #8 0x7fba4036f2b8 in wl_display_dispatch_queue ../src/wayland-client.c:1781
    #9 0x7fba4036f51e in wl_display_roundtrip_queue ../src/wayland-client.c:1258
    #10 0x7fba405736de in g_closure_invoke ../../../gobject/gclosure.c:830
    #11 0x7fba40585cb5 in signal_emit_unlocked_R ../../../gobject/gsignal.c:3740
    #12 0x7fba4058c0d0 in g_signal_emit_valist ../../../gobject/gsignal.c:3495
    #13 0x7fba4058c67e in g_signal_emit ../../../gobject/gsignal.c:3551
    #14 0x7fba40c4cb0f in gtk_widget_map ../../../../gtk/gtkwidget.c:5051
    #15 0x7fba40c59c01 in gtk_window_show ../../../../gtk/gtkwindow.c:6186
    #16 0x7fba40573908 in _g_closure_invoke_va ../../../gobject/gclosure.c:893
    #17 0x7fba4058c458 in g_signal_emit_valist ../../../gobject/gsignal.c:3405
    #18 0x7fba4058c67e in g_signal_emit ../../../gobject/gsignal.c:3551
    #19 0x7fba40c46445 in gtk_widget_show ../../../../gtk/gtkwidget.c:4852
    #20 0x55ea825423ec in test_end_session_dialog_timeout ../tests/test-end-session-dialog.c:93
    #21 0x7fba404a5a25 in test_case_run ../../../glib/gtestutils.c:2900
    #22 0x7fba404a5a25 in g_test_run_suite_internal ../../../glib/gtestutils.c:2988
    #23 0x7fba404a574a in g_test_run_suite_internal ../../../glib/gtestutils.c:3005
    #24 0x7fba404a574a in g_test_run_suite_internal ../../../glib/gtestutils.c:3005
    #25 0x7fba404a5ef9 in g_test_run_suite ../../../glib/gtestutils.c:3082
    #26 0x7fba404a5f1c in g_test_run ../../../glib/gtestutils.c:2200
    #27 0x55ea8248165e in main ../tests/test-end-session-dialog.c:113
    #28 0x7fba3f8367ec in __libc_start_main ../csu/libc-start.c:332
    #29 0x55ea82481869 in _start (/var/scratch/librem5/phosh/_build-asan/tests/test-end-session-dialog+0x153869)

A lot happens there since we're still during startup and one of the
things is that the compositor sends us heads and modes although we don't
have a listener registered which triggers proxy creation on the client
side:

wl_display_roundtrip start:
[  34984.669]  -> wl_display@1.sync(new id wl_callback@43)
[  34984.734] wl_registry@19.bind(2, "wl_shm", 1, new id [unknown]@27)
[  34984.751]  -> wl_shm@27.format(0)
[  34984.755]  -> wl_shm@27.format(1)
[  34984.758]  -> wl_shm@27.format(875709016)
[  34984.761]  -> wl_shm@27.format(875708993)
[  34984.764] wl_registry@19.bind(7, "zxdg_output_manager_v1", 2, new id [unknown]@28)
[  34984.774] wl_registry@19.bind(8, "xdg_wm_base", 1, new id [unknown]@29)
[  34984.785] wl_registry@19.bind(9, "zwlr_layer_shell_v1", 1, new id [unknown]@30)
[  34984.797] wl_registry@19.bind(11, "zwlr_gamma_control_manager_v1", 1, new id [unknown]@31)
[  34984.806] wl_registry@19.bind(14, "org_kde_kwin_idle", 1, new id [unknown]@32)
[  34984.815] wl_registry@19.bind(16, "zwlr_input_inhibit_manager_v1", 1, new id [unknown]@33)
[  34984.824] wl_registry@19.bind(20, "phosh_private", 6, new id [unknown]@34)
[  34984.837] wl_registry@19.bind(21, "zwp_virtual_keyboard_manager_v1", 1, new id [unknown]@35)
[  34984.847] wl_registry@19.bind(23, "zwlr_screencopy_manager_v1", 2, new id [unknown]@36)
[  34984.856] wl_registry@19.bind(32, "zwlr_foreign_toplevel_manager_v1", 2, new id [unknown]@37)
[  34984.865] wl_registry@19.bind(35, "zwlr_output_manager_v1", 2, new id [unknown]@38)
[  34984.875]  -> zwlr_output_manager_v1@38.head(new id zwlr_output_head_v1@4278190080)
                  ^^^^^^^
[  34984.879]  -> zwlr_output_head_v1@4278190080.name("HEADLESS-1")
[  34984.882]  -> zwlr_output_head_v1@4278190080.description("Headless output 1")
[  34984.886]  -> zwlr_output_head_v1@4278190080.make("headless")
[  34984.889]  -> zwlr_output_head_v1@4278190080.model("headless")
[  34984.892]  -> zwlr_output_head_v1@4278190080.mode(new id zwlr_output_mode_v1@4278190081)
                  ^^^^^^^
[  34984.896]  -> zwlr_output_head_v1@4278190080.enabled(1)
[  34984.900]  -> zwlr_output_mode_v1@4278190081.size(720, 1440)
[  34984.905]  -> zwlr_output_mode_v1@4278190081.refresh(60000)
[  34984.908]  -> zwlr_output_head_v1@4278190080.current_mode(zwlr_output_mode_v1@4278190081)
[  34984.911]  -> zwlr_output_head_v1@4278190080.position(0, 0)
[  34984.915]  -> zwlr_output_head_v1@4278190080.transform(0)
[  34984.917]  -> zwlr_output_head_v1@4278190080.scale(2.00000000)
[  34984.920]  -> zwlr_output_manager_v1@38.done(2)
[  34984.923] wl_registry@19.bind(36, "zwlr_output_power_manager_v1", 1, new id [unknown]@39)
[  34984.931] wl_registry@19.bind(38, "wl_output", 2, new id [unknown]@40)
[  34984.939]  -> wl_output@40.geometry(0, 0, 0, 0, 0, "headless", "headless", 0)
[  34984.951]  -> wl_output@40.mode(1, 720, 1440, 60000)
[  34984.957]  -> wl_output@40.scale(2)
[  34984.960]  -> wl_output@40.done()
[  34984.962] wl_registry@19.bind(39, "wl_seat", 1, new id [unknown]@41)
[  34984.970]  -> wl_seat@41.capabilities(0)
[  34984.973] wl_compositor@6.create_surface(new id wl_surface@9)
[  34984.980] zwlr_layer_shell_v1@30.get_layer_surface(new id zwlr_layer_surface_v1@42, wl_surface@9, nil, 0, "phosh background")
[  34984.992] zwlr_layer_surface_v1@42.set_exclusive_zone(-1)
[  34984.995] zwlr_layer_surface_v1@42.set_size(0, 0)
[  34984.999] zwlr_layer_surface_v1@42.set_anchor(15)
[  34985.002] zwlr_layer_surface_v1@42.set_margin(0, 0, 0, 0)
[  34985.009] zwlr_layer_surface_v1@42.set_keyboard_interactivity(0)
[  34985.011] wl_surface@9.commit()
[  34985.029]  -> zwlr_layer_surface_v1@42.configure(3, 360, 720)
[  34985.037] wl_display@1.sync(new id wl_callback@43)
[  34985.040]  -> wl_callback@43.done(3)
[  34985.043]  -> wl_display@1.delete_id(43)
[  34985.314] wl_display@1.delete_id(43)
[  34985.491] wl_seat@41.capabilities(0)
[  34985.505] zwlr_layer_surface_v1@42.configure(3, 360, 720)
[  34985.532]  -> zwlr_layer_surface_v1@42.ack_configure(3)
[  34986.341] wl_callback@43.done(3)
wl_display_roundtrip end

To work around this catch these and dispose on shutdown.

Signed-off-by: Guido Günther <guido.gunther@puri.sm>
Part-of: <https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/1003>
g7 pushed a commit that referenced this pull request Mar 8, 2024
We take a reference the wifi device as we otherwise race
with nmclient on shutdown.

This fixes the CI tests that otherwise occasionally hit

  (phosh:674055): GLib-GObject-CRITICAL **: 15:42:34.735: instance with invalid (NULL) class pointer

on shutdown with this batcktrace:

 #0  g_type_check_instance (type_instance=type_instance@entry=0x7f60a86aea90) at ../../../gobject/gtype.c:4290
 #1  0x00007f60b1a6fa08 in g_signal_handlers_disconnect_matched
     (instance=0x7f60a86aea90, mask=mask@entry=G_SIGNAL_MATCH_DATA, signal_id=signal_id@entry=0, detail=detail@entry=0, closure=closure@entry=0x0, func=func@entry=0x0, data=0x7f60a81d8d60)
     at ../../../gobject/gsignal.c:3085
 #2  0x000055dbbbf3b320 in cleanup_wifi_device (self=0x7f60a81d8d60 [PhoshWifiManager]) at ../src/wifimanager.c:634
 #3  cleanup_wifi_device (self=0x7f60a81d8d60 [PhoshWifiManager]) at ../src/wifimanager.c:628
 #4  phosh_wifi_manager_dispose (object=0x7f60a81d8d60 [PhoshWifiManager]) at ../src/wifimanager.c:752
 #5  0x00007f60b1a5a9c0 in g_object_unref (_object=0x7f60a81d8d60) at ../../../gobject/gobject.c:3894
 #6  g_object_unref (_object=0x7f60a81d8d60) at ../../../gobject/gobject.c:3805
 #7  0x000055dbbbf329ce in phosh_shell_dispose (object=0x7f60a80a92c0 [PhoshShell]) at ../src/shell.c:545
 #8  0x00007f60b1a5a9c0 in g_object_unref (_object=0x7f60a80a92c0) at ../../../gobject/gobject.c:3894
 #9  g_object_unref (_object=0x7f60a80a92c0) at ../../../gobject/gobject.c:3805
 #10 0x000055dbbbf2afb4 in g_assert_finalize_object (object=0x7f60a80a92c0 [PhoshShell]) at /usr/include/glib-2.0/gobject/gobject.h:821
 #11 phosh_test_full_shell_thread (data=0x55dbbd233cc0) at ../tests/testlib-full-shell.c:85
 #12 0x00007f60b1980a41 in g_thread_proxy (data=0x55dbbd22fc50) at ../../../glib/gthread.c:831
 #13 0x00007f60b12163ec in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:444
 #14 0x00007f60b1296a5c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Closes: https://gitlab.gnome.org/World/Phosh/phosh/-/issues/1025
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/1364>
g7 pushed a commit that referenced this pull request Sep 22, 2024
The WifiManager outlives the quick setting (which might get added /
removed at runtime when enabling disabling quick settings) we hence need
to make sure we disconnect the signal when the quick setting goes away.
Do so by using `g_signal_connect_object`.

This fixes that looks like

  #0  0x00005652da08fc4f in PHOSH_IS_STATUS_ICON (ptr=0x21) at ../src/status-icon.h:15
  #1  phosh_status_icon_set_info (self=0x21, info=0x7f5429c09061 "Hotspot Off") at ../src/status-icon.c:377
  #2  0x00007f5429c0851f in update_info (self=0x565300804880) at ../plugins/wifi-hotspot-quick-setting/wifi-hotspot-quick-setting.c:80
  #7  0x00007f542c0fffc3 in <emit signal 'notify:state' on instance 0x5652fd787d90 [PhoshWifiManager]>

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/1509>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants