Mpv: OSX catalina segmentation fault mpv -v

Created on 13 Oct 2019  路  19Comments  路  Source: mpv-player/mpv

mpv version and platform

mpv waf build LOG latest on Catalina

https://pastebin.com/yt5MAFym

Reproduction steps

Expected behavior

play file

Actual behavior

zsh: segmentation fault mpv -v

Log file

https://pastebin.com/nEJLWSjq

I tried --no-config

Same error

mac apple

All 19 comments

Can you use gdb and do a backtrace ?

yes the backtrace macOS throws (clicking on report) would be helpful. does it also occur with --vo=gpu? could you try a commit before https://github.com/mpv-player/mpv/commit/6d0f0546ee851f4106438c5b92c8d1d152937ea7, eg 2b19a7c964b821945e3ea06cfa81c1c064f2504d?

Im not a programmer. I know how to use terminal and build from source. Thats my limit

vo=gpu

(gives this error)

Warning: option --video-aspect was replaced with --video-aspect-override and might be removed in the future.

(+) Video --vid=1 () (h264 320x240 29.970fps)
(+) Audio --aid=1 --alang=eng (
) (opus 1ch 48000Hz)
[vo/gpu] opengl cocoa backend is deprecated, use vo=libmpv instead

Im using Catalina. Im basically trying to use the latest FFmpeg and latest mpv. Without home-brew installation.
Which is the trouble I think.

I have lldb on my Mac. I have no idea how to backtrace with it.

Maybe give me instructions. Id gladly do it.

See the LLDB documentation on:

  1. Loading an application in it.
  2. Starting the application you've loaded.
  3. When it crashes, within lldb do bt all.

That should do it unless you specifically disabled debug symbols. When the application gets loaded into lldb it should tell you if it was able to load symbols or not.

i don't see an error, just warnings. so --vo=gpu works?

the backtrace should come automatically when an app crashes on macOS. no programming skills required.

otherwise this:

lldb mpv
(lldb) run /PATH/TO/FILE.mkv --no-config
----wait for crash----
(lldb) bt
(lldb) bt all
----copy the output----

most helpful right now for me would be if you could confirm if the mentioned commit is the offending change, otherwise the backtrace.

Thanks

No , the vo=gpu did not work. I got the segmentation fault error. Anyway, thanks for the shortcuts on lldb. I did what you said.

here is the terminal read out

ss@sss-iMac ~ % lldb mpv
(lldb) target create "mpv"
Current executable set to 'mpv' (x86_64).
(lldb) run /Applications/mpv-master/build/mpv --no-config
Process 713 launched: '/usr/local/bin/mpv' (x86_64)
Process 713 stopped

  • thread #11, name = 'mpv/opener', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x00007fff66ed5476 libdyld.dylibstack_not_16_byte_aligned_error libdyld.dylibstack_not_16_byte_aligned_error:
    -> 0x7fff66ed5476 <+0>: movdqa %xmm0, (%rsp)
    0x7fff66ed547b <+5>: int3
    0x7fff66ed547c <+6>: nop
    0x7fff66ed547d <+7>: nop
    Target 0: (mpv) stopped.
    (lldb) bt
  • thread #11, name = 'mpv/opener', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

    • frame #0: 0x00007fff66ed5476 libdyld.dylibstack_not_16_byte_aligned_error (lldb) bt all thread #1, queue = 'com.apple.main-thread' frame #0: 0x00007fff6702d146 libsystem_kernel.dylibmach_msg_trap + 10

      frame #1: 0x00007fff6702d6ac libsystem_kernel.dylibmach_msg + 60 frame #2: 0x00007fff2fbe619b CoreFoundation__CFRunLoopServiceMachPort + 322

      frame #3: 0x00007fff2fbe5737 CoreFoundation__CFRunLoopRun + 1695 frame #4: 0x00007fff2fbe4e13 CoreFoundationCFRunLoopRunSpecific + 499

      frame #5: 0x00007fff2e771b2d HIToolboxRunCurrentEventLoopInMode + 292 frame #6: 0x00007fff2e77186d HIToolboxReceiveNextEventCommon + 600

      frame #7: 0x00007fff2e7715f7 HIToolbox_BlockUntilNextEventMatchingListInModeWithFilter + 64 frame #8: 0x00007fff2ce07ac4 AppKit_DPSNextEvent + 990

      frame #9: 0x00007fff2ce06834 AppKit-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352 frame #10: 0x00007fff2ce00fd4 AppKit-[NSApplication run] + 658

      frame #11: 0x00000001000e78ee mpvcocoa_main + 990 frame #12: 0x00007fff66ee4405 libdyld.dylibstart + 1

      frame #13: 0x00007fff66ee4405 libdyld.dylibstart + 1 thread #2 frame #0: 0x00007fff6702eb7a libsystem_kernel.dylib__workq_kernreturn + 10

      frame #1: 0x00007fff670ed7c7 libsystem_pthread.dylib_pthread_wqthread + 390 frame #2: 0x00007fff670ed5c3 libsystem_pthread.dylibstart_wqthread + 15

      thread #3

      frame #0: 0x00007fff6702eb7a libsystem_kernel.dylib__workq_kernreturn + 10 frame #1: 0x00007fff670ed7c7 libsystem_pthread.dylib_pthread_wqthread + 390

      frame #2: 0x00007fff670ed5c3 libsystem_pthread.dylibstart_wqthread + 15 thread #4, name = 'mpv/playback core (OSX)' frame #0: 0x00007fff670308f6 libsystem_kernel.dylib__psynch_cvwait + 10

      frame #1: 0x00007fff670f1082 libsystem_pthread.dylib_pthread_cond_wait + 701 frame #2: 0x0000000100053e7b mpvmp_dispatch_queue_process + 379

      frame #3: 0x000000010008f3bc mpvmp_idle + 140 frame #4: 0x0000000100085108 mpvopen_demux_reentrant + 280

      frame #5: 0x0000000100083398 mpvmp_play_files + 1336 frame #6: 0x0000000100089d34 mpvmpv_main + 116

      frame #7: 0x00000001000e797b mpvplayback_thread + 43 frame #8: 0x00007fff670f0d76 libsystem_pthread.dylib_pthread_start + 125

      frame #9: 0x00007fff670ed5d7 libsystem_pthread.dylibthread_start + 15 thread #5, name = 'mpv/terminal' frame #0: 0x00007fff670347c6 libsystem_kernel.dylib__select + 10

      frame #1: 0x00000001000e2fb7 mpvpolldev + 423 frame #2: 0x00000001000e1bb2 mpvterminal_thread + 114

      frame #3: 0x00007fff670f0d76 libsystem_pthread.dylib_pthread_start + 125 frame #4: 0x00007fff670ed5d7 libsystem_pthread.dylibthread_start + 15

      thread #6, name = 'mpv/lua script (osc)'

      frame #0: 0x00007fff670308f6 libsystem_kernel.dylib__psynch_cvwait + 10 frame #1: 0x00007fff670f1082 libsystem_pthread.dylib_pthread_cond_wait + 701

      frame #2: 0x0000000100069c2c mpvwait_wakeup + 92 frame #3: 0x000000010006a606 mpvmpv_wait_event + 518

      frame #4: 0x0000000100086466 mpvscript_wait_event + 102 frame #5: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466

      frame #6: 0x00000001027e44f0 liblua.5.1.dylibluaV_execute + 4680 frame #7: 0x00000001027dabdf liblua.5.1.dylibluaD_call + 98

      frame #8: 0x00000001027d717c liblua.5.1.dyliblua_call + 39 frame #9: 0x0000000100086103 mpvload_scripts + 291

      frame #10: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466 frame #11: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81

      frame #12: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84 frame #13: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68

      frame #14: 0x00000001027d71ff liblua.5.1.dyliblua_pcall + 102 frame #15: 0x0000000100085c95 mpvrun_lua + 1621

      frame #16: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466 frame #17: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81

      frame #18: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84 frame #19: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68

      frame #20: 0x00000001027d7262 liblua.5.1.dyliblua_cpcall + 45 frame #21: 0x00000001000855a3 mpvload_lua + 147

      frame #22: 0x0000000100090f3d mpvscript_thread + 125 frame #23: 0x00007fff670f0d76 libsystem_pthread.dylib_pthread_start + 125

      frame #24: 0x00007fff670ed5d7 libsystem_pthread.dylibthread_start + 15 thread #7, name = 'mpv/lua script (ytdl_hook)' frame #0: 0x00007fff670308f6 libsystem_kernel.dylib__psynch_cvwait + 10

      frame #1: 0x00007fff670f1082 libsystem_pthread.dylib_pthread_cond_wait + 701 frame #2: 0x0000000100069c2c mpvwait_wakeup + 92

      frame #3: 0x000000010006a606 mpvmpv_wait_event + 518 frame #4: 0x0000000100086466 mpvscript_wait_event + 102

      frame #5: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466 frame #6: 0x00000001027e44f0 liblua.5.1.dylibluaV_execute + 4680

      frame #7: 0x00000001027dabdf liblua.5.1.dylibluaD_call + 98 frame #8: 0x00000001027d717c liblua.5.1.dyliblua_call + 39

      frame #9: 0x0000000100086103 mpvload_scripts + 291 frame #10: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466

      frame #11: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81 frame #12: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84

      frame #13: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68 frame #14: 0x00000001027d71ff liblua.5.1.dyliblua_pcall + 102

      frame #15: 0x0000000100085c95 mpvrun_lua + 1621 frame #16: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466

      frame #17: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81 frame #18: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84

      frame #19: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68 frame #20: 0x00000001027d7262 liblua.5.1.dyliblua_cpcall + 45

      frame #21: 0x00000001000855a3 mpvload_lua + 147 frame #22: 0x0000000100090f3d mpvscript_thread + 125

      frame #23: 0x00007fff670f0d76 libsystem_pthread.dylib_pthread_start + 125 frame #24: 0x00007fff670ed5d7 libsystem_pthread.dylibthread_start + 15

      thread #8, name = 'mpv/lua script (stats)'

      frame #0: 0x00007fff670308f6 libsystem_kernel.dylib__psynch_cvwait + 10 frame #1: 0x00007fff670f1082 libsystem_pthread.dylib_pthread_cond_wait + 701

      frame #2: 0x0000000100069c2c mpvwait_wakeup + 92 frame #3: 0x000000010006a606 mpvmpv_wait_event + 518

      frame #4: 0x0000000100086466 mpvscript_wait_event + 102 frame #5: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466

      frame #6: 0x00000001027e44f0 liblua.5.1.dylibluaV_execute + 4680 frame #7: 0x00000001027dabdf liblua.5.1.dylibluaD_call + 98

      frame #8: 0x00000001027d717c liblua.5.1.dyliblua_call + 39 frame #9: 0x0000000100086103 mpvload_scripts + 291

      frame #10: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466 frame #11: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81

      frame #12: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84 frame #13: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68

      frame #14: 0x00000001027d71ff liblua.5.1.dyliblua_pcall + 102 frame #15: 0x0000000100085c95 mpvrun_lua + 1621

      frame #16: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466 frame #17: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81

      frame #18: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84 frame #19: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68

      frame #20: 0x00000001027d7262 liblua.5.1.dyliblua_cpcall + 45 frame #21: 0x00000001000855a3 mpvload_lua + 147

      frame #22: 0x0000000100090f3d mpvscript_thread + 125 frame #23: 0x00007fff670f0d76 libsystem_pthread.dylib_pthread_start + 125

      frame #24: 0x00007fff670ed5d7 libsystem_pthread.dylibthread_start + 15 thread #9, name = 'com.apple.NSEventThread' frame #0: 0x00007fff6702d146 libsystem_kernel.dylibmach_msg_trap + 10

      frame #1: 0x00007fff6702d6ac libsystem_kernel.dylibmach_msg + 60 frame #2: 0x00007fff2fbe619b CoreFoundation__CFRunLoopServiceMachPort + 322

      frame #3: 0x00007fff2fbe5737 CoreFoundation__CFRunLoopRun + 1695 frame #4: 0x00007fff2fbe4e13 CoreFoundationCFRunLoopRunSpecific + 499

      frame #5: 0x00007fff2ce0f026 AppKit_NSEventThread + 132 frame #6: 0x00007fff670f0d76 libsystem_pthread.dylib_pthread_start + 125

      frame #7: 0x00007fff670ed5d7 libsystem_pthread.dylib`thread_start + 15

      thread #10

      frame #0: 0x0000000000000000

  • thread #11, name = 'mpv/opener', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

    • frame #0: 0x00007fff66ed5476 libdyld.dylib`stack_not_16_byte_aligned_error

