Subject: bug#41184: 28.0.50; Crash on NS when opening text file in a possibly invalid zip archive

From: Andrii Kolomoiets <[email-masked]>
Date: Mon, 11 May 2020 21:46:38 +0300

Eli Zaretskii <[email-masked]> writes:

>> Terminating app due to uncaught exception
>> 'NSInternalInconsistencyException', reason: 'Invalid parameter not
>> satisfying: aString != nil'
>> abort() called
>> terminating with uncaught exception of type NSException
>>
>> Application Specific Backtrace 1:
>> 0   CoreFoundation                      0x00007fff32c47d07 __exceptionPreprocess + 250
>> 1   libobjc.A.dylib                     0x00007fff6b96b5bf objc_exception_throw + 48
>> 2   CoreFoundation                      0x00007fff32c70ec8 +[NSException raise:format:arguments:] + 88
>> 3 Foundation 0x00007fff3535bf3d -[NSAssertionHandler
>> handleFailureInMethod:object:file:lineNumber:description:] + 191
>> 4   AppKit                              0x00007fff2fe991c4 -[NSWindow setTitle:] + 185
>> 5   Emacs-x86_64-10_14                  0x000000010b22dfb1 ns_set_name_internal + 161
>> 6   Emacs-x86_64-10_14                  0x000000010b227e8b ns_implicitly_set_name + 475
>> 7   Emacs-x86_64-10_14                  0x000000010b08a531 gui_consider_frame_title + 609
>
> Looks like some NS-specific issue with showing a strange file name in
> the frame title?

You are absolutely right.

Actually crash can be reproduced with single step:

  (set-frame-name "\200")