NixOS/nixpkgs

multiple windows of nemo closing together, turns out to be crashed

Closed this issue · 20 comments

Describe the bug

Several windows of nemo closing together when sending killactive (note that this is not real kill) and a coredump can be found in systemd journal.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Open several instances of nemo from a wlroots based compositor e.g. sway or hyprland.
  2. Press hotkeys attached to killactive on one window.
  3. Get systemd-coredump message from journal (I use gnome-logs for convenience).

Expected behavior

The nemo window should exits one per time, not closing together, and not coredump as well.

Additional context

  1. Nemo windows do share one process id, but this seems to be not the case as killactive just closes a window, not killing it. (however, this may be misleading as someone mentioned that steam also exits its background process when using killactive)
  2. This issue didn't exist on Arch Linux. Just to mention that there may be something we should patch.
  3. This is the content of coredump:
Process 46111 (.nemo-wrapped) of user 1000 dumped core.

Module librsvg-2.so.2 without build-id.
Module libpixbufloader-svg.so without build-id.
Module libFcitx5GClient.so.2 without build-id.
Module im-fcitx5.so without build-id.
Module libdconfsettings.so without build-id.
Module libcap.so.2 without build-id.
Module libicudata.so.72 without build-id.
Module libsystemd.so.0 without build-id.
Module libbrotlicommon.so.1 without build-id.
Module libxklavier.so.16 without build-id.
Module libgnomekbd.so.8 without build-id.
Module libpcre.so.1 without build-id.
Module libGLX.so.0 without build-id.
Module libXdmcp.so.6 without build-id.
Module libXau.so.6 without build-id.
Module libGLdispatch.so.0 without build-id.
Module libdatrie.so.1 without build-id.
Module libxml2.so.2 without build-id.
Module libjson-glib-1.0.so.0 without build-id.
Module libicui18n.so.72 without build-id.
Module libicuuc.so.72 without build-id.
Module libdbus-1.so.3 without build-id.
Module libatspi.so.0 without build-id.
Module libbrotlidec.so.1 without build-id.
Module libbz2.so.1 without build-id.
Module libgraphite2.so.3 without build-id.
Module libgcc_s.so.1 without build-id.
Module libstdc++.so.6 without build-id.
Module libexpat.so.1 without build-id.
Module libgnomekbdui.so.8 without build-id.
Module libpcre2-8.so.0 without build-id.
Module libffi.so.8 without build-id.
Module libselinux.so.1 without build-id.
Module libjpeg.so.62 without build-id.
Module libGL.so.1 without build-id.
Module libz.so.1 without build-id.
Module libXrender.so.1 without build-id.
Module libxcb-render.so.0 without build-id.
Module libxcb.so.1 without build-id.
Module libxcb-shm.so.0 without build-id.
Module libpng16.so.16 without build-id.
Module libEGL.so.1 without build-id.
Module libfreetype.so.6 without build-id.
Module libthai.so.0 without build-id.
Module libXinerama.so.1 without build-id.
Module libXcomposite.so.1 without build-id.
Module libXdamage.so.1 without build-id.
Module libXcursor.so.1 without build-id.
Module libxkbcommon.so.0 without build-id.
Module libXfixes.so.3 without build-id.
Module libtracker-sparql-3.0.so.0 without build-id.
Module libatk-bridge-2.0.so.0 without build-id.
Module libXi.so.6 without build-id.
Module libepoxy.so.0 without build-id.
Module libfribidi.so.0 without build-id.
Module libfontconfig.so.1 without build-id.
Module libpangoft2-1.0.so.0 without build-id.
Module libharfbuzz.so.0 without build-id.
Module libXrandr.so.2 without build-id.
Module libxkbfile.so.1 without build-id.
Module libXext.so.6 without build-id.
Module libexempi.so.8 without build-id.
Module libexif.so.12 without build-id.
Module libxapp.so.1 without build-id.
Module libX11.so.6 without build-id.
Module libatk-1.0.so.0 without build-id.
Module libpango-1.0.so.0 without build-id.
Module libpangocairo-1.0.so.0 without build-id.
Module libcinnamon-desktop.so.4 without build-id.
Module libnemo-extension.so.1 without build-id.
Module .nemo-wrapped without build-id.
Stack trace of thread 46111:
#0  0x00007f2888b468ca gtk_widget_destroy (libgtk-3.so.0 + 0x3468ca)
#1  0x000000000050639d destroy (.nemo-wrapped + 0x10639d)
#2  0x00007f28884924e8 g_closure_invoke (libgobject-2.0.so.0 + 0x174e8)
#3  0x00007f28884a5880 signal_emit_unlocked_R (libgobject-2.0.so.0 + 0x2a880)
#4  0x00007f28884ac6ba g_signal_emit_valist (libgobject-2.0.so.0 + 0x316ba)
#5  0x00007f28884ac94f g_signal_emit (libgobject-2.0.so.0 + 0x3194f)
#6  0x00007f2888b4f2b0 gtk_widget_dispose (libgtk-3.so.0 + 0x34f2b0)
#7  0x00007f28884990c9 g_object_run_dispose (libgobject-2.0.so.0 + 0x1e0c9)
#8  0x00007f2888a7d7f1 gtk_scrolled_window_destroy (libgtk-3.so.0 + 0x27d7f1)
#9  0x00007f28884924e8 g_closure_invoke (libgobject-2.0.so.0 + 0x174e8)
#10 0x00007f28884a5880 signal_emit_unlocked_R (libgobject-2.0.so.0 + 0x2a880)
#11 0x00007f28884ac6ba g_signal_emit_valist (libgobject-2.0.so.0 + 0x316ba)
#12 0x00007f28884ac94f g_signal_emit (libgobject-2.0.so.0 + 0x3194f)
#13 0x00007f2888b4f2b0 gtk_widget_dispose (libgtk-3.so.0 + 0x34f2b0)
#14 0x00007f28884990c9 g_object_run_dispose (libgobject-2.0.so.0 + 0x1e0c9)
#15 0x00000000004b75c3 nemo_window_slot_dispose (.nemo-wrapped + 0xb75c3)
#16 0x00007f2888497741 g_object_unref (libgobject-2.0.so.0 + 0x1c741)
#17 0x00007f2888922fb8 gtk_container_remove (libgtk-3.so.0 + 0x122fb8)
#18 0x00000000004b4d51 nemo_window_pane_remove_slot_unsafe (.nemo-wrapped + 0xb4d51)
#19 0x00000000004b8fbb nemo_window_close_pane (.nemo-wrapped + 0xb8fbb)
#20 0x00007f2888391158 g_list_foreach (libglib-2.0.so.0 + 0x54158)
#21 0x00000000004b87b4 nemo_window_destroy (.nemo-wrapped + 0xb87b4)
#22 0x00007f28884925af g_closure_invoke (libgobject-2.0.so.0 + 0x175af)
#23 0x00007f28884a5880 signal_emit_unlocked_R (libgobject-2.0.so.0 + 0x2a880)
#24 0x00007f28884ac6ba g_signal_emit_valist (libgobject-2.0.so.0 + 0x316ba)
#25 0x00007f28884ac94f g_signal_emit (libgobject-2.0.so.0 + 0x3194f)
#26 0x00007f2888b4f2b0 gtk_widget_dispose (libgtk-3.so.0 + 0x34f2b0)
#27 0x00007f2888b62938 gtk_window_dispose (libgtk-3.so.0 + 0x362938)
#28 0x00007f28888ca76f gtk_application_window_dispose (libgtk-3.so.0 + 0xca76f)
#29 0x00007f28884990c9 g_object_run_dispose (libgobject-2.0.so.0 + 0x1e0c9)
#30 0x00000000004b8f4c nemo_window_delete_event (.nemo-wrapped + 0xb8f4c)
#31 0x00007f288889da04 _gtk_marshal_BOOLEAN__BOXEDv (libgtk-3.so.0 + 0x9da04)
#32 0x00007f28884927d9 _g_closure_invoke_va (libgobject-2.0.so.0 + 0x177d9)
#33 0x00007f28884abc56 g_signal_emit_valist (libgobject-2.0.so.0 + 0x30c56)
#34 0x00007f28884ac94f g_signal_emit (libgobject-2.0.so.0 + 0x3194f)
#35 0x00007f2888b45674 gtk_widget_event_internal.part.0 (libgtk-3.so.0 + 0x345674)
#36 0x00007f28889fb2c3 gtk_main_do_event (libgtk-3.so.0 + 0x1fb2c3)
#37 0x00007f2889102b85 _gdk_event_emit (libgdk-3.so.0 + 0x3eb85)
#38 0x00007f2889136722 gdk_event_source_dispatch (libgdk-3.so.0 + 0x72722)
#39 0x00007f28883959db g_main_context_dispatch (libglib-2.0.so.0 + 0x589db)
#40 0x00007f2888395c88 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0x58c88)
#41 0x00007f2888395d3f g_main_context_iteration (libglib-2.0.so.0 + 0x58d3f)
#42 0x00007f28885c119d g_application_run (libgio-2.0.so.0 + 0xe519d)
#43 0x0000000000433329 main (.nemo-wrapped + 0x33329)
#44 0x00007f2887c2924e __libc_start_call_main (libc.so.6 + 0x2924e)
#45 0x00007f2887c29309 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x29309)
#46 0x0000000000433375 _start (.nemo-wrapped + 0x33375)