could you try with xcode 11, not the beta, instead of the command line tools? just download xcode and use this command:

sudo xcode-select -s /PATH/TO/Xcode.app

to revert:

sudo xcode-select -s /Library/Developer/CommandLineTools

~also before switching~ (okay it's clang-1100.0.33.8, from your log), please paste the output of clang --version. same for after switching.

Thank you
Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Im installing Xcode right now

Ok, with Xcode


Last login: Sun Oct 13 18:48:46 on console
ss@sss-iMac ~ % sudo xcode-select -s /Applications/Xcode.app
Password:
ss@sss-iMac ~ % lldb mpv
(lldb) target create "mpv"
Current executable set to 'mpv' (x86_64).
(lldb) run /Applications/mpv-master/build/mpv --no-config
Process 745 launched: '/usr/local/bin/mpv' (x86_64)
Process 745 stopped
* thread #11, name = 'mpv/opener', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x00007fff675e2476 libdyld.dylib`stack_not_16_byte_aligned_error
libdyld.dylib`stack_not_16_byte_aligned_error:
->  0x7fff675e2476 <+0>: movdqa %xmm0, (%rsp)
    0x7fff675e247b <+5>: int3   
    0x7fff675e247c <+6>: nop    
    0x7fff675e247d <+7>: nop    
Target 0: (mpv) stopped.
(lldb) bt
* thread #11, name = 'mpv/opener', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x00007fff675e2476 libdyld.dylib`stack_not_16_byte_aligned_error
(lldb) bt all
  thread #1, queue = 'com.apple.main-thread'
    frame #0: 0x00007fff677efd4d libsystem_platform.dylib`_platform_memmove$VARIANT$Haswell + 77
    frame #1: 0x00007fff4931c066 CoreUI`BOMStorageCopyFromBlockRange + 670
    frame #2: 0x00007fff4931ca67 CoreUI`_findIndexForKey + 479
    frame #3: 0x00007fff4932704c CoreUI`BOMTreeValueExists + 108
    frame #4: 0x00007fff49326fb9 CoreUI`-[CUICommonAssetStorage assetExistsForKeyData:length:] + 66
    frame #5: 0x00007fff49326de5 CoreUI`-[CUIStructuredThemeStore assetExistsForKey:] + 167
    frame #6: 0x00007fff4932686b CoreUI`-[CUIStructuredThemeStore _canGetRenditionWithKey:isFPO:lookForSubstitutions:] + 593
    frame #7: 0x00007fff493ed538 CoreUI`-[CUICatalog _private_resolvedRenditionKeyFromThemeRef:withBaseKey:scaleFactor:deviceIdiom:deviceSubtype:displayGamut:layoutDirection:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:deviceSubtypeFallBackOrder:localizationIdentifier:adjustRenditionKeyWithBlock:] + 1849
    frame #8: 0x00007fff493ecdf0 CoreUI`-[CUICatalog _resolvedRenditionKeyFromThemeRef:withBaseKey:scaleFactor:deviceIdiom:deviceSubtype:displayGamut:layoutDirection:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:deviceSubtypeFallBackOrder:adjustRenditionKeyWithBlock:] + 297
    frame #9: 0x00007fff493eccbe CoreUI`-[CUICatalog _resolvedRenditionKeyForName:scaleFactor:deviceIdiom:deviceSubtype:displayGamut:layoutDirection:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:deviceSubtypeFallBackOrder:withBaseKeySelector:adjustRenditionKeyWithBlock:] + 256
    frame #10: 0x00007fff493e7e84 CoreUI`-[CUICatalog _imageWithName:scaleFactor:deviceIdiom:deviceSubtype:displayGamut:layoutDirection:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:appearanceIdentifier:graphicsFallBackOrder:deviceSubtypeFallBackOrder:] + 216
    frame #11: 0x00007fff493e7fe8 CoreUI`-[CUICatalog imageWithName:scaleFactor:deviceIdiom:deviceSubtype:displayGamut:layoutDirection:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:appearanceIdentifier:graphicsFallBackOrder:deviceSubtypeFallBackOrder:] + 162
    frame #12: 0x00007fff493e7a6f CoreUI`-[CUICatalog imageWithName:scaleFactor:deviceIdiom:deviceSubtype:displayGamut:layoutDirection:sizeClassHorizontal:sizeClassVertical:appearanceName:] + 233
    frame #13: 0x00007fff493258e9 CoreUI`-[CUICatalog imageWithName:scaleFactor:displayGamut:layoutDirection:appearanceName:] + 47
    frame #14: 0x00007fff49325848 CoreUI`-[CUISharedArtCatalog imageWithName:scaleFactor:displayGamut:layoutDirection:appearanceNames:] + 1261
    frame #15: 0x00007fff49324378 CoreUI`CopyDefaultEffectsArray(long, CUIDescriptor const*, bool*) + 160
    frame #16: 0x00007fff493237da CoreUI`CUIRenderer::CopyImageMeasurements(long, CUIDescriptor const*, __CFArray const*, __CFDictionary*) + 48
    frame #17: 0x00007fff4931ffd0 CoreUI`CUIRenderer::CopyMeasurements(CGRect, CGContext*, __CFDictionary const*, __CFArray const*) + 254
    frame #18: 0x00007fff4931fe96 CoreUI`CUICopyMeasurements + 288
    frame #19: 0x00007fff2d522811 AppKit`-[NSCoreUIImageRep initWithCocoaName:] + 409
    frame #20: 0x00007fff2d52266c AppKit`+[NSCoreUIImageRep imageRepWithCocoaName:] + 43
    frame #21: 0x00007fff2db2b439 AppKit`+[NSImage _coreUIImageNamed:] + 37
    frame #22: 0x00007fff2db2b5f0 AppKit`+[NSImage _systemImageNamed:] + 205
    frame #23: 0x00007fff2d5224d9 AppKit`+[NSImage imageNamed:] + 142
    frame #24: 0x00000001000ee3cc mpv`-[TouchBar init] + 844
    frame #25: 0x00000001000e6dfd mpv`-[Application makeTouchBar] + 45
    frame #26: 0x00007fff2d5fd91c AppKit`-[NSResponder(NSTouchBarProvider) touchBar] + 56
    frame #27: 0x00007fff2d980137 AppKit`-[NSApplication(NSNewDocumentTouchBar) touchBar] + 42
    frame #28: 0x00000001000e6fe4 mpv`-[Application processEvent:] + 52
    frame #29: 0x00000001000e815d mpv`-[EventsResponder processEvent:] + 45
    frame #30: 0x00000001000e810a mpv`__29-[EventsResponder readEvents]_block_invoke + 74
    frame #31: 0x00007fff675a0553 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #32: 0x00007fff675a14de libdispatch.dylib`_dispatch_client_callout + 8
    frame #33: 0x00007fff675acbd3 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1105
    frame #34: 0x00007fff302f3290 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    frame #35: 0x00007fff302f29da CoreFoundation`__CFRunLoopRun + 2370
    frame #36: 0x00007fff302f1e13 CoreFoundation`CFRunLoopRunSpecific + 499
    frame #37: 0x00007fff2ee7eb2d HIToolbox`RunCurrentEventLoopInMode + 292
    frame #38: 0x00007fff2ee7e86d HIToolbox`ReceiveNextEventCommon + 600
    frame #39: 0x00007fff2ee7e5f7 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 64
    frame #40: 0x00007fff2d514ac4 AppKit`_DPSNextEvent + 990
    frame #41: 0x00007fff2d513834 AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
    frame #42: 0x00007fff2d50dfd4 AppKit`-[NSApplication run] + 658
    frame #43: 0x00000001000e78ee mpv`cocoa_main + 990
    frame #44: 0x00007fff675f1405 libdyld.dylib`start + 1
  thread #2
    frame #0: 0x00007fff6773bb7a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff677fa7c7 libsystem_pthread.dylib`_pthread_wqthread + 390
    frame #2: 0x00007fff677fa5c3 libsystem_pthread.dylib`start_wqthread + 15
  thread #3
    frame #0: 0x00007fff6773bb7a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff677fa7c7 libsystem_pthread.dylib`_pthread_wqthread + 390
    frame #2: 0x00007fff677fa5c3 libsystem_pthread.dylib`start_wqthread + 15
  thread #4, name = 'mpv/playback core (OSX)'
    frame #0: 0x00007fff6773d8f6 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff677fe082 libsystem_pthread.dylib`_pthread_cond_wait + 701
    frame #2: 0x0000000100053e7b mpv`mp_dispatch_queue_process + 379
    frame #3: 0x000000010008f3bc mpv`mp_idle + 140
    frame #4: 0x0000000100085108 mpv`open_demux_reentrant + 280
    frame #5: 0x0000000100083398 mpv`mp_play_files + 1336
    frame #6: 0x0000000100089d34 mpv`mpv_main + 116
    frame #7: 0x00000001000e797b mpv`playback_thread + 43
    frame #8: 0x00007fff677fdd76 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x00007fff677fa5d7 libsystem_pthread.dylib`thread_start + 15
  thread #5, name = 'mpv/terminal'
    frame #0: 0x00007fff677417c6 libsystem_kernel.dylib`__select + 10
    frame #1: 0x00000001000e2fb7 mpv`polldev + 423
    frame #2: 0x00000001000e1bb2 mpv`terminal_thread + 114
    frame #3: 0x00007fff677fdd76 libsystem_pthread.dylib`_pthread_start + 125
    frame #4: 0x00007fff677fa5d7 libsystem_pthread.dylib`thread_start + 15
  thread #6, name = 'mpv/lua script (osc)'
    frame #0: 0x00007fff6773d8f6 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff677fe082 libsystem_pthread.dylib`_pthread_cond_wait + 701
    frame #2: 0x0000000100069c2c mpv`wait_wakeup + 92
    frame #3: 0x000000010006a606 mpv`mpv_wait_event + 518
    frame #4: 0x0000000100086466 mpv`script_wait_event + 102
    frame #5: 0x00000001027da74a liblua.5.1.dylib`luaD_precall + 466
    frame #6: 0x00000001027e44f0 liblua.5.1.dylib`luaV_execute + 4680
    frame #7: 0x00000001027dabdf liblua.5.1.dylib`luaD_call + 98
    frame #8: 0x00000001027d717c liblua.5.1.dylib`lua_call + 39
    frame #9: 0x0000000100086103 mpv`load_scripts + 291
    frame #10: 0x00000001027da74a liblua.5.1.dylib`luaD_precall + 466
    frame #11: 0x00000001027dabce liblua.5.1.dylib`luaD_call + 81
    frame #12: 0x00000001027da2d0 liblua.5.1.dylib`luaD_rawrunprotected + 84
    frame #13: 0x00000001027dae48 liblua.5.1.dylib`luaD_pcall + 68
    frame #14: 0x00000001027d71ff liblua.5.1.dylib`lua_pcall + 102
    frame #15: 0x0000000100085c95 mpv`run_lua + 1621
    frame #16: 0x00000001027da74a liblua.5.1.dylib`luaD_precall + 466
    frame #17: 0x00000001027dabce liblua.5.1.dylib`luaD_call + 81
    frame #18: 0x00000001027da2d0 liblua.5.1.dylib`luaD_rawrunprotected + 84
    frame #19: 0x00000001027dae48 liblua.5.1.dylib`luaD_pcall + 68
    frame #20: 0x00000001027d7262 liblua.5.1.dylib`lua_cpcall + 45
    frame #21: 0x00000001000855a3 mpv`load_lua + 147
    frame #22: 0x0000000100090f3d mpv`script_thread + 125
    frame #23: 0x00007fff677fdd76 libsystem_pthread.dylib`_pthread_start + 125
    frame #24: 0x00007fff677fa5d7 libsystem_pthread.dylib`thread_start + 15
  thread #7, name = 'mpv/lua script (ytdl_hook)'
    frame #0: 0x00007fff6773d8f6 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff677fe082 libsystem_pthread.dylib`_pthread_cond_wait + 701
    frame #2: 0x0000000100069c2c mpv`wait_wakeup + 92
    frame #3: 0x000000010006a606 mpv`mpv_wait_event + 518
    frame #4: 0x0000000100086466 mpv`script_wait_event + 102
    frame #5: 0x00000001027da74a liblua.5.1.dylib`luaD_precall + 466
    frame #6: 0x00000001027e44f0 liblua.5.1.dylib`luaV_execute + 4680
    frame #7: 0x00000001027dabdf liblua.5.1.dylib`luaD_call + 98
    frame #8: 0x00000001027d717c liblua.5.1.dylib`lua_call + 39
    frame #9: 0x0000000100086103 mpv`load_scripts + 291
    frame #10: 0x00000001027da74a liblua.5.1.dylib`luaD_precall + 466
    frame #11: 0x00000001027dabce liblua.5.1.dylib`luaD_call + 81
    frame #12: 0x00000001027da2d0 liblua.5.1.dylib`luaD_rawrunprotected + 84
    frame #13: 0x00000001027dae48 liblua.5.1.dylib`luaD_pcall + 68
    frame #14: 0x00000001027d71ff liblua.5.1.dylib`lua_pcall + 102
    frame #15: 0x0000000100085c95 mpv`run_lua + 1621
    frame #16: 0x00000001027da74a liblua.5.1.dylib`luaD_precall + 466
    frame #17: 0x00000001027dabce liblua.5.1.dylib`luaD_call + 81
    frame #18: 0x00000001027da2d0 liblua.5.1.dylib`luaD_rawrunprotected + 84
    frame #19: 0x00000001027dae48 liblua.5.1.dylib`luaD_pcall + 68
    frame #20: 0x00000001027d7262 liblua.5.1.dylib`lua_cpcall + 45
    frame #21: 0x00000001000855a3 mpv`load_lua + 147
    frame #22: 0x0000000100090f3d mpv`script_thread + 125
    frame #23: 0x00007fff677fdd76 libsystem_pthread.dylib`_pthread_start + 125
    frame #24: 0x00007fff677fa5d7 libsystem_pthread.dylib`thread_start + 15
  thread #8, name = 'mpv/lua script (stats)'
    frame #0: 0x00007fff6773d8f6 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff677fe082 libsystem_pthread.dylib`_pthread_cond_wait + 701
    frame #2: 0x0000000100069c2c mpv`wait_wakeup + 92
    frame #3: 0x000000010006a606 mpv`mpv_wait_event + 518
    frame #4: 0x0000000100086466 mpv`script_wait_event + 102
    frame #5: 0x00000001027da74a liblua.5.1.dylib`luaD_precall + 466
    frame #6: 0x00000001027e44f0 liblua.5.1.dylib`luaV_execute + 4680
    frame #7: 0x00000001027dabdf liblua.5.1.dylib`luaD_call + 98
    frame #8: 0x00000001027d717c liblua.5.1.dylib`lua_call + 39
    frame #9: 0x0000000100086103 mpv`load_scripts + 291
    frame #10: 0x00000001027da74a liblua.5.1.dylib`luaD_precall + 466
    frame #11: 0x00000001027dabce liblua.5.1.dylib`luaD_call + 81
    frame #12: 0x00000001027da2d0 liblua.5.1.dylib`luaD_rawrunprotected + 84
    frame #13: 0x00000001027dae48 liblua.5.1.dylib`luaD_pcall + 68
    frame #14: 0x00000001027d71ff liblua.5.1.dylib`lua_pcall + 102
    frame #15: 0x0000000100085c95 mpv`run_lua + 1621
    frame #16: 0x00000001027da74a liblua.5.1.dylib`luaD_precall + 466
    frame #17: 0x00000001027dabce liblua.5.1.dylib`luaD_call + 81
    frame #18: 0x00000001027da2d0 liblua.5.1.dylib`luaD_rawrunprotected + 84
    frame #19: 0x00000001027dae48 liblua.5.1.dylib`luaD_pcall + 68
    frame #20: 0x00000001027d7262 liblua.5.1.dylib`lua_cpcall + 45
    frame #21: 0x00000001000855a3 mpv`load_lua + 147
    frame #22: 0x0000000100090f3d mpv`script_thread + 125
    frame #23: 0x00007fff677fdd76 libsystem_pthread.dylib`_pthread_start + 125
    frame #24: 0x00007fff677fa5d7 libsystem_pthread.dylib`thread_start + 15
  thread #9, name = 'com.apple.NSEventThread'
    frame #0: 0x00007fff6773a146 libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff6773a6ac libsystem_kernel.dylib`mach_msg + 60
    frame #2: 0x00007fff302f319b CoreFoundation`__CFRunLoopServiceMachPort + 322
    frame #3: 0x00007fff302f2737 CoreFoundation`__CFRunLoopRun + 1695
    frame #4: 0x00007fff302f1e13 CoreFoundation`CFRunLoopRunSpecific + 499
    frame #5: 0x00007fff2d51c026 AppKit`_NSEventThread + 132
    frame #6: 0x00007fff677fdd76 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x00007fff677fa5d7 libsystem_pthread.dylib`thread_start + 15
  thread #10
    frame #0: 0x0000000000000000
* thread #11, name = 'mpv/opener', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x00007fff675e2476 libdyld.dylib`stack_not_16_byte_aligned_error

apparently deactivating some stack check will fix this, eg configure like this.

 CFLAGS="-fno-stack-check" ./waf configure

thanks!

Ok, I built mpv with your instructions.

The did lldb cause same issue

Last login: Tue Oct 15 15:29:19 on ttys000
ss@sss-iMac ~ % lldb mpv
(lldb) target create "mpv"
Current executable set to 'mpv' (x86_64).
(lldb) run /Applications/mpv-master/build/mpv --no-config
Process 29379 launched: '/usr/local/bin/mpv' (x86_64)
Process 29379 stopped

  • thread #10, name = 'mpv/opener', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x00007fff73db2476 libdyld.dylibstack_not_16_byte_aligned_error libdyld.dylibstack_not_16_byte_aligned_error:
    -> 0x7fff73db2476 <+0>: movdqa %xmm0, (%rsp)
    0x7fff73db247b <+5>: int3
    0x7fff73db247c <+6>: nop
    0x7fff73db247d <+7>: nop
    Target 0: (mpv) stopped.
    (lldb) bt
  • thread #10, name = 'mpv/opener', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

    • frame #0: 0x00007fff73db2476 libdyld.dylibstack_not_16_byte_aligned_error (lldb) bt all thread #1, queue = 'com.apple.main-thread' frame #0: 0x00007fff73f0a146 libsystem_kernel.dylibmach_msg_trap + 10

      frame #1: 0x00007fff73f0a6ac libsystem_kernel.dylibmach_msg + 60 frame #2: 0x00007fff3cac319b CoreFoundation__CFRunLoopServiceMachPort + 322

      frame #3: 0x00007fff3cac2737 CoreFoundation__CFRunLoopRun + 1695 frame #4: 0x00007fff3cac1e13 CoreFoundationCFRunLoopRunSpecific + 499

      frame #5: 0x00007fff3b64eb2d HIToolboxRunCurrentEventLoopInMode + 292 frame #6: 0x00007fff3b64e86d HIToolboxReceiveNextEventCommon + 600

      frame #7: 0x00007fff3b64e5f7 HIToolbox_BlockUntilNextEventMatchingListInModeWithFilter + 64 frame #8: 0x00007fff39ce4ac4 AppKit_DPSNextEvent + 990

      frame #9: 0x00007fff39ce3834 AppKit-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352 frame #10: 0x00007fff39cddfd4 AppKit-[NSApplication run] + 658

      frame #11: 0x00000001000e747e mpvcocoa_main + 990 frame #12: 0x00007fff73dc1405 libdyld.dylibstart + 1

      thread #2

      frame #0: 0x00007fff73f0bb7a libsystem_kernel.dylib__workq_kernreturn + 10 frame #1: 0x00007fff73fca7c7 libsystem_pthread.dylib_pthread_wqthread + 390

      frame #2: 0x00007fff73fca5c3 libsystem_pthread.dylibstart_wqthread + 15 thread #3 frame #0: 0x00007fff73f0bb7a libsystem_kernel.dylib__workq_kernreturn + 10

      frame #1: 0x00007fff73fca7c7 libsystem_pthread.dylib_pthread_wqthread + 390 frame #2: 0x00007fff73fca5c3 libsystem_pthread.dylibstart_wqthread + 15

      thread #4, name = 'mpv/playback core (OSX)'

      frame #0: 0x00007fff73f0d8f6 libsystem_kernel.dylib__psynch_cvwait + 10 frame #1: 0x00007fff73fce082 libsystem_pthread.dylib_pthread_cond_wait + 701

      frame #2: 0x0000000100053a4b mpvmp_dispatch_queue_process + 379 frame #3: 0x000000010008ef7c mpvmp_idle + 140

      frame #4: 0x0000000100084cc8 mpvopen_demux_reentrant + 280 frame #5: 0x0000000100082f58 mpvmp_play_files + 1336

      frame #6: 0x00000001000898f4 mpvmpv_main + 116 frame #7: 0x00000001000e750b mpvplayback_thread + 43

      frame #8: 0x00007fff73fcdd76 libsystem_pthread.dylib_pthread_start + 125 frame #9: 0x00007fff73fca5d7 libsystem_pthread.dylibthread_start + 15

      thread #5, name = 'mpv/terminal'

      frame #0: 0x00007fff73f117c6 libsystem_kernel.dylib__select + 10 frame #1: 0x00000001000e2b47 mpvpolldev + 423

      frame #2: 0x00000001000e1742 mpvterminal_thread + 114 frame #3: 0x00007fff73fcdd76 libsystem_pthread.dylib_pthread_start + 125

      frame #4: 0x00007fff73fca5d7 libsystem_pthread.dylibthread_start + 15 thread #6, name = 'mpv/lua script (osc)' frame #0: 0x00007fff73f0d8f6 libsystem_kernel.dylib__psynch_cvwait + 10

      frame #1: 0x00007fff73fce082 libsystem_pthread.dylib_pthread_cond_wait + 701 frame #2: 0x00000001000697fc mpvwait_wakeup + 92

      frame #3: 0x000000010006a1d6 mpvmpv_wait_event + 518 frame #4: 0x0000000100086026 mpvscript_wait_event + 102

      frame #5: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466 frame #6: 0x00000001027e44f0 liblua.5.1.dylibluaV_execute + 4680

      frame #7: 0x00000001027dabdf liblua.5.1.dylibluaD_call + 98 frame #8: 0x00000001027d717c liblua.5.1.dyliblua_call + 39

      frame #9: 0x0000000100085cc3 mpvload_scripts + 291 frame #10: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466

      frame #11: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81 frame #12: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84

      frame #13: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68 frame #14: 0x00000001027d71ff liblua.5.1.dyliblua_pcall + 102

      frame #15: 0x0000000100085855 mpvrun_lua + 1621 frame #16: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466

      frame #17: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81 frame #18: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84

      frame #19: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68 frame #20: 0x00000001027d7262 liblua.5.1.dyliblua_cpcall + 45

      frame #21: 0x0000000100085163 mpvload_lua + 147 frame #22: 0x0000000100090afd mpvscript_thread + 125

      frame #23: 0x00007fff73fcdd76 libsystem_pthread.dylib_pthread_start + 125 frame #24: 0x00007fff73fca5d7 libsystem_pthread.dylibthread_start + 15

      thread #7, name = 'mpv/lua script (ytdl_hook)'

      frame #0: 0x00007fff73f0d8f6 libsystem_kernel.dylib__psynch_cvwait + 10 frame #1: 0x00007fff73fce082 libsystem_pthread.dylib_pthread_cond_wait + 701

      frame #2: 0x00000001000697fc mpvwait_wakeup + 92 frame #3: 0x000000010006a1d6 mpvmpv_wait_event + 518

      frame #4: 0x0000000100086026 mpvscript_wait_event + 102 frame #5: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466

      frame #6: 0x00000001027e44f0 liblua.5.1.dylibluaV_execute + 4680 frame #7: 0x00000001027dabdf liblua.5.1.dylibluaD_call + 98

      frame #8: 0x00000001027d717c liblua.5.1.dyliblua_call + 39 frame #9: 0x0000000100085cc3 mpvload_scripts + 291

      frame #10: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466 frame #11: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81

      frame #12: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84 frame #13: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68

      frame #14: 0x00000001027d71ff liblua.5.1.dyliblua_pcall + 102 frame #15: 0x0000000100085855 mpvrun_lua + 1621

      frame #16: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466 frame #17: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81

      frame #18: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84 frame #19: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68

      frame #20: 0x00000001027d7262 liblua.5.1.dyliblua_cpcall + 45 frame #21: 0x0000000100085163 mpvload_lua + 147

      frame #22: 0x0000000100090afd mpvscript_thread + 125 frame #23: 0x00007fff73fcdd76 libsystem_pthread.dylib_pthread_start + 125

      frame #24: 0x00007fff73fca5d7 libsystem_pthread.dylibthread_start + 15 thread #8, name = 'mpv/lua script (stats)' frame #0: 0x00007fff73f0d8f6 libsystem_kernel.dylib__psynch_cvwait + 10

      frame #1: 0x00007fff73fce082 libsystem_pthread.dylib_pthread_cond_wait + 701 frame #2: 0x00000001000697fc mpvwait_wakeup + 92

      frame #3: 0x000000010006a1d6 mpvmpv_wait_event + 518 frame #4: 0x0000000100086026 mpvscript_wait_event + 102

      frame #5: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466 frame #6: 0x00000001027e44f0 liblua.5.1.dylibluaV_execute + 4680

      frame #7: 0x00000001027dabdf liblua.5.1.dylibluaD_call + 98 frame #8: 0x00000001027d717c liblua.5.1.dyliblua_call + 39

      frame #9: 0x0000000100085cc3 mpvload_scripts + 291 frame #10: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466

      frame #11: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81 frame #12: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84

      frame #13: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68 frame #14: 0x00000001027d71ff liblua.5.1.dyliblua_pcall + 102

      frame #15: 0x0000000100085855 mpvrun_lua + 1621 frame #16: 0x00000001027da74a liblua.5.1.dylibluaD_precall + 466

      frame #17: 0x00000001027dabce liblua.5.1.dylibluaD_call + 81 frame #18: 0x00000001027da2d0 liblua.5.1.dylibluaD_rawrunprotected + 84

      frame #19: 0x00000001027dae48 liblua.5.1.dylibluaD_pcall + 68 frame #20: 0x00000001027d7262 liblua.5.1.dyliblua_cpcall + 45

      frame #21: 0x0000000100085163 mpvload_lua + 147 frame #22: 0x0000000100090afd mpvscript_thread + 125

      frame #23: 0x00007fff73fcdd76 libsystem_pthread.dylib_pthread_start + 125 frame #24: 0x00007fff73fca5d7 libsystem_pthread.dylibthread_start + 15

      thread #9, name = 'com.apple.NSEventThread'

      frame #0: 0x00007fff73f0a146 libsystem_kernel.dylibmach_msg_trap + 10 frame #1: 0x00007fff73f0a6ac libsystem_kernel.dylibmach_msg + 60

      frame #2: 0x00007fff3cac319b CoreFoundation__CFRunLoopServiceMachPort + 322 frame #3: 0x00007fff3cac2737 CoreFoundation__CFRunLoopRun + 1695

      frame #4: 0x00007fff3cac1e13 CoreFoundationCFRunLoopRunSpecific + 499 frame #5: 0x00007fff39cec026 AppKit_NSEventThread + 132

      frame #6: 0x00007fff73fcdd76 libsystem_pthread.dylib_pthread_start + 125 frame #7: 0x00007fff73fca5d7 libsystem_pthread.dylibthread_start + 15

  • thread #10, name = 'mpv/opener', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

    • frame #0: 0x00007fff73db2476 libdyld.dylib`stack_not_16_byte_aligned_error

      (lldb)

maybe it's how I installed FFmpeg? I used this to install with everything;
brew install $FFMPEG_TAP_NAME/ffmpeg $(brew options $FFMPEG_TAP_NAME/ffmpeg | grep -vE '\s' | grep -- '--with-' | tr '\n' ' ')

I also get

ss@sss-iMac ~ % ffmpeg
zsh: segmentation fault ffmpeg
ss@sss-iMac ~ %

tried this

ss@sss-iMac ~ % lldb ffmpeg
(lldb) target create "ffmpeg"
Current executable set to 'ffmpeg' (x86_64).
(lldb) run /usr/local/bin/ffmpeg
Process 29683 launched: '/usr/local/bin/ffmpeg' (x86_64)
Process 29683 stopped

  • thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x00007fff73db2476 libdyld.dylibstack_not_16_byte_aligned_error libdyld.dylibstack_not_16_byte_aligned_error:
    -> 0x7fff73db2476 <+0>: movdqa %xmm0, (%rsp)
    0x7fff73db247b <+5>: int3
    0x7fff73db247c <+6>: nop
    0x7fff73db247d <+7>: nop
    Target 0: (ffmpeg) stopped.
    (lldb) bt
  • thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

    • frame #0: 0x00007fff73db2476 libdyld.dylib`stack_not_16_byte_aligned_error

      (lldb) bt all

  • thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

    • frame #0: 0x00007fff73db2476 libdyld.dylib`stack_not_16_byte_aligned_error

yes, we had a little chat on irc and the actual segfault is most likely within ffmpeg or/and its libraries. they have to be compiled with the same clflag i posted above.

another workaround, supposedly, is to build everything with MACOSX_DEPLOYMENT_TARGET=10.14.

ideally apple fixed their shit, it has been reported to them since august.

since it has been reported to apple.

Was this page helpful?
0 / 5 - 0 ratings