tisfeng / Easydict

一个简洁优雅的词典翻译 macOS App。开箱即用,支持离线 OCR 识别,支持有道词典,🍎 苹果系统词典,🍎 苹果系统翻译,OpenAI,Gemini,DeepL,Google,Bing,腾讯,百度,阿里,小牛,彩云和火山翻译。A concise and elegant Dictionary and Translator macOS App for looking up words and translating text.
GNU General Public License v3.0
6.4k stars 325 forks source link

🐞 反馈问题:自动闪退,尽管升级到了最新的Mac OS #547

Closed Mickychen00 closed 1 month ago

Mickychen00 commented 1 month ago

请先确认以下事项:

问题描述

我升级到最新easydict之后,总是经常自动在我未发现的情况下闪退,我经常在使用快捷键时候发觉easydict并未运行,经常需要重新打开。 Easydict log 2024-05-09 12-00-06-039.zip

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

可重现

重现步骤

每天都会发生好几次

截图

image

期望结果

别闪退了

解决方案(可选)

No response

设备型号 && 系统版本

Apple M1 Pro, 13.2.1 (22D68)

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

github-actions[bot] commented 1 month ago

Hello Mickychen00, Thank you for your first issue contribution 🎉

Mickychen00 commented 1 month ago

就在刚刚又闪退了。我再提供一下新的log Easydict log 2024-05-09 12-33-14-963.zip

tisfeng commented 1 month ago

看了一下上面提供的日志,确实每天都有好几次崩溃,好像一进入 Easydict,就在 SwiftUI 的某个地方崩溃了,这个问题很奇怪,我从来没有遇到过 😓

Signal Exception:
Signal SIGTRAP was raised.
Call Stack:
1   libsystem_platform.dylib            0x000000018c0042a4 _sigtramp + 56
2   AppKit                              0x000000018f61c7d4 -[NSApplication _crashOnException:] + 232
3   AppKit                              0x000000018f462c58 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 644
4   AppKit                              0x000000018fb40a28 ___NSRunLoopObserverCreateWithHandler_block_invoke + 64
5   CoreFoundation                      0x000000018c0b4db8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
6   CoreFoundation                      0x000000018c0b4ca4 __CFRunLoopDoObservers + 532
7   CoreFoundation                      0x000000018c0b42dc __CFRunLoopRun + 784
8   CoreFoundation                      0x000000018c0b3878 CFRunLoopRunSpecific + 612
9   HIToolbox                           0x0000000195793fa0 RunCurrentEventLoopInMode + 292
10  HIToolbox                           0x0000000195793de4 ReceiveNextEventCommon + 672
11  HIToolbox                           0x0000000195793b2c _BlockUntilNextEventMatchingListInModeWithFilter + 72
12  AppKit                              0x000000018f33984c _DPSNextEvent + 632
13  AppKit                              0x000000018f3389dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
14  AppKit                              0x000000018f32ce0c -[NSApplication run] + 464
15  AppKit                              0x000000018f304250 NSApplicationMain + 880
16  SwiftUI                             0x00000001b2d0741c OUTLINED_FUNCTION_8 + 8244
17  SwiftUI                             0x00000001b3ebcf4c OUTLINED_FUNCTION_11 + 188
18  SwiftUI                             0x00000001b36e0aa0 OUTLINED_FUNCTION_1 + 136
19  Easydict                            0x0000000104453408 Easydict + 865288
20  dyld                                0x000000018bcabe50 start + 2544
threadInfo:
<_NSMainThread: 0x6000004a0480>{number = 1, name = main}
tisfeng commented 1 month ago

我查看了一下 App Center 的崩溃记录,有不少用户遭遇了,显示崩溃在 EasydictApp.swift, line 21,没看明白这里的问题,你们帮忙来看一下吧 @phlpsong @AkaShark

https://github.com/tisfeng/Easydict/blob/d6d04b19d9906fb90b1cd0b71cec6f6cdd496dd1/Easydict/App/EasydictApp.swift#L21

image
AkaShark commented 1 month ago

okay

phlpsong commented 1 month ago

Could you kindly confirm if it's related to the extend display like this one https://github.com/tisfeng/Easydict/issues/542?

@tisfeng Do these bug only occur on specific OS version?

tisfeng commented 1 month ago

No, it looks like various devices and various versions have this problem.

That's all the info App Center has to offer, nothing more.

image
lleiwang commented 1 month ago

我在 #542 中同样返回该问题,以下是相关的系统信息:

系统情况

Macbook Pro 14" 2021 系统版本13.6 (22G120) 除笔记本自带屏幕外,扩展两块屏幕。

现象<可重现>

在笔记本屏幕使用划词快捷键翻译正常 在扩展屏幕中使用划词快捷键闪退

lleiwang commented 1 month ago

我在 #542 中同样返回该问题,以下是相关的系统信息:

系统情况

Macbook Pro 14" 2021 系统版本13.6 (22G120) 除笔记本自带屏幕外,扩展两块屏幕。

现象<可重现>

在笔记本屏幕使用划词快捷键翻译正常 在扩展屏幕中使用划词快捷键闪退

这是今天的崩溃日志 Crash(Signal) 2024-05-10 09:16:37.log Crash(Signal) 2024-05-10 16:33:58.log

希望相关日志对问题处理有所帮助,我看在 #542 中,升级系统版本好像可以解决相关问题,如需,我可以升级Mac系统验证下。

tisfeng commented 1 month ago

可以,建议先尝试升级系统到最新的 macOS 14 https://github.com/tisfeng/Easydict/issues/542#issuecomment-2104695464

lleiwang commented 1 month ago

可以,建议先尝试升级系统到最新的 macOS 14 #542 (comment)

原系统版本13,升级版本14后未再出现闪退问题。

tisfeng commented 1 month ago

ok,看样子确实和系统有关。

讲真,一般建议保持苹果系统更新,新版本除了带来一些新功能,苹果也默默修复了很多奇怪 bug,这些 bug 不是普通开发者能解决的,通常也没那么多精力去修 🙃

如果担心升级可能导致问题,可以延后一段时间更新,但应该保持大版本更新,比如目前最新系统是 macOS 14.4.1,都出了快一年了,已经比较稳定了,可以考虑适时更新到 macOS 14 了。

KingBaB commented 1 month ago

No, it looks like various devices and various versions have this problem.

That's all the info App Center has to offer, nothing more.

刚才我也试了一下,好像就是这个样子,稳定闪退

KingBaB commented 1 month ago

级可能导致问题,可以延后一段时间更新,但应该保持

那老电脑就不能最新版本了

Mickychen00 commented 1 month ago

ok,看样子确实和系统有关。

讲真,一般建议保持苹果系统更新,新版本除了带来一些新功能,苹果也默默修复了很多奇怪 bug,这些 bug 不是普通开发者能解决的,通常也没那么多精力去修 🙃

如果担心升级可能导致问题,可以延后一段时间更新,但应该保持大版本更新,比如目前最新系统是 macOS 14.4.1,都出了快一年了,已经比较稳定了,可以考虑适时更新到 macOS 14 了。

感谢,但是我根据您的建议更新到了macOS 14。闪退还在继续。请参见这个日志文件。 Easydict log 2024-05-13 17-43-47-309.zip

tisfeng commented 1 month ago

感谢反馈,从日志中确实看到了崩溃,但由于日志功能存在一些缺陷,导致 Easydict 启动就崩溃这种情况可能无法被完整记录,因此捕捉不到有用的日志信息。

建议使用 Xcode 开发者构建 本地运行试试 https://github.com/tisfeng/Easydict/issues/545#issuecomment-2107643808