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

🐞 Bug Report: Crash when trying to use Apple Dictionary for translation #526

Open
5 of 6 tasks
pollymow opened this issue Apr 28, 2024 · 9 comments
Open
5 of 6 tasks
Labels
bug Something isn't working

Comments

@pollymow
Copy link

Please confirm the following:

  • Be sure to check out FAQ
  • I have carefully read the README
  • I have searched through the issues page but couldn't find a solution.(Including issue that has been closed)
  • Easydict has been upgraded to the latest version
  • I understand and agree to the above, and understand that the project maintainer has limited energy, issues that do not follow the rules may be ignored or closed directly

Problem description

Whenever I select Apple Dictionary in EasyDict I get the following crash on translation:

Is the issue consistently reproducible?

Reproducible

Steps to Reproduce

Activate Apple Dictionary in the settings.
Type a search string in the search window, you activated Apple Dictionary for.
Click on the disclosure > on the right to see the translation by Apple Dictionary.
Crash. 100% reliably. Crashes each and every time.
→ Apple Dictionary cannot be used for translation in EasyDict.

Screenshot


Translated Report (Full Report Below)

Process: Easydict [11521]
Path: /Applications/Easydict.app/Contents/MacOS/Easydict
Identifier: com.izual.Easydict
Version: 2.6.1 (33)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 504

Date/Time: 2024-04-28 15:58:54.9463 +0200
OS Version: macOS 14.4.1 (23E224)
Report Version: 12
Anonymous UUID: 7BB40B81-71F8-6303-5A21-B2CE6A6FC1E3

Sleep/Wake UUID: DFF1CA2D-933A-4FFA-8E76-BC268F1BBA57

Time Awake Since Boot: 18000 seconds
Time Since Wake: 783 seconds

System Integrity Protection: enabled

Crashed Thread: 3 Dispatch queue: com.apple.root.default-qos

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called

