Skip to content

Systray hook injects into Explorer but the DLL never connects back — hangs forever with no timeout/error ("Waiting for DLL to connect" never resolves) #1045

Description

@lucasrubo

Windows version

Windows 11

Windows OS build

version 25H2, build 26200.8875

YASB version installed

2.0.5

Describe the bug

Environment

  • YASB version: 2.0.5
  • Windows: 11, version 25H2, build 26200.8875
  • Antivirus: Windows Defender only (no third-party AV)
  • Smart App Control: Off / not supported on this device
  • systray widget with default use_hook: true (also tested use_hook: false, same end result — no icons besides a fixed few)
  • Companion tools in use: thide and EusingSoftware.TaskbarHide, used to hide the native taskbar so only the YASB bar shows

Summary

With debug: true, yasb.log shows the systray hook sequence starts normally but never completes:

No further log line ever appears after "Waiting for DLL to connect" — no success confirmation, no error, no timeout — even after several minutes. Meanwhile, directly enumerating explorer.exe's loaded modules (Get-Process explorer | select -expand Modules) confirms YASBTrayHook.dll is never actually loaded into the process, despite the log claiming injection was attempted.

Net effect: the systray widget only ever shows a fixed handful of icons (its own, Task Manager, and the taskbar-hiding tools' own icons) and never picks up ordinary tray apps (AV, GPU/audio utilities, Discord, Steam, etc.), because the hook that's supposed to report them never actually attaches.

Steps to reproduce

  1. Set debug: true in config.yaml.
  2. Fully quit and relaunch YASB (hot-reload via watch_config does not re-init the log level / hook — a full restart is required to see debug output for this).
  3. Watch yasb.log: hook injection is attempted once per YASB startup, but "Waiting for DLL to connect" is the last line ever logged for that thread.
  4. Confirm independently: explorer.exe's module list never contains YASBTrayHook.dll.

What I ruled out

  • Windows Defender: no threat detections, no ASR/Controlled Folder Access blocks, no Code Integrity blocks in the event log around injection time.
  • Smart App Control: off / unsupported on this machine.
  • No third-party AV/EDR installed.
  • Not a timing/boot-race issue: reproduced identically on a completely fresh explorer.exe (freshly restarted, not the original boot instance) and after multiple clean YASB restarts.
  • Not specific to use_hook: true: setting use_hook: false (legacy monitor-window fallback) also never picks up these icons.

Expected behavior

Either the hook connects successfully and all tray icons populate, or — at minimum — a failure/timeout should be logged so this is diagnosable instead of hanging silently forever.

Additional environment note

The native taskbar (Shell_TrayWnd) had been hidden via SW_HIDE by a companion taskbar-hiding tool (thide, made by the same author, intended to be YASB-compatible). Not sure if related to the hook connection failure, but flagging in case the hook's pipe/DLL handshake has any dependency on that window's visible state.

Relevant log output

[DEBUG] [systray_hook/systray_hook.py:137]: Creating pipe \.\pipe\yasb_systray_monitor...
[INFO]  [systray_hook/systray_hook.py:193]: Injecting into Explorer (PID: 4064)
[DEBUG] [systray_hook/systray_hook.py:200]: Waiting for DLL to connect

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions