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

Crash in NSMutableParagraphStyle setParagraphStyle #11231

Closed
cyberduck opened this issue Nov 10, 2020 · 25 comments
Closed

Crash in NSMutableParagraphStyle setParagraphStyle #11231

cyberduck opened this issue Nov 10, 2020 · 25 comments

Comments

@cyberduck
Copy link
Collaborator

2fd7f3b created the issue

I have never been able to get any version (including nightly builds) of Cyberduck to load and run using any public beta of MacOS 11 Big Sur, including the latest final release candidate.

The error message I get is below.

rocess:               Cyberduck [94544]
Path:                  /private/var/folders/*/Cyberduck.app/Contents/MacOS/Cyberduck
Identifier:            ch.sudo.cyberduck
Version:               7.7.0 (33744)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Cyberduck [94544]
User ID:               501

Date/Time:             2020-11-10 14:09:47.236 -0500
OS Version:            macOS 11.0.1 (20B5022a)
Report Version:        12
Anonymous UUID:        E2C825AF-3E48-E6EF-1FBF-AF314205A3D1


Time Awake Since Boot: 27000 seconds

System Integrity Protection: enabled

Notes:                 Translocated Process

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x00000001062ae008
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x1062ae008:
    __LINKEDIT                  10629c000-1062ae000    [   72K] r--/rwx SM=COW  /var/folders/*/Cyberduck.app/Contents/PlugIns/Runtime.jre/Contents/Home/lib/libjava.dylib
--> VM_ALLOCATE                 1062ae000-1062af000    [    4K] ---/rwx SM=NUL  
    VM_ALLOCATE                 1062af000-1062b0000    [    4K] r--/rwx SM=PRV  

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
abort() called
terminating with uncaught exception of type NSException

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff204c16af __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00007fff201f93c9 objc_exception_throw + 48
2   CoreFoundation                      0x00007fff20575a9a -[__NSCFString characterAtIndex:].cold.1 + 0
3   CoreFoundation                      0x00007fff20573953 -[__NSArrayM insertObject:atIndex:].cold.2 + 0
4   CoreFoundation                      0x00007fff203e7411 -[__NSArrayM insertObject:atIndex:] + 1135
5   UIFoundation                        0x00007fff239e6b4b __defaultTabStops_block_invoke + 161
6   libdispatch.dylib                   0x00007fff201a47c7 _dispatch_client_callout + 8
7   libdispatch.dylib                   0x00007fff201a596b _dispatch_once_callout + 20
8   UIFoundation                        0x00007fff239e6aa8 -[NSParagraphStyle tabStops] + 51
9   UIFoundation                        0x00007fff23a00fb1 -[NSMutableParagraphStyle setParagraphStyle:] + 283
10  libjnidispatch.dylib                0x0000000106651e74 ffi_call_unix64 + 76
11  ???                                 0x00007ffee9b900a8 0x0 + 140732819636392

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff20321462 __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff2034f610 pthread_kill + 263
2   libsystem_c.dylib             	0x00007fff202a2720 abort + 120
3   libc++abi.dylib               	0x00007fff20314418 abort_message + 231
4   libc++abi.dylib               	0x00007fff20305a7d demangling_terminate_handler() + 266
5   libobjc.A.dylib               	0x00007fff201fb9b1 _objc_terminate() + 96
6   libc++abi.dylib               	0x00007fff20313847 std::__terminate(void (*)()) + 8
7   libc++abi.dylib               	0x00007fff203137e9 std::terminate() + 41
8   libdispatch.dylib             	0x00007fff201a47db _dispatch_client_callout + 28
9   libdispatch.dylib             	0x00007fff201a596b _dispatch_once_callout + 20
10  com.apple.UIFoundation        	0x00007fff239e6aa8 -[NSParagraphStyle tabStops] + 51
11  com.apple.UIFoundation        	0x00007fff23a00fb1 -[NSMutableParagraphStyle setParagraphStyle:] + 283
12  libjnidispatch.dylib          	0x0000000106651e74 ffi_call_unix64 + 76
13  libjnidispatch.dylib          	0x000000010665143d ffi_call + 1005

Attachments

@cyberduck
Copy link
Collaborator Author

@dkocher commented

