Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 反馈问题:隐藏菜单栏图标后自动退出 #110

Closed
3 of 4 tasks
zhyeJ opened this issue May 25, 2023 · 75 comments
Closed
3 of 4 tasks

🐞 反馈问题:隐藏菜单栏图标后自动退出 #110

zhyeJ opened this issue May 25, 2023 · 75 comments
Labels
bug Something isn't working rare issue

Comments

@zhyeJ
Copy link

zhyeJ commented May 25, 2023

请先确认以下事项:

  • 已仔细阅读了 README
  • issues 页面搜索过问题(包括已关闭的 issue),但未能找到解决方法
  • Easydict 已升级到最新版本

问题描述

隐藏图标后过几分钟不唤醒软件自动退出

重现步骤

期望结果

隐藏后能够持续在后台运行

解决方案(可选)

No response

设备信息 && 操作系统版本(可选)

No response

是否愿意提交 PR 解决该问题?

  • 我愿意提交 PR!
@zhyeJ zhyeJ added the bug Something isn't working label May 25, 2023
@github-actions
Copy link

Hello zhyeJ, Thank you for your first issue contribution 🎉

@Jerry23011
Copy link
Collaborator

Hi,你说的是隐藏哪个图标呢?

@zhyeJ
Copy link
Author

zhyeJ commented May 25, 2023

状态栏图标

@Jerry23011
Copy link
Collaborator

是这个吗?
截屏2023-05-25 21 19 25
你具体是指用什么方法隐藏的呢?

@zhyeJ
Copy link
Author

zhyeJ commented May 25, 2023

对的,就是用设置的选项隐藏的

@Jerry23011
Copy link
Collaborator

Jerry23011 commented May 25, 2023

明白你的意思了,谢谢,我这就试一下

@tisfeng
Copy link
Owner

tisfeng commented May 25, 2023

@Jerry23011 怎么样,你那边能复现吗? 我测试没发现问题。

@Jerry23011
Copy link
Collaborator

@tisfeng 我这边也没问题
@zhyeJ 你发现自动退出大概是几分钟后呢?

@zhyeJ
Copy link
Author

zhyeJ commented May 25, 2023

大概五六分钟吧

@Jerry23011
Copy link
Collaborator

大概五六分钟吧

方便发一下你的设备信息和操作系统版本吗?
我测试的机器是 MacBook Pro 14‘ macOS 13.4

@zhyeJ
Copy link
Author

zhyeJ commented May 26, 2023

设备m1 pro 系统macos 13.4

@Jerry23011
Copy link
Collaborator

我还是无法复现
@zhyeJ 这个问题你每次都能复现吗?你的 Easydict 偏好设置是什么?

@zhyeJ
Copy link
Author

zhyeJ commented May 26, 2023

截屏2023-05-26 20 08 27

@zhyeJ
Copy link
Author

zhyeJ commented May 26, 2023

偏好设置这里的UI是不是也有点问题,右边会多出一条线

@tisfeng
Copy link
Owner

tisfeng commented May 26, 2023

这条线,看起来和系统滚动条有关,这个不应该显示出来,而我这边确实也看不到。

@Jerry23011
Copy link
Collaborator

这条线,看起来和系统滚动条有关

是的,我觉得可能是系统设置中的滚动条
SCR-20230526-sadw

@zhyeJ
Copy link
Author

zhyeJ commented May 26, 2023

切换成 滚动时 确实消失了

@Jerry23011
Copy link
Collaborator

Jerry23011 commented May 26, 2023

但是比较奇怪的是我还是不知道该怎么复现这个问题🥲
我再接着试试

@zhyeJ
Copy link
Author

zhyeJ commented May 26, 2023

我这里确实是每次隐藏这个问题都会出现,不隐藏图标就没有问题

@tisfeng
Copy link
Owner

tisfeng commented May 26, 2023

问了一下 ChatGPT,不确定它是不是在胡说八道,但感觉有那么点道理 🤔

你可以测试一下,隐藏图标后,Pin 一个查询窗口,看是否还会自动退出?

内存方面,也有可能,目前还没进行专门优化,你可以盯着【活动监视器】看看内存变化。

image

@zhyeJ
Copy link
Author

zhyeJ commented May 26, 2023

内存没有问题,我刚盯着监视器看了一下,就没几分钟进程莫名其妙就终止了

@zhyeJ
Copy link
Author

zhyeJ commented May 26, 2023

如何pin窗口?

@Jerry23011
Copy link
Collaborator

内存没有问题,我刚盯着监视器看了一下,就没几分钟进程莫名其妙就终止了

看看这个时候 Mac 的内存压力

如何pin窗口?

可以用快捷键 ⌘P 或者点窗口左上角的钉选图标

@zhyeJ
Copy link
Author

zhyeJ commented May 26, 2023

内存压力一直是绿的

@zhyeJ
Copy link
Author

zhyeJ commented May 26, 2023

pin窗口仍然会退出

@Jerry23011
Copy link
Collaborator

也就是说窗口还在前台的时候就会直接消失?

@zhyeJ
Copy link
Author

zhyeJ commented May 26, 2023

@tisfeng
Copy link
Owner

tisfeng commented May 26, 2023

@zhyeJ 很奇怪了,你导出日志,我来查一下。

image

@tisfeng
Copy link
Owner

tisfeng commented Jul 7, 2023

不不,你这个状态不太对,Finished Running Easydict-Debug 是停止运行状态,如果你没有主动停止运行,那应该就是已经崩溃了。

你再试一次,你上面的截图要么不对,要么日志不全,请确保能看到最末尾的日志。除了直接获取 Xcode 的日志,麻烦你也另外这样导出一份日志给我

image

@jisuoqing
Copy link

@tisfeng Log and screen recording.

@tisfeng
Copy link
Owner

tisfeng commented Jul 8, 2023

感谢反馈,真很奇怪,我看了日志,没找到错误异常。从视频上看,确实是突然程序停止,也不像是程序异常崩溃,完全没有提示信息 😫

从这一点上来看,可能和应用在前台或后台运行环境有关?不确定。

pin窗口的时候暂时没有复现这个问题

暂时没什么办法了,这问题可能和用户系统环境有关,在没有更多上下文信息的情况下,很难进确认。

后续如果有用户也遇到这个问题,希望可以进一步提供相关信息,方便开发者排查。

@tzcskys
Copy link

tzcskys commented Jul 16, 2023

我也出现了一样的问题,新的M1 max 64+2T版,可以确定不是硬盘空间或者内存压力的问题

@Jerry23011
Copy link
Collaborator

Jerry23011 commented Jul 19, 2023

我在 macOS 14 Beta 3 的虚拟机上复现了这个问题,开启隐藏菜单栏图标,什么都不动,过一会 Easydict 就自己退出了,但是从 Log 中什么都看不出来 😟
com.izual.Easydict 2023-07-19--08-00-47-559.log

目前有一个疑问想请教一下 @tisfeng,我看活动监视器的 CPU 占用,为什么在任何地方移动光标的时候 Easydict 都会有 CPU 占用呢

@tisfeng
Copy link
Owner

tisfeng commented Jul 20, 2023

感觉这个问题可能不是 Easydict 本身的 bug 导致退出,可能是和用户电脑系统的某些环境因素有关,不一定是内存或磁盘压力,或是其他异常因素。

@Jerry23011 日志显示正常,你那边虚拟机能准确复现这个问题吗?我记得你之前电脑好像不能复现,比较一下你的虚拟机和本身系统之间的差异。另外,你用 Xcode 运行调试,看有没有断点报错信息。

频繁移动光标时,有 CPU 占用是正常的,我这边显示 3% 左右,问题不大,这是因为要实时监测自动划词动作,监听了一些系统的键盘鼠标事件。

image

@Jerry23011
Copy link
Collaborator

Jerry23011 commented Jul 21, 2023

感觉这个问题可能不是 Easydict 本身的 bug 导致退出

应该不是

或是其他异常因素

也挺奇怪的,毕竟虚拟机刚装上,非常干净

我记得你之前电脑好像不能复现

我 host 上确实不能复现,我现在虚拟机也复现不了了,等了40分钟也没退出😅

@tisfeng
Copy link
Owner

tisfeng commented Jul 21, 2023

暂时没什么办法,先放着吧。

@ZhangRuiMingZRM
Copy link

ZhangRuiMingZRM commented Nov 18, 2023

我也有同样的问题,克隆仓库手动构建出来的也有这个问题

@tisfeng
Copy link
Owner

tisfeng commented Nov 18, 2023

如果还有其他用户遇到这个问题,方便的话,建议使用 开发者构建 方法运行程序,然后启用 “隐藏菜单栏图标”,看看到底什么原因导致自动退出。捕获到 Xcode 崩溃日志后,全屏截图,以及将 Xcode 日志贴一下,我来看看。

运行调试看看,以及参考这里 #110 (comment) ,需要更详细的信息才能确定问题所在。

@ZhangRuiMingZRM
Copy link

如果还有其他用户遇到这个问题,方便的话,建议使用 开发者构建 方法运行程序,然后启用 “隐藏菜单栏图标”,看看到底什么原因导致自动退出。捕获到 Xcode 崩溃日志后,全屏截图,以及将 Xcode 日志贴一下,我来看看。

运行调试看看,以及参考这里 #110 (comment) ,需要更详细的信息才能确定问题所在。

NSErrorFailingURLKey=https://api.openai.com/v1/chat/completions, com.alamofire.serialization.response.error.data={length = 496, bytes = 0x7b0a2020 20202265 72726f72 223a207b ... 20202020 7d0a7d0a }, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x600002466320> { URL: https://api.openai.com/v1/chat/completions } { Status Code: 401, Headers {
  "Alt-Svc" : [
    "h3=\":443\"; ma=86400"
  ],
  "cf-cache-status" : [
    "DYNAMIC"
  ],
  "cf-ray" : [
    "82ea0814ebc46828-SEA"
  ],
  "Content-Length" : [
    "496"
  ],
  "Content-Type" : [
    "application\/json; charset=utf-8"
  ],
  "Date" : [
    "Fri, 01 Dec 2023 08:41:31 GMT"
  ],
  "Server" : [
    "cloudflare"
  ],
  "Set-Cookie" : [
    "_cfuvid=RgTtJJbhuLCeR4ZqJJtCoNZ6_gc3VYzj_cIOJdzDTXA-1701420091759-0-604800000; path=\/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None"
  ],
  "Strict-Transport-Security" : [
    "max-age=15724800; includeSubDomains"
  ],
  "Vary" : [
    "Origin"
  ],
  "x-request-id" : [
    "d8002585922cff468807cf8c21ff0283"
  ]
} }}
FAULT: <NSRemoteView: 0x14f6ce740 com.apple.TextInputUI.xpc.CursorUIViewService TUICursorUIViewService> determined it was necessary to configure <TUINSWindow: 0x148ecfe10> to support remote view vibrancy
deepLWebTranslate cost: 2,268.0899 ms
disabled autoSelectText
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d000600 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x1491a9418 - [pageProxyID=6, webPageID=7, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d000c00 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14a877018 - [pageProxyID=12, webPageID=13, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d001200 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x13903c018 - [pageProxyID=18, webPageID=19, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d001800 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x149079218 - [pageProxyID=24, webPageID=25, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d001e00 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14a8b5c18 - [pageProxyID=30, webPageID=31, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d002400 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14b027018 - [pageProxyID=36, webPageID=37, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d002a00 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14a8a8818 - [pageProxyID=42, webPageID=43, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d003000 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14b008218 - [pageProxyID=48, webPageID=49, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d003600 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x149146018 - [pageProxyID=54, webPageID=55, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d000000 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14a834e18 - [pageProxyID=60, webPageID=61, PID=0] WebPageProxy::processDidBecomeUnresponsive:

这是通过 开发者构建 运行程序后,异常退出的日志

@ZhangRuiMingZRM
Copy link

如果还有其他用户遇到这个问题,方便的话,建议使用 开发者构建 方法运行程序,然后启用 “隐藏菜单栏图标”,看看到底什么原因导致自动退出。捕获到 Xcode 崩溃日志后,全屏截图,以及将 Xcode 日志贴一下,我来看看。

运行调试看看,以及参考这里 #110 (comment) ,需要更详细的信息才能确定问题所在。

NSErrorFailingURLKey=https://api.openai.com/v1/chat/completions, com.alamofire.serialization.response.error.data={length = 496, bytes = 0x7b0a2020 20202265 72726f72 223a207b ... 20202020 7d0a7d0a }, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x600002466320> { URL: https://api.openai.com/v1/chat/completions } { Status Code: 401, Headers {
  "Alt-Svc" : [
    "h3=\":443\"; ma=86400"
  ],
  "cf-cache-status" : [
    "DYNAMIC"
  ],
  "cf-ray" : [
    "82ea0814ebc46828-SEA"
  ],
  "Content-Length" : [
    "496"
  ],
  "Content-Type" : [
    "application\/json; charset=utf-8"
  ],
  "Date" : [
    "Fri, 01 Dec 2023 08:41:31 GMT"
  ],
  "Server" : [
    "cloudflare"
  ],
  "Set-Cookie" : [
    "_cfuvid=RgTtJJbhuLCeR4ZqJJtCoNZ6_gc3VYzj_cIOJdzDTXA-1701420091759-0-604800000; path=\/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None"
  ],
  "Strict-Transport-Security" : [
    "max-age=15724800; includeSubDomains"
  ],
  "Vary" : [
    "Origin"
  ],
  "x-request-id" : [
    "d8002585922cff468807cf8c21ff0283"
  ]
} }}
FAULT: <NSRemoteView: 0x14f6ce740 com.apple.TextInputUI.xpc.CursorUIViewService TUICursorUIViewService> determined it was necessary to configure <TUINSWindow: 0x148ecfe10> to support remote view vibrancy
deepLWebTranslate cost: 2,268.0899 ms
disabled autoSelectText
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d000600 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x1491a9418 - [pageProxyID=6, webPageID=7, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d000c00 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14a877018 - [pageProxyID=12, webPageID=13, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d001200 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x13903c018 - [pageProxyID=18, webPageID=19, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d001800 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x149079218 - [pageProxyID=24, webPageID=25, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d001e00 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14a8b5c18 - [pageProxyID=30, webPageID=31, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d002400 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14b027018 - [pageProxyID=36, webPageID=37, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d002a00 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14a8a8818 - [pageProxyID=42, webPageID=43, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d003000 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14b008218 - [pageProxyID=48, webPageID=49, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d003600 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x149146018 - [pageProxyID=54, webPageID=55, PID=0] WebPageProxy::processDidBecomeUnresponsive:
Notifying the client that background WebProcess with pid 0 has become unresponsive
0x13d000000 - [PID=0] WebProcessProxy::didBecomeUnresponsive:
0x14a834e18 - [pageProxyID=60, webPageID=61, PID=0] WebPageProxy::processDidBecomeUnresponsive:

这是通过 开发者构建 运行程序后,异常退出的日志

通过pin窗口似乎不能稳定复现,如果不开启查询窗口的话,可以稳定复现应用异常退出的情况

@tisfeng
Copy link
Owner

tisfeng commented Dec 1, 2023

这个没看到特别的信息,你【导出日志】给我看一下吧。

@ZhangRuiMingZRM
Copy link

2.2.0版本似乎已经修复了,我从开发者构建也已经无法复现这个问题了

@tisfeng
Copy link
Owner

tisfeng commented Dec 4, 2023

神奇,我都还没修复,它就自己好了?

2.2.0 版本没改很多东西,可能就这个和菜单栏图标有关 #235

主要我这边无法复现,既然已经好了,那就先关闭,后面出现再说。

@tisfeng tisfeng closed this as completed Dec 4, 2023
@jisuoqing
Copy link

2.2.0版本仍然有自动退出的问题。@ZhangRuiMingZRM 得到的报错消失,可能与这个问题无关。

@tisfeng
Copy link
Owner

tisfeng commented Dec 5, 2023

那我还是打开放这里吧。 目前没发现问题,只能等有人能提供更多有用的信息再来看。

@tisfeng tisfeng reopened this Dec 5, 2023
@jisuoqing
Copy link

好像2.4.1版本中没有这个问题了🎉

@tisfeng
Copy link
Owner

tisfeng commented Jan 4, 2024

最近好像也没改这个 🙃

@jisuoqing
Copy link

Mac系统升级到14.3,这个问题又出现了(测试了版本2.4.1和2.5)🤦 之前系统是14.2.1,这个问题暂时没有出现。

@tisfeng
Copy link
Owner

tisfeng commented Jan 24, 2024

可能是系统 bug ?😑

@jisuoqing
Copy link

不清楚,看看其他人的数据点吧😂 另外我不懂啊,是不是需要加入background task来保持程序在后台一直运行:https://support.apple.com/en-hk/guide/deployment/depdca572563/web

@tisfeng
Copy link
Owner

tisfeng commented May 1, 2024

不清楚,看看其他人的数据点吧😂 另外我不懂啊,是不是需要加入background task来保持程序在后台一直运行:https://support.apple.com/en-hk/guide/deployment/depdca572563/web

应该不是这个问题。

@tisfeng
Copy link
Owner

tisfeng commented May 1, 2024

清理 issue,没有后续反馈的就先关闭了,如果再遇到问题,请另外提 issue。

@tisfeng tisfeng closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rare issue
Projects
None yet
Development

No branches or pull requests

8 participants
@jisuoqing @tisfeng @Lxnii @ZhangRuiMingZRM @tzcskys @zhyeJ @Jerry23011 and others