Thread 0:: Dispatch queue: com.apple.main-thread
0 CoreFoundation 0x7ff80377e9b0 CFStringHashCString + 53
1 CoreFoundation 0x7ff803742d7e -[__NSDictionaryM objectForKey:] + 99
2 CoreFoundation 0x7ff80375bb0c -[NSMutableDictionary __addObject:forKey:] + 98
3 CoreFoundation 0x7ff8037a0b62 ___CFPrefsDeliverPendingKVONotificationsGuts_block_invoke_3 + 38
4 CoreFoundation 0x7ff80375b9d9 -[__NSFrozenDictionaryM __apply:context:] + 102
5 CoreFoundation 0x7ff8037a0a22 ___CFPrefsDeliverPendingKVONotificationsGuts_block_invoke + 324
6 CoreFoundation 0x7ff8037a08c8 __CFDictionaryApplyFunction_block_invoke + 22
7 CoreFoundation 0x7ff803767d90 CFBasicHashApply + 127
8 CoreFoundation 0x7ff80375b952 CFDictionaryApplyFunction + 162
9 CoreFoundation 0x7ff8037a0836 _CFPrefsDeliverPendingKVONotificationsGuts + 263
10 CoreFoundation 0x7ff80374c6b6 -[_CFXPreferences _deliverPendingKVONotifications] + 90
11 CoreFoundation 0x7ff8038837cc -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 305
12 CoreFoundation 0x7ff803761954 __41-[_CFXPreferences registerDefaultValues:]_block_invoke + 99
13 CoreFoundation 0x7ff80374b615 withKeysAndValues + 244
14 CoreFoundation 0x7ff8037618d6 -[_CFXPreferences registerDefaultValues:] + 79
15 CoreFoundation 0x7ff803761863 _CFXPreferencesRegisterDefaultValues + 76
16 Foundation 0x7ff80465bb6f -[NSUserDefaults(NSUserDefaults) registerDefaults:] + 255
17 Easydict 0x10b15a09c 0x10b044000 + 1138844
18 Easydict 0x10b1879cd 0x10b044000 + 1325517
19 Easydict 0x10b186acf 0x10b044000 + 1321679
20 Easydict 0x10b057d3c 0x10b044000 + 81212
21 Easydict 0x10b0bc0be 0x10b044000 + 491710
22 Easydict 0x10b0d5a2f 0x10b044000 + 596527
23 Easydict 0x10b0d585e 0x10b044000 + 596062
24 Easydict 0x10b0d7c02 0x10b044000 + 605186
25 Easydict 0x10b1194fa 0x10b044000 + 873722
26 Easydict 0x10b118f61 0x10b044000 + 872289
27 Easydict 0x10b0ede6e 0x10b044000 + 695918
28 Easydict 0x10b118c8d 0x10b044000 + 871565
29 Easydict 0x10b0d7b00 0x10b044000 + 604928
30 Easydict 0x10b0d57c7 0x10b044000 + 595911
31 libdispatch.dylib 0x7ff80351fac6 _dispatch_call_block_and_release + 12
32 libdispatch.dylib 0x7ff803520dbc _dispatch_client_callout + 8
33 libdispatch.dylib 0x7ff80352d1df _dispatch_main_queue_drain + 984
34 libdispatch.dylib 0x7ff80352cdf9 _dispatch_main_queue_callback_4CF + 31
35 CoreFoundation 0x7ff8037deb6a CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9
36 CoreFoundation 0x7ff80379e210 __CFRunLoopRun + 2463
37 CoreFoundation 0x7ff80379d2a9 CFRunLoopRunSpecific + 557
38 HIToolbox 0x7ff80e688829 RunCurrentEventLoopInMode + 292
39 HIToolbox 0x7ff80e688636 ReceiveNextEventCommon + 665
40 HIToolbox 0x7ff80e688381 _BlockUntilNextEventMatchingListInModeWithFilter + 66
41 AppKit 0x7ff806d66be5 _DPSNextEvent + 880
42 AppKit 0x7ff807676fe9 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1273
43 AppKit 0x7ff806d58005 -[NSApplication run] + 603
44 AppKit 0x7ff806d2bff1 NSApplicationMain + 816
45 Easydict 0x10b131de7 0x10b044000 + 974311
46 dyld 0x7ff803336366 start + 1942

Thread 1:
0 libsystem_pthread.dylib 0x7ff8036bdac0 start_wqthread + 0

Thread 2:
0 libsystem_pthread.dylib 0x7ff8036bdac0 start_wqthread + 0

Thread 3 Crashed:: Dispatch queue: com.apple.root.default-qos
0 libsystem_kernel.dylib 0x7ff80368914a __pthread_kill + 10
1 libsystem_pthread.dylib 0x7ff8036c1ebd pthread_kill + 262
2 libsystem_c.dylib 0x7ff8035e7a39 abort + 126
3 Easydict 0x10b884ccd plcrash::async::gnu_ehptr_reader::read(plcrash_async_mobject*, unsigned long long, long long, plcrash::async::DW_EH_PE, unsigned long long*, unsigned long*) + 69557
4 Easydict 0x10b882896 plcrash::async::gnu_ehptr_reader::read(plcrash_async_mobject*, unsigned long long, long long, plcrash::async::DW_EH_PE, unsigned long long*, unsigned long*) + 60286
5 CoreFoundation 0x7ff8038aa864 __handleUncaughtException + 967
6 libobjc.A.dylib 0x7ff80330a2b1 _objc_terminate() + 90
7 Easydict 0x10b811d8b 0x10b044000 + 8183179
8 libc++abi.dylib 0x7ff803679d8b std::__terminate(void (*)()) + 6
9 libc++abi.dylib 0x7ff803679d46 std::terminate() + 54
10 libdispatch.dylib 0x7ff803520dd0 _dispatch_client_callout + 28
11 libdispatch.dylib 0x7ff80352204e _dispatch_once_callout + 20
12 Easydict 0x10b0ca822 0x10b044000 + 550946
13 Easydict 0x10b112f9c 0x10b044000 + 847772
14 libdispatch.dylib 0x7ff80351fac6 _dispatch_call_block_and_release + 12
15 libdispatch.dylib 0x7ff803520dbc _dispatch_client_callout + 8
16 libdispatch.dylib 0x7ff80352361b _dispatch_queue_override_invoke + 961
17 libdispatch.dylib 0x7ff8035300ab _dispatch_root_queue_drain + 328
18 libdispatch.dylib 0x7ff80353084f _dispatch_worker_thread2 + 152
19 libsystem_pthread.dylib 0x7ff8036beb43 _pthread_wqthread + 262
20 libsystem_pthread.dylib 0x7ff8036bdacf start_wqthread + 15

