Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

fatal: can not remove last element from an empty collection #6

Closed
zgover opened this issue Sep 12, 2021 · 4 comments
Closed

fatal: can not remove last element from an empty collection #6

zgover opened this issue Sep 12, 2021 · 4 comments

Comments

@zgover
Copy link

zgover commented Sep 12, 2021

Runtime error causing fatal crash when using finder extension toolbar actions

Error was present in prior versions as well

Steps to reproduce

  1. Enable finder extension in settings

image

  1. Add actions to finder toolbar

image

  1. Select 'Create link for'

image

  1. Attempts to use finder actions again will demonstrate proof of fatal crash, both finder actions and context actions will disappear until manually ending process and reopening application or log in/out or reboot.

Console crash report

Process:               quick-symlink-extension [56034]
Path:                  /Applications/Utilities/quick-symlink.app/Contents/PlugIns/quick-symlink-extension.appex/Contents/MacOS/quick-symlink-extension
Identifier:            org.ololx.quick-symlink.quick-symlink-extension
Version:               1.0 (1)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           quick-symlink-extension [56034]
User ID:               ***

Date/Time:             2021-09-11 08:49:13.739 -0500
OS Version:            macOS 11.5.2 (20G95)
Report Version:        12
Anonymous UUID:        0704A1A4-9780-5E31-3D9F-AF8CB5C7572D

Sleep/Wake UUID:       D8D99E98-AA45-4CD3-AFE2-79B50E9B21EC

Time Awake Since Boot: 840000 seconds
Time Since Wake:       45000 seconds

System Integrity Protection: enabled

Crashed Thread:        2  Dispatch queue: com.apple.NSXPCConnection.user.endpoint

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [56034]

Application Specific Information:
Fatal error: Can't remove last element from an empty collection
 

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff204a72ba mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff204a762c mach_msg + 60
2   com.apple.CoreFoundation      	0x00007fff205d5b2f __CFRunLoopServiceMachPort + 316
3   com.apple.CoreFoundation      	0x00007fff205d420f __CFRunLoopRun + 1328
4   com.apple.CoreFoundation      	0x00007fff205d361c CFRunLoopRunSpecific + 563
5   com.apple.HIToolbox           	0x00007fff28819a83 RunCurrentEventLoopInMode + 292
6   com.apple.HIToolbox           	0x00007fff288197e5 ReceiveNextEventCommon + 587
7   com.apple.HIToolbox           	0x00007fff28819583 _BlockUntilNextEventMatchingListInModeWithFilter + 70
8   com.apple.AppKit              	0x00007fff22ddb172 _DPSNextEvent + 864
9   com.apple.AppKit              	0x00007fff22dd9945 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1364
10  com.apple.AppKit              	0x00007fff22dcbc69 -[NSApplication run] + 586
11  com.apple.AppKit              	0x00007fff22d9fe6c NSApplicationMain + 816
12  libxpc.dylib                  	0x00007fff2022b3eb _xpc_objc_main + 919
13  libxpc.dylib                  	0x00007fff2022acd3 xpc_main + 116
14  com.apple.Foundation          	0x00007fff21384986 -[NSXPCListener resume] + 262
15  com.apple.pluginkit.framework 	0x00007fff2b0e0c17 0x7fff2b0c5000 + 113687
16  com.apple.pluginkit.framework 	0x00007fff2b0e089f 0x7fff2b0c5000 + 112799
17  com.apple.pluginkit.framework 	0x00007fff2b0e0fdd 0x7fff2b0c5000 + 114653
18  com.apple.ExtensionKit        	0x00007fff318f803c EXExtensionMain + 70
19  com.apple.Foundation          	0x00007fff213f360f NSExtensionMain + 208
20  libdyld.dylib                 	0x00007fff204f7f3d start + 1

Thread 1:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	0x00007fff204a72ba mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff204a762c mach_msg + 60
2   com.apple.CoreFoundation      	0x00007fff205d5b2f __CFRunLoopServiceMachPort + 316
3   com.apple.CoreFoundation      	0x00007fff205d420f __CFRunLoopRun + 1328
4   com.apple.CoreFoundation      	0x00007fff205d361c CFRunLoopRunSpecific + 563
5   com.apple.AppKit              	0x00007fff22f6123a _NSEventThread + 124
6   libsystem_pthread.dylib       	0x00007fff204dc8fc _pthread_start + 224
7   libsystem_pthread.dylib       	0x00007fff204d8443 thread_start + 15