#11239 closed as duplicate.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Unfortunately we have not yet been able to reproduce the crash.

@cyberduck
Copy link
Collaborator Author

2fd7f3b commented

As FYI, my system is an iMac Retina 5K, 27-inch, purchased new in November 2019, so a relatively recent machine.

3.7 GHz 6-core Intel Core i5, 40GB 2667 MHz DDR4

Thank you for looking into this. It appears another person had a similar crash, and you consolidated the ticket into this one.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

#11244 closed as duplicate.

@cyberduck
Copy link
Collaborator Author

f88a66a commented

So, I grabbed the 7.7.1 build and that also crashes on launch under mac os 11.0.1. here's the crashlog for 7.7.1:

Process:               Cyberduck [39777]
Path:                  /private/var/folders/*/Cyberduck.app/Contents/MacOS/Cyberduck
Identifier:            ch.sudo.cyberduck
Version:               7.7.1 (33767)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Cyberduck [39777]
User ID:               502

Date/Time:             2020-11-16 13:08:09.546 -0500
OS Version:            macOS 11.0.1 (20B29)
Report Version:        12
Bridge OS Version:     5.0.1 (18P2561)
Anonymous UUID:        EBC421C2-D218-73AC-8D5A-02EEC0059F0F

Sleep/Wake UUID:       943E540A-3E07-4C7B-A553-BA8C24DEB3CE

Time Awake Since Boot: 180000 seconds
Time Since Wake:       1400 seconds

System Integrity Protection: enabled

Notes:                 Translocated Process

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x00000001078fd008
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x1078fd008:
    __LINKEDIT                  1078eb000-1078fd000    [   72K] r--/rwx SM=COW  /var/folders/*/Cyberduck.app/Contents/PlugIns/Runtime.jre/Contents/Home/lib/libjava.dylib
--> VM_ALLOCATE                 1078fd000-1078fe000    [    4K] ---/rwx SM=NUL  
    VM_ALLOCATE                 1078fe000-1078ff000    [    4K] r--/rwx SM=PRV  

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
abort() called
terminating with uncaught exception of type NSException

@cyberduck
Copy link
Collaborator Author

f88a66a commented

So, I grabbed the 7.7.1 build and that *also* crashes on launch under mac os 11.0.1. here's the crashlog for 7.7.1:

Process:               Cyberduck [39777]
Path:                  /private/var/folders/*/Cyberduck.app/Contents/MacOS/Cyberduck
Identifier:            ch.sudo.cyberduck
Version:               7.7.1 (33767)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Cyberduck [39777]
User ID:               502

Date/Time:             2020-11-16 13:08:09.546 -0500
OS Version:            macOS 11.0.1 (20B29)
Report Version:        12
Bridge OS Version:     5.0.1 (18P2561)
Anonymous UUID:        EBC421C2-D218-73AC-8D5A-02EEC0059F0F

Sleep/Wake UUID:       943E540A-3E07-4C7B-A553-BA8C24DEB3CE

Time Awake Since Boot: 180000 seconds
Time Since Wake:       1400 seconds

System Integrity Protection: enabled

Notes:                 Translocated Process

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x00000001078fd008
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x1078fd008:
    __LINKEDIT                  1078eb000-1078fd000    [   72K] r--/rwx SM=COW  /var/folders/*/Cyberduck.app/Contents/PlugIns/Runtime.jre/Contents/Home/lib/libjava.dylib