Thread 4:
0 libsystem_pthread.dylib 0x7ff8036bdac0 start_wqthread + 0

Thread 5:
0 libsystem_pthread.dylib 0x7ff8036bdac0 start_wqthread + 0

Thread 6:
0 libsystem_pthread.dylib 0x7ff8036bdac0 start_wqthread + 0

Thread 7:
0 libsystem_kernel.dylib 0x7ff8036823ce mach_msg2_trap + 10
1 libsystem_kernel.dylib 0x7ff803690c88 mach_msg2_internal + 84
2 libsystem_kernel.dylib 0x7ff803689510 mach_msg_overwrite + 653
3 libsystem_kernel.dylib 0x7ff8036826bd mach_msg + 19
4 Easydict 0x10b87bac5 plcrash::async::gnu_ehptr_reader::read(plcrash_async_mobject*, unsigned long long, long long, plcrash::async::DW_EH_PE, unsigned long long*, unsigned long*) + 32173
5 libsystem_pthread.dylib 0x7ff8036c218b _pthread_start + 99
6 libsystem_pthread.dylib 0x7ff8036bdae3 thread_start + 15

Thread 8:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x7ff8036823ce mach_msg2_trap + 10
1 libsystem_kernel.dylib 0x7ff803690c88 mach_msg2_internal + 84
2 libsystem_kernel.dylib 0x7ff803689510 mach_msg_overwrite + 653
3 libsystem_kernel.dylib 0x7ff8036826bd mach_msg + 19
4 CoreFoundation 0x7ff80379f359 __CFRunLoopServiceMachPort + 143
5 CoreFoundation 0x7ff80379ddcc __CFRunLoopRun + 1371
6 CoreFoundation 0x7ff80379d2a9 CFRunLoopRunSpecific + 557
7 AppKit 0x7ff806ec3abc _NSEventThread + 122
8 libsystem_pthread.dylib 0x7ff8036c218b _pthread_start + 99
9 libsystem_pthread.dylib 0x7ff8036bdae3 thread_start + 15

Thread 9:
0 libsystem_pthread.dylib 0x7ff8036bdac0 start_wqthread + 0

Thread 10:
0 libsystem_pthread.dylib 0x7ff8036bdac0 start_wqthread + 0

Thread 11:
0 libsystem_pthread.dylib 0x7ff8036bdac0 start_wqthread + 0

Thread 12:: Dispatch queue: com.google.fira.worker
0 libobjc.A.dylib 0x7ff8032f48bc objc_retain + 12
1 Easydict 0x10b9be6a5 0x10b044000 + 9938597
2 Easydict 0x10b9c0944 0x10b044000 + 9947460
3 Easydict 0x10b9a719d 0x10b044000 + 9843101
4 Easydict 0x10b9ae403 0x10b044000 + 9872387
5 Easydict 0x10b9be7b6 0x10b044000 + 9938870
6 Easydict 0x10b9b7405 0x10b044000 + 9909253
7 Easydict 0x10b9a719d 0x10b044000 + 9843101
8 Easydict 0x10b9ae403 0x10b044000 + 9872387
9 Easydict 0x10b9b4d42 0x10b044000 + 9899330
10 Easydict 0x10b9b4e96 0x10b044000 + 9899670
11 Easydict 0x10b9a719d 0x10b044000 + 9843101
12 Easydict 0x10b9ae5b7 0x10b044000 + 9872823
13 Easydict 0x10b9a8850 0x10b044000 + 9848912
14 Easydict 0x10b9aa165 0x10b044000 + 9855333
15 Easydict 0x10b9a719d 0x10b044000 + 9843101
16 Easydict 0x10b9ae5b7 0x10b044000 + 9872823
17 Easydict 0x10b9b267e 0x10b044000 + 9889406
18 Easydict 0x10b9b24da 0x10b044000 + 9888986
19 Easydict 0x10b9b6143 0x10b044000 + 9904451
20 Easydict 0x10b9a8796 0x10b044000 + 9848726
21 Easydict 0x10b9aa165 0x10b044000 + 9855333
22 Easydict 0x10b9a719d 0x10b044000 + 9843101
23 Easydict 0x10b9ae403 0x10b044000 + 9872387
24 Easydict 0x10b9a94bf 0x10b044000 + 9852095
25 Easydict 0x10b9aa165 0x10b044000 + 9855333
26 Easydict 0x10b9a719d 0x10b044000 + 9843101
27 Easydict 0x10b9ae5b7 0x10b044000 + 9872823
28 Easydict 0x10b9b267e 0x10b044000 + 9889406
29 Easydict 0x10b9b24da 0x10b044000 + 9888986
30 Easydict 0x10b9b1720 0x10b044000 + 9885472
31 Easydict 0x10b9a719d 0x10b044000 + 9843101
32 Easydict 0x10b9ae403 0x10b044000 + 9872387
33 Easydict 0x10b9be7b6 0x10b044000 + 9938870
34 Easydict 0x10b9a9806 0x10b044000 + 9852934
35 Easydict 0x10b9aa165 0x10b044000 + 9855333
36 Easydict 0x10b9a719d 0x10b044000 + 9843101
37 Easydict 0x10b9ae5b7 0x10b044000 + 9872823
38 Easydict 0x10b9b267e 0x10b044000 + 9889406
39 Easydict 0x10b9b24da 0x10b044000 + 9888986
40 Easydict 0x10b9ab01b 0x10b044000 + 9859099
41 Easydict 0x10b9aaea7 0x10b044000 + 9858727
42 Easydict 0x10b9af8c1 0x10b044000 + 9877697
43 Easydict 0x10b97a513 0x10b044000 + 9659667
44 Easydict 0x10b97a029 0x10b044000 + 9658409
45 Easydict 0x10b96bf32 0x10b044000 + 9600818
46 Easydict 0x10b96bd64 0x10b044000 + 9600356
47 Easydict 0x10b96bbf3 0x10b044000 + 9599987
48 Easydict 0x10b9c563f 0x10b044000 + 9967167
49 libdispatch.dylib 0x7ff80351fac6 _dispatch_call_block_and_release + 12
50 libdispatch.dylib 0x7ff803520dbc _dispatch_client_callout + 8
51 libdispatch.dylib 0x7ff803526eff _dispatch_lane_serial_drain + 800
52 libdispatch.dylib 0x7ff803527997 _dispatch_lane_invoke + 377
53 libdispatch.dylib 0x7ff803531414 _dispatch_root_queue_drain_deferred_wlh + 271
54 libdispatch.dylib 0x7ff803530d2a _dispatch_workloop_worker_thread + 451
55 libsystem_pthread.dylib 0x7ff8036beb84 _pthread_wqthread + 327
56 libsystem_pthread.dylib 0x7ff8036bdacf start_wqthread + 15

Thread 13:
0 libsystem_pthread.dylib 0x7ff8036bdac0 start_wqthread + 0

Thread 14:: JavaScriptCore libpas scavenger
0 libsystem_kernel.dylib 0x7ff803684f7a __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x7ff8036c26f3 _pthread_cond_wait + 1211
2 JavaScriptCore 0x7ff8227c26b5 scavenger_thread_main + 1541
3 libsystem_pthread.dylib 0x7ff8036c218b _pthread_start + 99
4 libsystem_pthread.dylib 0x7ff8036bdae3 thread_start + 15

Thread 3 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x000070000c9597b8 rdx: 0x0000000000000000
rdi: 0x000000000000ab03 rsi: 0x0000000000000006 rbp: 0x000070000c9597e0 rsp: 0x000070000c9597b8
r8: 0x031dfff846a8f541 r9: 0x0000000000000004 r10: 0x0000000000000000 r11: 0x0000000000000246
r12: 0x000000000000ab03 r13: 0x00006000018cc4b0 r14: 0x000070000c95a000 r15: 0x0000000000000016
rip: 0x00007ff80368914a rfl: 0x0000000000000246 cr2: 0x0000000000000000

Logical CPU: 0
Error Code: 0x020000b8
Trap Number: 133

Expected result

No crash.

Proposed solution (optional)

No response

Device type and OS version

MacPro, Sonoma 14.4.1 and older Sonoma versions.

Are you willing to submit a PR to fix this issue?

  • I'm willing to submit a PR
@pollymow pollymow added the bug Something isn't working label Apr 28, 2024
Copy link

Hello pollymow, Thank you for your first issue contribution 🎉

@pollymow pollymow changed the title 🐞 Bug Report: Please fill in the title, don't leave it blank 🐞 Bug Report: Crash when trying to use Apple Dictionary for translation Apr 28, 2024
@tisfeng
Copy link
Owner

tisfeng commented Apr 29, 2024

For app crash issues, be sure to provide export logs.

image

@pollymow
Copy link
Author

MMLogs.zip
Added logs.

@tisfeng
Copy link
Owner

tisfeng commented Apr 29, 2024

It's a strange issue. I couldn't reproduce it, even when using Apple Dictionary for translation. Theoretically, it shouldn't cause the application to crash, but rather just result in no output.

I carefully examined the two logs you provided, but didn't find the cause of the problem.

It may be necessary for you to provide more contextual information so that we can pinpoint the issue.

If you can reproduce it consistently, could you please record a complete video? It would be helpful for us.

image

@tisfeng
Copy link
Owner

tisfeng commented Apr 29, 2024

Have you tried uninstalling and reinstalling Easydict? This often resolves some strange bugs.

@Jerry23011
Copy link
Collaborator

Could this be an intel Mac specific issue?
I noticed this in the logs:

Thread 3 crashed with X86 Thread State (64-bit):

@pollymow To confirm, are you using an intel Mac, and what's your system language & destination language

@pollymow
Copy link
Author

pollymow commented Apr 30, 2024

Yes, Intel Mac. System language German, destination language German or English, but the latter does not seem to be relevant.
One more observation: Easydict does not crash when I use a query string which is not appropriate for Apple Dictionary.
Example: I use "destination language" as a query string. When I click the disclosure triangle I get "Query failed, ⚠ No results found" - which, BTW, is the same result @tisfeng sees in his screenshot above. But when I then delete "language" from the query string so that "destination" is left, I get an instant crash. So to see the crash, it is necessary to use single words. Try "green" for instance.
One more observation: I have a lot of dictionaries registered in Apple Dictionary, many different languages. When I search for the same strings in Apple's Dictionary App, the queries all succeed, but mostly they have very many (>1000) results. When querying "green", for instance, I get a list of results with the notification "more than 1000 found". Maybe Easydict is somehow overloaded by the amount of possible results?

@tisfeng
Copy link
Owner

tisfeng commented May 1, 2024

This is possible. First, I need to make it clear that the Apple Dictionary feature is implemented using DictionaryKit, which uses Apple's private API, so we cannot guarantee its stability.

I have a lot of dictionaries registered in Apple Dictionary

I suggest you try turning off any additional dictionaries you've added and only use the system's built-in dictionary to see if Easydict works properly.

It's best not to add too many dictionaries, especially ones with a lot of content, as this can easily lead to issues such as slower query speeds.

@tisfeng
Copy link
Owner

tisfeng commented May 13, 2024

If there is no feedback, we will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants