[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue on macOS Sonoma affecting aria2
From: |
Bruno Haible |
Subject: |
Re: Issue on macOS Sonoma affecting aria2 |
Date: |
Tue, 03 Oct 2023 00:33:28 +0200 |
[CCing bug-gnulib]
Shupeng Xue (Xerxes Ⅱ) wrote:
> I am writing to report an issue I've encountered with GNU gettext on macOS
> Sonoma that impacts the functionality of aria2. When attempting to execute
> aria2c, the application terminates abruptly with an
> 'NSInvalidArgumentException’.
>
> Environment:
>
> Computer: MacBook Pro 14” 2023, M2 Pro
> OS: macOS Sonoma 14.0, build 23A344
> gettext 0.22.2
> aria2 1.36.0
>
>
> Error log:
>
> *** Terminating app due to uncaught exception 'NSInvalidArgumentException',
> reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector
> sent to instance 0x60000051c0c0'
> *** First throw call stack:
> (
> 0 CoreFoundation 0x0000000186b7c8c0
> __exceptionPreprocess + 176
> 1 libobjc.A.dylib 0x0000000186675eb4
> objc_exception_throw + 60
> 2 CoreFoundation 0x0000000186c2e3dc
> -[NSObject(NSObject) __retain_OA] + 0
> 3 CoreFoundation 0x0000000186ae69e4
> ___forwarding___ + 1572
> 4 CoreFoundation 0x0000000186ae6300
> _CF_forwarding_prep_0 + 96
> 5 Foundation 0x0000000187bbb4f0
> -[NSProcessInfo arguments] + 188
> 6 CoreFoundation 0x0000000186bf7ff8
> __getDefaultArguments_block_invoke + 96
> 7 libdispatch.dylib 0x000000018687d910
> _dispatch_client_callout + 20
> 8 libdispatch.dylib 0x000000018687f14c
> _dispatch_once_callout + 32
> 9 CoreFoundation 0x0000000186bf7994
> _addBackstopValuesForIdentifierAndSource + 640
> 10 CoreFoundation 0x0000000186ab2254
> __81-[_CFXPreferences(SourceAdditions)
> withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 144
> 11 CoreFoundation 0x0000000186bf763c
> -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 272
> 12 CoreFoundation 0x0000000186ab85c4
> -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 136
> 13 CoreFoundation 0x0000000186c368bc
> __108-[_CFXPreferences(SearchListAdditions)
> withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.155
> + 296
> 14 CoreFoundation 0x0000000186c36564
> -[_CFXPreferences withSearchLists:] + 84
> 15 CoreFoundation 0x0000000186ab3b18
> __108-[_CFXPreferences(SearchListAdditions)
> withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke
> + 300
> 16 CoreFoundation 0x0000000186c36710
> -[_CFXPreferences
> withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 384
> 17 CoreFoundation 0x0000000186ab3440
> -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:]
> + 156
> 18 CoreFoundation 0x0000000186ab3368
> _CFPreferencesCopyAppValueWithContainerAndConfiguration + 112
> 19 libintl.8.dylib 0x000000010100a42c
> _libintl_locale_name_default + 72
> 20 libintl.8.dylib 0x0000000101007e54
> libintl_dcigettext + 1876
> 21 aria2c 0x00000001008ba2dc
> _GLOBAL__sub_I_UnknownOptionException.cc + 20
> 22 dyld 0x00000001866cd5c8
> ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateEENK3$_0clEv_block_invoke
> + 168
> 23 dyld 0x0000000186712920
> ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.209
> + 340
> 24 dyld 0x0000000186705c60
> ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE_block_invoke
> + 496
> 25 dyld 0x00000001866ad2fc
> _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_pointerFvPK12load_commandRbE
> + 300
> 26 dyld 0x0000000186704c98
> _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE
> + 192
> 27 dyld 0x0000000186712434
> _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv
> + 516
> 28 dyld 0x00000001866c9798
> _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 448
> 29 dyld 0x00000001866cfb14
> _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 36
> 30 dyld 0x00000001866c9b4c
> _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE
> + 220
> 31 dyld 0x00000001866cd654
> _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateEENK3$_1clEv
> + 112
> 32 dyld 0x00000001866c9ccc
> _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateE
> + 304
> 33 dyld 0x00000001866eead4
> _ZN5dyld44APIs25runAllInitializersForMainEv + 464
> 34 dyld 0x00000001866b1f34
> _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3192
> 35 dyld 0x00000001866b0f44 start + 1948
> )
> libc++abi: terminating due to uncaught exception of type NSException
> [1] 22575 abort aria2c
>
>
> Steps to Replicate:
>
> 1. Execute aria2c in a terminal on macOS Sonoma.
> 2. Observe the NSInvalidArgumentException error and the program termination.
>
>
> Possible Cause & Solution
>
> I found the discussion here:
> https://github.com/aria2/aria2/issues/2083#issuecomment-1694662007
> I tried building gettext with the additional LDFLAG -framework CoreServices
> and aria2 now works fine.
> Here is also a possible useful discussion Crash of programs linked with
> libcurl on macOS Sonoma 14: unrecognized selector sent to instance · Issue
> #11893 · curl/curl (github.com) <https://github.com/curl/curl/issues/11893>
>
> I believe this is a critical issue that warrants your attention for a fix or
> at least documentation in the setup guide.
Thank you for reporting the issue, and for the pointer to the solution.
The source code is in gnulib; therefore I fix it there. Then I will make
a new gettext release 0.22.3.
2023-10-02 Bruno Haible <bruno@clisp.org>
localename, gettext: Avoid crash on macOS 14.
Reported by Shupeng Xue <dspxue@gmail.com> at
<https://lists.gnu.org/archive/html/bug-gettext/2023-10/msg00001.html>.
Cf <https://github.com/aria2/aria2/issues/2083#issuecomment-1694662007>.
* m4/intlmacosx.m4 (gt_INTL_MACOSX): Link with the CoreServices
framework in addition to the CoreFoundation framework.
diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4
index 81eefd750b..3141bf8c5e 100644
--- a/m4/intlmacosx.m4
+++ b/m4/intlmacosx.m4
@@ -1,4 +1,4 @@
-# intlmacosx.m4 serial 8 (gettext-0.20.2)
+# intlmacosx.m4 serial 9 (gettext-0.22.3)
dnl Copyright (C) 2004-2014, 2016, 2019-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -59,7 +59,11 @@ AC_DEFUN([gt_INTL_MACOSX]
INTL_MACOSX_LIBS=
if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
|| test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
- INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ dnl Starting with macOS version 14, CoreFoundation relies on CoreServices,
+ dnl and we have to link it in explicitly, otherwise an exception
+ dnl NSInvalidArgumentException "unrecognized selector sent to instance"
+ dnl occurs.
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework
-Wl,CoreServices"
fi
AC_SUBST([INTL_MACOSX_LIBS])
])