--> VM_ALLOCATE                 1078fd000-1078fe000    [    4K] ---/rwx SM=NUL  
    VM_ALLOCATE                 1078fe000-1078ff000    [    4K] r--/rwx SM=PRV  

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
abort() called
terminating with uncaught exception of type NSException

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff204ba6af __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00007fff201f23c9 objc_exception_throw + 48
2   CoreFoundation                      0x00007fff2056ea9a -[__NSCFString characterAtIndex:].cold.1 + 0
3   CoreFoundation                      0x00007fff2056c953 -[__NSArrayM insertObject:atIndex:].cold.2 + 0
4   CoreFoundation                      0x00007fff203e0411 -[__NSArrayM insertObject:atIndex:] + 1135
5   UIFoundation                        0x00007fff239e5b4b __defaultTabStops_block_invoke + 161
6   libdispatch.dylib                   0x00007fff2019d7c7 _dispatch_client_callout + 8
7   libdispatch.dylib                   0x00007fff2019e96b _dispatch_once_callout + 20
8   UIFoundation                        0x00007fff239e5aa8 -[NSParagraphStyle tabStops] + 51
9   UIFoundation                        0x00007fff239fffb1 -[NSMutableParagraphStyle setParagraphStyle:] + 283
10  libjnidispatch.dylib                0x0000000107cc9e74 ffi_call_unix64 + 76
11  ???                                 0x00007ffee85e02d8 0x0 + 140732796895960

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff2031a462 __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff20348610 pthread_kill + 263
2   libsystem_c.dylib             	0x00007fff2029b720 abort + 120
3   libc++abi.dylib               	0x00007fff2030d418 abort_message + 231
4   libc++abi.dylib               	0x00007fff202fea7d demangling_terminate_handler() + 266
5   libobjc.A.dylib               	0x00007fff201f49b1 _objc_terminate() + 96
6   libc++abi.dylib               	0x00007fff2030c847 std::__terminate(void (*)()) + 8
7   libc++abi.dylib               	0x00007fff2030c7e9 std::terminate() + 41
8   libdispatch.dylib             	0x00007fff2019d7db _dispatch_client_callout + 28
9   libdispatch.dylib             	0x00007fff2019e96b _dispatch_once_callout + 20
10  com.apple.UIFoundation        	0x00007fff239e5aa8 -[NSParagraphStyle tabStops] + 51
11  com.apple.UIFoundation        	0x00007fff239fffb1 -[NSMutableParagraphStyle setParagraphStyle:] + 283
12  libjnidispatch.dylib          	0x0000000107cc9e74 ffi_call_unix64 + 76


@cyberduck
Copy link
Collaborator Author

@dkocher commented

#11245 closed as duplicate.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Submitted as FB8902752.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

#11247 closed as duplicate.

@cyberduck
Copy link
Collaborator Author

@ylangisc commented

In 2b1d907.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Can you please try if still see this issue with the current snapshot build 7.7.1.33779.

@cyberduck
Copy link
Collaborator Author

2fd7f3b commented

Hello Sir,

This nightly snapshot build 7.7.1.33779 works just fine, and all is well. Thank you very much. I am glad that other people found the bug and not just me. I have been beta testing Big Sur since the summer time, and had to use an older version of Cyberduck on a Catalina-based Mac all this time to do my Cyberduck work. So it is a big relief to now have it working again on my iMac. Thank you again.

@cyberduck
Copy link
Collaborator Author

f88a66a commented

that nightly build link for 7.7.1.33779 isn't working for me?

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Replying to [comment:18 1adam12]:

