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

未選取字詞時,使用劃詞翻譯快捷鍵將導致應用退出 #644

Closed
5 of 6 tasks
gang83211 opened this issue Aug 14, 2024 · 4 comments
Closed
5 of 6 tasks
Assignees
Labels
bug Something isn't working fixed in next release The issue will be closed once next release is available

Comments

@gang83211
Copy link

请先确认以下事项:

  • 请务必查看 常见问题
  • 已仔细阅读了 README
  • issues 页面搜索过问题(包括已关闭的 issue),但未能找到解决方法
  • Easydict 已升级到 最新版本
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述

當通用設置為

  • 允許強制取詞:false
  • 劃詞翻譯未選中文本時,保留上次結果:false

在滑鼠游標未選取任何字詞時,按下劃詞翻譯的快速鍵,將導致應用退出

该问题是否可以稳定重现?

可重现

重现步骤

同問題描述設置即可重現

截图

2024-08-14_23-12-54.mp4

运行日志

[2024-08-14 23:04:30.478 ● EZWindowManager ● 707 ● ℹ️] -[EZWindowManager selectTextTranslate] ● selectTextTranslate
[2024-08-14 23:04:30.478 ● EZEventMonitor ● 585 ● ℹ️] -[EZEventMonitor isAccessibilityEnabled] ● accessibilityEnabled: 1
[2024-08-14 23:04:30.479 ● EZWindowManager ● 720 ● ℹ️] -[EZWindowManager selectTextTranslate] ● selectTextTranslate windowType: 1
[2024-08-14 23:04:30.545 ● EZEventMonitor ● 516 ● ℹ️] -[EZEventMonitor getSelectedTextByAccessibility:] ● --> Accessibility getText success:
[2024-08-14 23:04:30.545 ● EZWindowManager ● 310 ● ℹ️] -[EZWindowManager showFloatingWindowType:queryText:autoQuery:actionType:atPoint:completionHandler:] ● show floating windowType: 1, queryText: (null), autoQuery: 1, actionType: shortcut_query, atPoint: NSPoint: {722.3359375, 471.140625}
[2024-08-14 23:04:30.554 ● EZBingService ● 26 ● ℹ️] -[EZBingService init] ● init Bing service
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZBuiltInAIService: 0x6000022b8990>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZDeepLTranslate: 0x600003fe6100>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZOpenAIService: 0x6000022b8a20>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZGeminiService: 0x6000022b8ab0>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZPolishingService: 0x6000022b8bd0>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZSummaryService: 0x6000022b8c60>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZCustomOpenAIService: 0x6000022b8cf0>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZBaiduTranslate: 0x6000024b2880>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZBingService: 0x600003a10bd0>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZVolcanoTranslate: 0x600003a11a40>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZNiuTransTranslate: 0x600003a11180>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZCaiyunService: 0x600003a134f0>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZTencentService: 0x6000035fb000>
[2024-08-14 23:04:30.559 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZAliService: 0x6000020b61c0>
[2024-08-14 23:04:30.563 ● EZQueryService ● 43 ● ℹ️] -[EZQueryService dealloc] ● dealloc service: <EZOllamaService: 0x6000022b8b40>

期望结果

當未選取字詞時,若不小心按下劃詞翻譯快捷鍵,應無任何反應,不要讓應用崩潰退出

解决方案(可选)

將「劃詞翻譯未選中文本時,保留上次結果」設為true 可暫時避免崩潰退出的問題,但就失去此設置選項的意義了

设备型号 && 系统版本

Apple M3 Max, macOS Sonoma 14.4.1

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

  • 我愿意提交 PR 来解决该问题
@gang83211 gang83211 added the bug Something isn't working label Aug 14, 2024
Copy link

Hello gang83211, Thank you for your first issue contribution 🎉

@tisfeng
Copy link
Owner

tisfeng commented Aug 14, 2024

ok,明白了,稍后我们会修复它。

@tisfeng tisfeng self-assigned this Aug 14, 2024
@tisfeng
Copy link
Owner

tisfeng commented Aug 15, 2024

查了一下,发现当设置快捷键划词窗口类型为 mini 窗口,未开启【划词翻译未选中文本时,保留上次结果】,并且显示 tips view 时,使用快捷键取词内容为空时就会导致崩溃。

临时的解决办法是,在设置-高级里面关闭提示视图。

过两天会发个修复版本,将会修复该问题。

49054 91018

@tisfeng tisfeng added the fixed in next release The issue will be closed once next release is available label Aug 15, 2024
@tisfeng
Copy link
Owner

tisfeng commented Aug 18, 2024

2.8.1 版本已修复该问题。

@tisfeng tisfeng closed this as completed Aug 18, 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 fixed in next release The issue will be closed once next release is available
Projects
None yet
Development

No branches or pull requests

2 participants