Stack trace of thread 46114:
#0  0x00007f2887d02759 __poll (libc.so.6 + 0x102759)
#1  0x00007f2888395c26 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0x58c26)
#2  0x00007f2888395f73 g_main_loop_run (libglib-2.0.so.0 + 0x58f73)
#3  0x00007f28885fc436 gdbus_shared_thread_func (libgio-2.0.so.0 + 0x120436)
#4  0x00007f28883c08cd g_thread_proxy (libglib-2.0.so.0 + 0x838cd)
#5  0x00007f2887c88e86 start_thread (libc.so.6 + 0x88e86)
#6  0x00007f2887d0fd30 __clone3 (libc.so.6 + 0x10fd30)

Stack trace of thread 46113:
#0  0x00007f2887d07d3d syscall (libc.so.6 + 0x107d3d)
#1  0x00007f28883eb0c2 g_cond_wait_until (libglib-2.0.so.0 + 0xae0c2)
#2  0x00007f2888363a91 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x26a91)
#3  0x00007f28883c130a g_thread_pool_thread_proxy (libglib-2.0.so.0 + 0x8430a)
#4  0x00007f28883c08cd g_thread_proxy (libglib-2.0.so.0 + 0x838cd)
#5  0x00007f2887c88e86 start_thread (libc.so.6 + 0x88e86)
#6  0x00007f2887d0fd30 __clone3 (libc.so.6 + 0x10fd30)

Stack trace of thread 46112:
#0  0x00007f2887d02759 __poll (libc.so.6 + 0x102759)
#1  0x00007f2888395c26 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0x58c26)
#2  0x00007f2888395d3f g_main_context_iteration (libglib-2.0.so.0 + 0x58d3f)
#3  0x00007f2888395d91 glib_worker_main (libglib-2.0.so.0 + 0x58d91)
#4  0x00007f28883c08cd g_thread_proxy (libglib-2.0.so.0 + 0x838cd)
#5  0x00007f2887c88e86 start_thread (libc.so.6 + 0x88e86)
#6  0x00007f2887d0fd30 __clone3 (libc.so.6 + 0x10fd30)

Stack trace of thread 46119:
#0  0x00007f2887d07d3d syscall (libc.so.6 + 0x107d3d)
#1  0x00007f28883eb0c2 g_cond_wait_until (libglib-2.0.so.0 + 0xae0c2)
#2  0x00007f2888363a91 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x26a91)
#3  0x00007f28883c130a g_thread_pool_thread_proxy (libglib-2.0.so.0 + 0x8430a)
#4  0x00007f28883c08cd g_thread_proxy (libglib-2.0.so.0 + 0x838cd)
#5  0x00007f2887c88e86 start_thread (libc.so.6 + 0x88e86)
#6  0x00007f2887d0fd30 __clone3 (libc.so.6 + 0x10fd30)

Stack trace of thread 46121:
#0  0x00007f2887d07d3d syscall (libc.so.6 + 0x107d3d)
#1  0x00007f28883eb0c2 g_cond_wait_until (libglib-2.0.so.0 + 0xae0c2)
#2  0x00007f2888363a91 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x26a91)
#3  0x00007f28883c130a g_thread_pool_thread_proxy (libglib-2.0.so.0 + 0x8430a)
#4  0x00007f28883c08cd g_thread_proxy (libglib-2.0.so.0 + 0x838cd)
#5  0x00007f2887c88e86 start_thread (libc.so.6 + 0x88e86)
#6  0x00007f2887d0fd30 __clone3 (libc.so.6 + 0x10fd30)

Stack trace of thread 46115:
#0  0x00007f2887d02759 __poll (libc.so.6 + 0x102759)
#1  0x00007f2888395c26 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0x58c26)
#2  0x00007f2888395d3f g_main_context_iteration (libglib-2.0.so.0 + 0x58d3f)
#3  0x00007f28863a346d dconf_gdbus_worker_thread (libdconfsettings.so + 0xb46d)
#4  0x00007f28883c08cd g_thread_proxy (libglib-2.0.so.0 + 0x838cd)
#5  0x00007f2887c88e86 start_thread (libc.so.6 + 0x88e86)
#6  0x00007f2887d0fd30 __clone3 (libc.so.6 + 0x10fd30)

Stack trace of thread 46120:
#0  0x00007f2887d07d3d syscall (libc.so.6 + 0x107d3d)
#1  0x00007f28883eb0c2 g_cond_wait_until (libglib-2.0.so.0 + 0xae0c2)
#2  0x00007f2888363a91 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x26a91)
#3  0x00007f28883c130a g_thread_pool_thread_proxy (libglib-2.0.so.0 + 0x8430a)
#4  0x00007f28883c08cd g_thread_proxy (libglib-2.0.so.0 + 0x838cd)
#5  0x00007f2887c88e86 start_thread (libc.so.6 + 0x88e86)
#6  0x00007f2887d0fd30 __clone3 (libc.so.6 + 0x10fd30)

Stack trace of thread 46123:
#0  0x00007f2887d07d3d syscall (libc.so.6 + 0x107d3d)
#1  0x00007f28883eb0c2 g_cond_wait_until (libglib-2.0.so.0 + 0xae0c2)
#2  0x00007f2888363a91 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x26a91)
#3  0x00007f28883c130a g_thread_pool_thread_proxy (libglib-2.0.so.0 + 0x8430a)
#4  0x00007f28883c08cd g_thread_proxy (libglib-2.0.so.0 + 0x838cd)
#5  0x00007f2887c88e86 start_thread (libc.so.6 + 0x88e86)
#6  0x00007f2887d0fd30 __clone3 (libc.so.6 + 0x10fd30)

Stack trace of thread 46122:
#0  0x00007f2887d07d3d syscall (libc.so.6 + 0x107d3d)
#1  0x00007f28883eb0c2 g_cond_wait_until (libglib-2.0.so.0 + 0xae0c2)
#2  0x00007f2888363a91 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x26a91)
#3  0x00007f28883c130a g_thread_pool_thread_proxy (libglib-2.0.so.0 + 0x8430a)
#4  0x00007f28883c08cd g_thread_proxy (libglib-2.0.so.0 + 0x838cd)
#5  0x00007f2887c88e86 start_thread (libc.so.6 + 0x88e86)
#6  0x00007f2887d0fd30 __clone3 (libc.so.6 + 0x10fd30)

Stack trace of thread 46124:
#0  0x00007f2887d07d3d syscall (libc.so.6 + 0x107d3d)
#1  0x00007f28883eb0c2 g_cond_wait_until (libglib-2.0.so.0 + 0xae0c2)
#2  0x00007f2888363a91 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x26a91)
#3  0x00007f28883c130a g_thread_pool_thread_proxy (libglib-2.0.so.0 + 0x8430a)
#4  0x00007f28883c08cd g_thread_proxy (libglib-2.0.so.0 + 0x838cd)
#5  0x00007f2887c88e86 start_thread (libc.so.6 + 0x88e86)
#6  0x00007f2887d0fd30 __clone3 (libc.so.6 + 0x10fd30)
ELF object binary architecture: AMD x86-64

Notify maintainers

@bobby285271 @mkg20001

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.6-zen1, NixOS, 23.05 (Stoat), 23.05.20230123.1b1f506`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.12.0`
 - nixpkgs: `/nix/store/ismzj4bksv54y4x2b9spfvk9mqhbcwf8-source`

Reported from Fedora with nemo 5.6.2, also hyprland, works fine.

More related behavior (I'll call nemo windows in time order as nemo1 nemo2 etc):

  1. If I launch nemo1 and nemo2 in a short interval, they won't close together when I close one.
  2. If I launch nemo1 and wait for about 10 seconds, then launch nemo2, then close nemo1, they are possible to crash. However, closing nemo2 immediately won't, if wait for another 10 seconds, both crashes when closing nemo1 or nemo2.
  3. If I launch nemo1, nemo2 and nemo3 in a short interval, then close nemo1, they all will crash.

Again, nemo windows share one pid. So the crash will close all windows.

This was reported by linuxmint users several years ago, but I'm afraid they can't reproduce the bug anymore. Also since other distros can't reproduce this bug, I'd rather believe it's specific to nixos, and maybe because of the wrapper.

I was not able to properly test this right now (sorry 🙇‍♀️), but here are some random things you can try:

  • See if you can reproduce this with nautilus, thunar, also some old version of nemo, some old nixpkgs checkouts, ... If you find it previously working, a bisect point will be appreciated.

  • Install debug symbols and reproduce the crash, not tested but should be something like:

    { pkgs }:
    {
      environment.systemPackages = with pkgs; [
        gdb
        glib
        cinnamon.nemo
      ];
    
      environment.enableDebugInfo = true;
    
      nixpkgs.overlays = [
        (final: prev: {
          cinnamon = prev.cinnamon.overrideScope' (cfinal: cprev: {
            nemo = cprev.nemo.overrideAttrs (attrs: {
              separateDebugInfo = true;
            });
          });
        })
      ];
    }

    Then get list of crashes with coredumpctl, run coredumpctl gdb <pid> and enter bt full.

  • Based on the above step, try to patch away (remove) some of the lines in nemo_window_slot_dispose according to your stack trace and try reproduce the issue, you can also e.g. try swapping the order they distroy widgets to see if it matters.

Sorry I have no idea how killactive "closes" a window, is that the only way to trigger the crash? Did you spot the crash when closing nemo normally, i.e. clicking 文件 (File) -> 关闭全部窗口 (Close All Windows) and/or 文件 (File) -> 关闭 (Close)?

I was not able to properly test this right now (sorry 🙇‍♀️), but here are some random things you can try:

  • See if you can reproduce this with nautilus, thunar, also some old version of nemo, some old nixpkgs checkouts, ... If you find it previously working, a bisect point will be appreciated.

  • Install debug symbols and reproduce the crash, not tested but should be something like:

    { pkgs }:
    {
      environment.systemPackages = with pkgs; [
        gdb
        glib
        cinnamon.nemo
      ];
    
      environment.enableDebugInfo = true;
    
      nixpkgs.overlays = [
        (final: prev: {
          cinnamon = prev.cinnamon.overrideScope' (cfinal: cprev: {
            nemo = cprev.nemo.overrideAttrs (attrs: {
              separateDebugInfo = true;
            });
          });
        })
      ];
    }

    Then get list of crashes with coredumpctl, run coredumpctl gdb <pid> and enter bt full.

  • Based on the above step, try to patch away (remove) some of the lines in nemo_window_slot_dispose according to your stack trace and try reproduce the issue, you can also e.g. try swapping the order they distroy widgets to see if it matters.

Sorry I have no idea how killactive "closes" a window, is that the only way to trigger the crash? Did you spot the crash when closing nemo normally, i.e. clicking 文件 (File) -> 关闭全部窗口 (Close All Windows) and/or 文件 (File) -> 关闭 (Close)?

Sorry I haven't got time to debug it, but I've tested with "close all windows" or "close" several times, they didn't crash and "close" works correctly.

Thunar don't (since it doesn't share the same pid across windows?), and nautilus refuses to open a second window when one exists.

#1  0x000000000050639d in destroy ()
No symbol table info available.

Weird, did you trigger the crash after rebuilding nemo? 🤔

#1  0x000000000050639d in destroy ()
No symbol table info available.

Weird, did you trigger the crash after rebuilding nemo? 🤔

Yes, by the same killactive sended by hyprland

I've included

{ pkgs, ... }:
{
  environment.systemPackages = with pkgs; [
    gdb
    glib
  ];

  environment.enableDebugInfo = true;

  nixpkgs.overlays = [
    (final: prev: {
      cinnamon = prev.cinnamon.overrideScope' (cfinal: cprev: {
        nemo = cprev.nemo.overrideAttrs (attrs: {
          separateDebugInfo = true;
        });
      });
    })
  ];
}

in my nixos configuration, and installed cinnamon.nemo-with-extensions with home manager (home manager as a module of nixos). This rebuilds nemo (I saw it) when applying config.

Can you try adding cinnamon.nemo to environment.systemPackages (reason) instead?

Can you try adding cinnamon.nemo to environment.systemPackages (reason) instead?

Okay it seem to work, and now I get this:

#0  0x00007f90f374613a in gtk_widget_destroy () from /nix/store/kv7ih63pn9hn8p00wwi1mvg400ahsrc2-gtk+3-3.24.36/lib/libgtk-3.so.0
[Current thread is 1 (Thread 0x7f90f1809a80 (LWP 303638))]
(gdb) bt full
#0  0x00007f90f374613a in gtk_widget_destroy () from /nix/store/kv7ih63pn9hn8p00wwi1mvg400ahsrc2-gtk+3-3.24.36/lib/libgtk-3.so.0
No symbol table info available.
#1  0x000000000050639d in destroy (object=0x1a12150) at ../libnemo-private/nemo-icon-container.c:2741
        container = 0x1a12150
#2  0x00007f90f2f594e8 in g_closure_invoke (closure=closure@entry=0x12c1710, return_value=return_value@entry=0x0, n_param_values=1, param_values=param_values@entry=0x7ffd397d3510, 
    invocation_hint=invocation_hint@entry=0x7ffd397d3490) at ../gobject/gclosure.c:832
        marshal = 0x7f90f2f57d70 <g_type_class_meta_marshal>
        marshal_data = 0x98
        in_marshal = 1
        real_closure = 0x12c16f0
        __func__ = "g_closure_invoke"

Can you try adding cinnamon.nemo to environment.systemPackages (reason) instead?

https://github.com/linuxmint/nemo/blob/4ee50c85760f6b7c2566310510597e02484f9731/libnemo-private/nemo-icon-container.c#L2741 Pretty fun though, it happens even without triggering the 'search window'. I just open and close the nemo, and do nothing else.

Can you try adding cinnamon.nemo to environment.systemPackages (reason) instead?

Make sense to me! If I hit the search button to trigger the search widget, then close it, it won't crash (tested 10 times). So the problem is trying to destroy a widget that doesn't exist.

However, there is another question: fedora and archlinux with the exact nemo 5.6.3, hyprland latest, xdg-desktop-portal-hyprland, doesn't, and the code makes sense. So what is happening to nixos?

diff --git a/libnemo-private/nemo-icon-container.c b/libnemo-private/nemo-icon-container.c
index 5ea40e6..bf5dd6e 100644
--- a/libnemo-private/nemo-icon-container.c
+++ b/libnemo-private/nemo-icon-container.c
@@ -2738,7 +2738,7 @@ destroy (GtkWidget *object)
 
 	/* destroy interactive search dialog */
 	if (container->details->search_window) {
-		gtk_widget_destroy (container->details->search_window);
+		//gtk_widget_destroy (container->details->search_window);
 		container->details->search_window = NULL;
 		container->details->search_entry = NULL;
 	}

Unsure of memory leaks, but anyway it works. This seems like a upstream bug and caused by gtk or glib version compatibility. Will close it for now.

Hmmm, please consider reporting this to linuxmint. I checked nautilus and they removed these code after their search rewrite/redesign so we are on our own.

I actually wonder whether a GTK_IS_WIDGET check is needed

-		gtk_widget_destroy (container->details->search_window);
+		if (GTK_IS_WIDGET (container->details->search_window))
+			gtk_widget_destroy (container->details->search_window);

But it is unclear to me why the null check is not enough 🙃

Hmmm, please consider reporting this to linuxmint. I checked nautilus and they removed these code after their search rewrite/redesign so we are on our own.

I actually wonder whether a GTK_IS_WIDGET check is needed

-		gtk_widget_destroy (container->details->search_window);
+		if (GTK_IS_WIDGET (container->details->search_window))
+			gtk_widget_destroy (container->details->search_window);

But it is unclear to me why the null check is not enough upside_down_face

Tested, this is not enough however.

Did this ever get fixed? I seem to be having this same issue still with cinnamon.nemo-with-extensions version 6.0.2

Core was generated by `/home/shaun/.nix-profile/bin/nemo'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fb43cd53649 in gtk_widget_destroy ()
   from /nix/store/wky1jsp6g0vdn7i81g1s5yvha6fnadpr-gtk+3-3.24.42/lib/libgtk-3.so.0
[Current thread is 1 (Thread 0x7fb43a8c8ac0 (LWP 14288))]
(gdb) bt full
#0  0x00007fb43cd53649 in gtk_widget_destroy ()
   from /nix/store/wky1jsp6g0vdn7i81g1s5yvha6fnadpr-gtk+3-3.24.42/lib/libgtk-3.so.0
No symbol table info available.
#1  0x00000000004f3882 in destroy ()
No symbol table info available.
#2  0x00007fb43c5435d1 in g_closure_invoke ()
   from /nix/store/yl0m9g65iv1wa6lrbbk959ag2ahw355b-glib-2.80.2/lib/libgobject-2.0.so.0
nix-shell -p nix-info --run "nix-info -m"

 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.36, NixOS, 24.05 (Uakari), 24.05.20240629.d95551a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.22.2`
 - channels(root): `""`
 - nixpkgs: `/nix/store/7n3grjjwy0xk28c27gqi409wckbsy2d6-source`

I totally forgot that. I'm using my patches for more than one year.

diff --git a/libnemo-private/nemo-icon-container.c b/libnemo-private/nemo-icon-container.c
index 5ea40e6..bf5dd6e 100644
--- a/libnemo-private/nemo-icon-container.c
+++ b/libnemo-private/nemo-icon-container.c
@@ -2738,7 +2738,7 @@ destroy (GtkWidget *object)
 
 	/* destroy interactive search dialog */
 	if (container->details->search_window) {
-		gtk_widget_destroy (container->details->search_window);
+		//gtk_widget_destroy (container->details->search_window);
 		container->details->search_window = NULL;
 		container->details->search_entry = NULL;
 	}

This is also useful for nemo --existing-window

diff --git a/src/nemo-main-application.c b/src/nemo-main-application.c
index 3a61cdd..94e34d2 100644
--- a/src/nemo-main-application.c
+++ b/src/nemo-main-application.c
@@ -445,8 +445,7 @@ open_tabs_in_existing_window (NemoMainApplication *application,
 
             /* Don't use `gtk_window_present()`, as the window manager will ignore this window's focus request and try
              * to just mark it urgent instead (flashing in the window list for example). */
-            gtk_window_present_with_time (GTK_WINDOW (window),
-                                          gdk_x11_get_server_time (gtk_widget_get_window (GTK_WIDGET (window))));
+            gtk_window_present (GTK_WINDOW (window));
 
           break;
         }

Would be better to report it upstream, though.

I totally forgot that. I'm using my patches for more than one year.

diff --git a/libnemo-private/nemo-icon-container.c b/libnemo-private/nemo-icon-container.c
index 5ea40e6..bf5dd6e 100644
--- a/libnemo-private/nemo-icon-container.c
+++ b/libnemo-private/nemo-icon-container.c
@@ -2738,7 +2738,7 @@ destroy (GtkWidget *object)
 
 	/* destroy interactive search dialog */
 	if (container->details->search_window) {
-		gtk_widget_destroy (container->details->search_window);
+		//gtk_widget_destroy (container->details->search_window);
 		container->details->search_window = NULL;
 		container->details->search_entry = NULL;
 	}

Thanks for the info. This does in fact fix it. It's worth noting for anyone who might travel this path in the future - the patch has to be applied to cinnamon.nemo, even if using cinnamon.nemo-with-extensions.

Totally didn't spend 45 minutes trying to figure out why it wasn't working just to figure that out

Please try #324056.

seems to work?