that nightly build link for 7.7.1.33779 isn't working for me?
The direct link is (https://update.cyberduck.io/nightly/Cyberduck-7.7.1.33779.zip)

@cyberduck
Copy link
Collaborator Author

2fd7f3b commented

Please note that the Cyberduck 7.7.1.33779 is working on my computer, but immediately crashes when I select Cyberduck-->About Cyberduck from the top menu bar while running the app. This happened all three times I tried it.

The "Update Software" function works fine, and I am able to use Cyberduck for SFTP purposes. It just seems to be this About Cyberduck function that is causing it to crash.

I have uploaded a crash file from this.

Thanks
Gerry

@cyberduck
Copy link
Collaborator Author

f88a66a commented

I can also confirm that v7.7.1.33779 is working as well for me under mac os 11.0.1 and that choosing 'About Cyberduck' causes an immediate crash. Crashlog available here: https://www.dropbox.com/s/0a09rgvp6fpup6z/cycberduck_771_33779_about_crash.txt?dl=0

@cyberduck
Copy link
Collaborator Author

f88a66a commented

also, thank you for getting this fixed! much appreciated! i have been meaning to for a while, but also just donated to Cyberduck - thank you for your good work!

@cyberduck
Copy link
Collaborator Author

2fd7f3b commented

I donated a couple of years ago, but I just now donated again with double my original donation, to express additional Thanks !!

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Thanks for the additional crash report which confirms this is a bug in macOS 11. We have worked around this issue by no longer calling setParagraphStyle.

Process:               Cyberduck [72150]
Path:                  /private/var/folders/*/Cyberduck.app/Contents/MacOS/Cyberduck
Identifier:            ch.sudo.cyberduck
Version:               7.7.1 (33779)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Cyberduck [72150]
User ID:               502

Date/Time:             2020-11-17 12:43:21.968 -0500
OS Version:            macOS 11.0.1 (20B29)
Report Version:        12
Bridge OS Version:     5.0.1 (18P2561)
Anonymous UUID:        EBC421C2-D218-73AC-8D5A-02EEC0059F0F

Sleep/Wake UUID:       1B62CC3F-3B83-4C24-B24C-932CE568C7F9

Time Awake Since Boot: 200000 seconds
Time Since Wake:       4400 seconds

System Integrity Protection: enabled

Notes:                 Translocated Process

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x0000000103db8008
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x103db8008:
    __LINKEDIT                  103da6000-103db8000    [   72K] r--/rwx SM=COW  /var/folders/*/Cyberduck.app/Contents/PlugIns/Runtime.jre/Contents/Home/lib/libjava.dylib
--> VM_ALLOCATE                 103db8000-103db9000    [    4K] ---/rwx SM=NUL  
    VM_ALLOCATE                 103db9000-103dba000    [    4K] r--/rwx SM=PRV  

Application Specific Information:
Performing @selector(aboutMenuClicked:) from sender NSMenuItem 0x6000025a0380
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
abort() called
terminating with uncaught exception of type NSException

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff204ba6af __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00007fff201f23c9 objc_exception_throw + 48
2   CoreFoundation                      0x00007fff2056ea9a -[__NSCFString characterAtIndex:].cold.1 + 0
3   CoreFoundation                      0x00007fff2056c953 -[__NSArrayM insertObject:atIndex:].cold.2 + 0
4   CoreFoundation                      0x00007fff203e0411 -[__NSArrayM insertObject:atIndex:] + 1135
5   UIFoundation                        0x00007fff239e5b4b __defaultTabStops_block_invoke + 161
6   libdispatch.dylib                   0x00007fff2019d7c7 _dispatch_client_callout + 8
7   libdispatch.dylib                   0x00007fff2019e96b _dispatch_once_callout + 20
8   UIFoundation                        0x00007fff239e6177 -[NSMutableParagraphStyle setTabStops:] + 199
9   UIFoundation                        0x00007fff239ffe47 -[NSRTFReader defaultParagraphStyle] + 75
10  UIFoundation                        0x00007fff239ffd6e -[NSRTFReader _mutableParagraphStyle] + 112
11  UIFoundation                        0x00007fff239f98c3 controlClass + 1757
12  UIFoundation                        0x00007fff239f8e64 -[NSRTFReader attributedString] + 76
13  UIFoundation                        0x00007fff239f4956 _NSReadAttributedStringFromURLOrData + 3213
14  UIFoundation                        0x00007fff23b08fce -[NSAttributedString(NSAttributedStringUIFoundationAdditions) initWithURL:options:documentAttributes:error:] + 228
15  AppKit                              0x00007fff233d4ec5 +[NSSystemInfoPanel updateOptionsWithCredits:] + 400
16  AppKit                              0x00007fff233d4883 +[NSSystemInfoPanel updateOptions:] + 81
17  AppKit                              0x00007fff233d423a -[NSSystemInfoPanel setOptionsDictionary:] + 86
18  AppKit                              0x00007fff233d4095 -[NSApplication(NSStandardAboutPanel) orderFrontStandardAboutPanelWithOptions:] + 56
19  libjnidispatch.dylib                0x0000000111189e74 ffi_call_unix64 + 76
20  ???                                 0x00007ffeed1a64b8 0x0 + 140732876350648

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff2031a462 __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff20348610 pthread_kill + 263
2   libsystem_c.dylib             	0x00007fff2029b720 abort + 120
3   libc++abi.dylib               	0x00007fff2030d418 abort_message + 231
4   libc++abi.dylib               	0x00007fff202fea7d demangling_terminate_handler() + 266
5   libobjc.A.dylib               	0x00007fff201f49b1 _objc_terminate() + 96
6   libc++abi.dylib               	0x00007fff2030c847 std::__terminate(void (*)()) + 8
7   libc++abi.dylib               	0x00007fff2030c7e9 std::terminate() + 41
8   libdispatch.dylib             	0x00007fff2019d7db _dispatch_client_callout + 28
9   libdispatch.dylib             	0x00007fff2019e96b _dispatch_once_callout + 20
10  com.apple.UIFoundation        	0x00007fff239e6177 -[NSMutableParagraphStyle setTabStops:] + 199
11  com.apple.UIFoundation        	0x00007fff239ffe47 -[NSRTFReader defaultParagraphStyle] + 75
12  com.apple.UIFoundation        	0x00007fff239ffd6e -[NSRTFReader _mutableParagraphStyle] + 112
13  com.apple.UIFoundation        	0x00007fff239f98c3 controlClass + 1757
14  com.apple.UIFoundation        	0x00007fff239f8e64 -[NSRTFReader attributedString] + 76
15  com.apple.UIFoundation        	0x00007fff239f4956 _NSReadAttributedStringFromURLOrData + 3213
16  com.apple.UIFoundation        	0x00007fff23b08fce -[NSAttributedString(NSAttributedStringUIFoundationAdditions) initWithURL:options:documentAttributes:error:] + 228
17  com.apple.AppKit              	0x00007fff233d4ec5 +[NSSystemInfoPanel updateOptionsWithCredits:] + 400
18  com.apple.AppKit              	0x00007fff233d4883 +[NSSystemInfoPanel updateOptions:] + 81
19  com.apple.AppKit              	0x00007fff233d423a -[NSSystemInfoPanel setOptionsDictionary:] + 86
20  com.apple.AppKit              	0x00007fff233d4095 -[NSApplication(NSStandardAboutPanel) orderFrontStandardAboutPanelWithOptions:] + 56
21  libjnidispatch.dylib          	0x0000000111189e74 ffi_call_unix64 + 76
22  libjnidispatch.dylib          	0x000000011118943d ffi_call + 1005

@cyberduck
Copy link
Collaborator Author

c3662f2 commented

I found a better workaround for this macOS Big Sur bug.

It’s related to a preferences key, added by macOS.
It affects several macOS API.

How to reproduce:

[[NSUserDefaults standardUserDefaults] setBool: YES forKey: @"__NSDisableSharingTextTabInstance”];
// -> What is it? Created by old version of macOS ? and added to your preference file

NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];

// It crashes here, if __NSDisableSharingTextTabInstance was YES
[paragraphStyle setParagraphStyle:[NSParagraphStyle defaultParagraphStyle]];

Solution: at the start of your application:

[[NSUserDefaults standardUserDefaults] removeObjectForKey: @"__NSDisableSharingTextTabInstance"];

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Replying to [comment:25 AntoineRosset]:

I found a better workaround for this macOS Big Sur bug.

Thank your for sharing! Users may manually delete this key by entering the following command in a Terminal.app window

defaults delete ch.sudo.cyberduck __NSDisableSharingTextTabInstance

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Replying to [comment:25 AntoineRosset]:

I found a better workaround for this macOS Big Sur bug.

Can I ask how you managed to trace this down to this particular key in user defaults?

@cyberduck
Copy link
Collaborator Author

c3662f2 commented

Replying to [comment:27 dkocher]:

Replying to [comment:25 AntoineRosset]:

I found a better workaround for this macOS Big Sur bug.

Can I ask how you managed to trace this down to this particular key in user defaults?

I had the same bug in my application. I was hoping to find the solution in this ticket.

When preparing an example for reporting it to Apple, I quickly discovered it was related to the preferences file of the application. Then, I identified it by progressively deleting each key in the preferences file...

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Replying to [comment:28 AntoineRosset]:

Replying to [comment:27 dkocher]:

Replying to [comment:25 AntoineRosset]:

I found a better workaround for this macOS Big Sur bug.

Can I ask how you managed to trace this down to this particular key in user defaults?

I had the same bug in my application. I was hoping to find the solution in this ticket.

When preparing an example for reporting it to Apple, I quickly discovered it was related to the preferences file of the application. Then, I identified it by progressively deleting each key in the preferences file...

Awesome, thanks for sharing.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Similar issue in #11508.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants