quietvoid / dovi_tool

dovi_tool is a CLI tool combining multiple utilities for working with Dolby Vision.
MIT License
578 stars 57 forks source link

Terminating app due to uncaught exception if build with cbuild #259

Closed Nomis101 closed 9 months ago

Nomis101 commented 9 months ago

dovi_tool fails to build with cargo cbuild --release. It builds fine with cargo build --release. But thing is, HandBrake is using cbuild, so I'm currently unable to build HandBrake because of this error. All was fine until I updated rustcand cargo-c yesterday. Stupid idea. Since then it does not build anymore.

Its on macOS Sonoma with Xcode 15.

Last login: Sun Oct  8 00:07:21 on ttys000
MacbookPro dovi_tool % cargo cbuild --release
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector sent to instance 0x6000035a41c0'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007ff8189de0b6 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007ff8184d3231 objc_exception_throw + 48
    2   CoreFoundation                      0x00007ff818a833a4 -[NSObject(NSObject) __retain_OA] + 0
    3   CoreFoundation                      0x00007ff81894b833 ___forwarding___ + 1379
    4   CoreFoundation                      0x00007ff81894b248 _CF_forwarding_prep_0 + 120
    5   Foundation                          0x00007ff8198ac11f -[NSProcessInfo arguments] + 203
    6   CoreFoundation                      0x00007ff818a50ce5 __getDefaultArguments_block_invoke + 101
    7   libdispatch.dylib                   0x00007ff8186e859a _dispatch_client_callout + 8
    8   libdispatch.dylib                   0x00007ff8186e97cb _dispatch_once_callout + 20
    9   CoreFoundation                      0x00007ff818a506f6 _addBackstopValuesForIdentifierAndSource + 636
    10  CoreFoundation                      0x00007ff818917a3d __81-[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 151
    11  CoreFoundation                      0x00007ff818a503b5 -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 241
    12  CoreFoundation                      0x00007ff81891e600 -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 98
    13  CoreFoundation                      0x00007ff818a8aeab __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.160 + 310
    14  CoreFoundation                      0x00007ff818a8ab78 -[_CFXPreferences withSearchLists:] + 60
    15  CoreFoundation                      0x00007ff818919058 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 278
    16  CoreFoundation                      0x00007ff818a8acf0 -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 349
    17  CoreFoundation                      0x00007ff818918ae2 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 124
    18  CoreFoundation                      0x00007ff818918a28 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 101
    19  SystemConfiguration                 0x00007ff8195638bb SCDynamicStoreCopyProxiesWithOptions + 155
    20  cargo-cbuild                        0x000000010d98c2cb Curl_macos_init + 11
    21  cargo-cbuild                        0x000000010d9792fc curl_global_init + 140
    22  cargo-cbuild                        0x000000010d965b2d _ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17h6258dd27295048f2E + 29
    23  cargo-cbuild                        0x000000010dafc747 _ZN3std10sys_common4once5queue4Once4call17h64e5800f41578d62E + 983
    24  cargo-cbuild                        0x000000010d965f82 _ZN4curl9INIT_CTOR9init_ctor17he1cd21dadf0fa468E + 66
    25  dyld                                0x00007ff81851ff16 ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateEENK3$_0clEv_block_invoke + 182
    26  dyld                                0x00007ff81856171f ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.180 + 241
    27  dyld                                0x00007ff818555913 ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE_block_invoke + 543
    28  dyld                                0x00007ff81850307f _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_pointerFvPK12load_commandRbE + 249
    29  dyld                                0x00007ff818554adc _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE + 176
    30  dyld                                0x00007ff81856130a _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv + 470
    31  dyld                                0x00007ff81851cc48 _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 222
    32  dyld                                0x00007ff8185226ab _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 21
    33  dyld                                0x00007ff81851ce3d _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 181
    34  dyld                                0x00007ff81851ff8c _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateEENK3$_1clEv + 98
    35  dyld                                0x00007ff81851ced3 _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateE + 93
    36  dyld                                0x00007ff81853e9ed _ZN5dyld44APIs25runAllInitializersForMainEv + 317
    37  dyld                                0x00007ff818508261 _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3397
    38  dyld                                0x00007ff81850733f start + 1839
)
libc++abi: terminating due to uncaught exception of type NSException
zsh: abort      cargo cbuild --release
quietvoid commented 9 months ago

You're building dovi_tool when the lib is in the dolby_vision folder, try going in that folder.

Nomis101 commented 9 months ago

Thanks for your reply. I did, but it's the same from this folder.

Last login: Sun Oct  8 19:32:30 on ttys000
MacbookPro dolby_vision % cargo cbuild --release
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector sent to instance 0x600002c842c0'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007ff8189de0b6 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007ff8184d3231 objc_exception_throw + 48
    2   CoreFoundation                      0x00007ff818a833a4 -[NSObject(NSObject) __retain_OA] + 0
    3   CoreFoundation                      0x00007ff81894b833 ___forwarding___ + 1379
    4   CoreFoundation                      0x00007ff81894b248 _CF_forwarding_prep_0 + 120
    5   Foundation                          0x00007ff8198ac11f -[NSProcessInfo arguments] + 203
    6   CoreFoundation                      0x00007ff818a50ce5 __getDefaultArguments_block_invoke + 101
    7   libdispatch.dylib                   0x00007ff8186e859a _dispatch_client_callout + 8
    8   libdispatch.dylib                   0x00007ff8186e97cb _dispatch_once_callout + 20
    9   CoreFoundation                      0x00007ff818a506f6 _addBackstopValuesForIdentifierAndSource + 636
    10  CoreFoundation                      0x00007ff818917a3d __81-[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 151
    11  CoreFoundation                      0x00007ff818a503b5 -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 241
    12  CoreFoundation                      0x00007ff81891e600 -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 98
    13  CoreFoundation                      0x00007ff818a8aeab __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.160 + 310
    14  CoreFoundation                      0x00007ff818a8ab78 -[_CFXPreferences withSearchLists:] + 60
    15  CoreFoundation                      0x00007ff818919058 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 278
    16  CoreFoundation                      0x00007ff818a8acf0 -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 349
    17  CoreFoundation                      0x00007ff818918ae2 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 124
    18  CoreFoundation                      0x00007ff818918a28 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 101
    19  SystemConfiguration                 0x00007ff8195638bb SCDynamicStoreCopyProxiesWithOptions + 155
    20  cargo-cbuild                        0x000000010e95b2cb Curl_macos_init + 11
    21  cargo-cbuild                        0x000000010e9482fc curl_global_init + 140
    22  cargo-cbuild                        0x000000010e934b2d _ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17h6258dd27295048f2E + 29
    23  cargo-cbuild                        0x000000010eacb747 _ZN3std10sys_common4once5queue4Once4call17h64e5800f41578d62E + 983
    24  cargo-cbuild                        0x000000010e934f82 _ZN4curl9INIT_CTOR9init_ctor17he1cd21dadf0fa468E + 66
    25  dyld                                0x00007ff81851ff16 ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateEENK3$_0clEv_block_invoke + 182
    26  dyld                                0x00007ff81856171f ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.180 + 241
    27  dyld                                0x00007ff818555913 ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE_block_invoke + 543
    28  dyld                                0x00007ff81850307f _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_pointerFvPK12load_commandRbE + 249
    29  dyld                                0x00007ff818554adc _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE + 176
    30  dyld                                0x00007ff81856130a _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv + 470
    31  dyld                                0x00007ff81851cc48 _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 222
    32  dyld                                0x00007ff8185226ab _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 21
    33  dyld                                0x00007ff81851ce3d _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 181
    34  dyld                                0x00007ff81851ff8c _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateEENK3$_1clEv + 98
    35  dyld                                0x00007ff81851ced3 _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateE + 93
    36  dyld                                0x00007ff81853e9ed _ZN5dyld44APIs25runAllInitializersForMainEv + 317
    37  dyld                                0x00007ff818508261 _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3397
    38  dyld                                0x00007ff81850733f start + 1839
)
libc++abi: terminating due to uncaught exception of type NSException
zsh: abort      cargo cbuild --release
quietvoid commented 9 months ago

It builds fine on my M2 Mac, so something must be very broken on your system. You can always try reinstalling cargo-c.

But it seems a known issue: https://github.com/lu-zero/cargo-c/issues/344

quietvoid commented 9 months ago

I'll close this and comment over at cargo-c.

Nomis101 commented 9 months ago

It builds fine on my M2 Mac, so something must be very broken on your system. You can always try reinstalling cargo-c.

I am on Intel, maybe Apple Silicon is not affected? I did reinstall cargo-c several times, I think this introduced the issue. I was building fine with the older version. Thanks for the link.

quietvoid commented 9 months ago

Everyone's affected but it's a curl-rust issue and it affects all projects using curl, so there isn't much I can do here. You should use the homebrew cargo-c.

Nomis101 commented 9 months ago

Yes, what I read now, its a issue with system curl on Sonoma and this should fix it: https://github.com/curl/curl/commit/6ab7e1990bd548059f08c471d20537bca13c67b6 So, you can't do much about it. Will try the homebrew method. Thanks.

Nomis101 commented 9 months ago

homebrew cargo-c fixed the issue.