Thread 2 Crashed:: Dispatch queue: com.apple.NSXPCConnection.user.endpoint
0   libswiftCore.dylib            	0x0000000107f02170 specialized _fatalErrorMessage(_:_:file:line:flags:) + 96
1   libswiftCore.dylib            	0x0000000107d4b7ae RangeReplaceableCollection<A>.removeLast() + 590
2   org.ololx.quick-symlink.quick-symlink-extension	0x0000000107ca0c0b CopyPathAction.execute() + 699
3   org.ololx.quick-symlink.quick-symlink-extension	0x0000000107c983b7 FinderSync.copyPathToClipboard(_:) + 119
4   org.ololx.quick-symlink.quick-symlink-extension	0x0000000107c98408 @objc FinderSync.copyPathToClipboard(_:) + 56
5   com.apple.finder.FinderSync   	0x00007fff6ea3265e -[FIFinderSyncExtension executeCommandWithMenuItemDictionary:target:items:] + 298
6   com.apple.Foundation          	0x00007fff213c91be __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S3__ + 10
7   com.apple.Foundation          	0x00007fff2136db6f -[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 2246
8   com.apple.Foundation          	0x00007fff21325039 message_handler + 206
9   libxpc.dylib                  	0x00007fff20222c24 _xpc_connection_call_event_handler + 56
10  libxpc.dylib                  	0x00007fff20221a9b _xpc_connection_mach_event + 938
11  libdispatch.dylib             	0x00007fff203328a6 _dispatch_client_callout4 + 9
12  libdispatch.dylib             	0x00007fff20349aa0 _dispatch_mach_msg_invoke + 444
13  libdispatch.dylib             	0x00007fff20338493 _dispatch_lane_serial_drain + 263
14  libdispatch.dylib             	0x00007fff2034a5e2 _dispatch_mach_invoke + 484
15  libdispatch.dylib             	0x00007fff20338493 _dispatch_lane_serial_drain + 263
16  libdispatch.dylib             	0x00007fff203390e0 _dispatch_lane_invoke + 417
17  libdispatch.dylib             	0x00007fff20342c0d _dispatch_workloop_worker_thread + 811
18  libsystem_pthread.dylib       	0x00007fff204d945d _pthread_wqthread + 314
19  libsystem_pthread.dylib       	0x00007fff204d842f start_wqthread + 15

Thread 2 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000001e0b  rbx: 0x0000000108098680  rcx: 0x0000000000000000  rdx: 0x00000000000aea80
  rdi: 0x000000010842a080  rsi: 0x0000000108876e00  rbp: 0x0000700004967ba0  rsp: 0x0000700004967b70
   r8: 0x0000000000000030   r9: 0x0000000000000003  r10: 0x00007f8e0de00000  r11: 0x00007f8e0de46f40
  r12: 0x0000000108097b79  r13: 0x000000000000000b  r14: 0x0000000000000002  r15: 0x0000000000000032
  rip: 0x0000000107f02170  rfl: 0x0000000000010202  cr2: 0x00000001028f7000
  
Logical CPU:     3
Error Code:      0x00000000
Trap Number:     6
@ololx
Copy link
Owner

ololx commented Sep 13, 2021

Hi, @zgover,
I didn't reproduced this on my machine; But I think I figured out where this error occurs and will try to fix it today. After my main job.
Thanks for finding this bug and reporting it.

@zgover
Copy link
Author

zgover commented Sep 13, 2021

@ololx feel free to share your reason, I can always contribute and make a PR if I get enough downtime to debug and fix before you do.

@ololx
Copy link
Owner

ololx commented Sep 13, 2021

@zgover,
Could you be so kind to check this fast fix and let me know that everything is fine.

I also wanted to warn you that before completing work on #3, I want to refactor the code - it is already starting to resemble a trash can =)
I will continue to keep you up to date with the development process.

@zgover
Copy link
Author

zgover commented Sep 14, 2021

@ololx confirmed, the recent release v0.8.1 has fixed the finder extension toolbar crash.

@zgover zgover closed this as completed Sep 14, 2021
Repository owner locked and limited conversation to collaborators Jul 4, 2024
@ololx ololx converted this issue into discussion #20 Jul 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants