Skip to content

[Bug] Windows 便携版任务栏图标时有时无 #663

Description

@GaoHu1997

What happened? / 问题描述

便携版启动后,任务栏图标经常不显示(空白或消失),「固定到任务栏」也无法稳定生效。现象时好时坏:有时重启后图标恢复正常,过一段时间或再次重启后又失效。
通过进程排查与二进制分析确认:

PI-Desktop-Portable-0.15.1.exe 是一个 7-Zip SFX 自解压包装器,每次启动将真正的应用解压到 %TEMP% 下的一个随机命名目录再运行

Windows 任务栏分组与图标缓存均按 exe 的实际运行路径 匹配。由于该路径是每次解压时随机生成的 Temp 目录:
路径变化后图标缓存匹配失败 → 任务栏图标显示为空白/不显示;
用户「固定到任务栏」记录的是某一次解压出的 Temp 路径,下次解压到新目录后固定项即失效。
实测该 SFX 在同一会话/同一系统周期内会复用同一个 Temp 目录,因此图标表现为「时好时坏」:目录未变时一切正常,目录一旦重新生成即再次失效。

Steps to reproduce / 复现步骤

1.打开pi
2.任务栏图标空白

Expected behavior / 预期行为

任务栏存在正常的图标

Actual behavior / 实际行为

任务栏图标空白

App version / 应用版本

0.15.1

Operating system / 操作系统

Windows

Extra environment / 其他环境信息

No response

Logs / 日志

Screenshots / 截图

No response

Activity

  1. yg2224 commented on Sep 20, 2026

    @yg2224
    Contributor

    我来处理这个问题。我会先在最新代码上验证 Windows 便携版的打包与任务栏图标路径行为,然后提交修复并补充验证。

  2. yg2224 commented on Sep 20, 2026

    @yg2224
    Contributor

    修复已提交 PR:#667。

    变更将 Windows portable 的 unpackDirName 固定为 PI-Desktop-Portable,让任务栏分组和固定项使用稳定的解压路径;同时补充打包契约测试与发布文档。

  3. vastsa commented on Sep 21, 2026

    @vastsa
    Owner

    复核确认根因真实存在,当前仍未安全修复。原 PR #667 已关闭未合并;后续 PR #731 虽固定了 unpackDirName 方向,但 Windows portable/taskbar smoke 失败,且 review 已指出路径 containment 为词法检查、子进程清理不完整、固定解压目录并发冲突等 landing blockers。issue 保持开放,不合并 #731。

  4. louisss1016 commented on Sep 21, 2026

    @louisss1016

    Thanks for the clear root-cause write-up and the blocker notes on #667/#731. The three landing blockers — lexical-only path containment, incomplete child-process cleanup, and concurrent launches racing on the fixed extraction dir — are exactly what make pinning an SFX extraction path hard.

    Before attempting anything: would a fresh PR addressing these be welcome, or is the #731 author still iterating? If that attempt is still active I'd rather help by reviewing/testing than open a competing one.

    If a new attempt is welcome, my approach would be: containment via resolved real-path checks (not lexical), a per-user lock so concurrent launches serialize on the fixed extraction dir, and child-process tree tracking so the previous extraction is fully reaped before cleanup — with the SFX config left unchanged for existing installs.

  5. vastsa commented on Sep 26, 2026

    @vastsa
    Owner

    已把 #839 合并进本 issue。补充症状:部分版本需以管理员身份运行,以及任务栏显示为默认图标。根因方向一致:SFX 自解压到 %TEMP% 随机目录导致图标/固定项失效。

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions