Vec::drain_filter
s/\?$//
mkdir build && cd build
cmake -G "MinGW Makefiles" <your ddnet options here> ..
make
frame #2: 0x000000018fe16ac4 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
frame #3: 0x000000010001a3f4 DDNet`CGraphicsBackend_Threaded::WaitForIdle() + 80
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x000000018fe8d564 libsystem_kernel.dylib`__psynch_cvwait + 8
frame #1: 0x000000018fec9638 libsystem_pthread.dylib`_pthread_cond_wait + 1232
frame #2: 0x000000018fe16ac4 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
frame #3: 0x0000000100048934 DDNet`void std::__1::condition_variable::wait<CGraphicsBackend_Threaded::WaitForIdle()::$_2>(this=0x0000000105826690, __lk=0x000000016fdfc748, __pred=(unnamed class) @ 0x000000016fdfc700)::$_2) at __mutex_base:404:9
frame #4: 0x00000001000488b0 DDNet`CGraphicsBackend_Threaded::WaitForIdle(this=0x0000000105826600) at backend_sdl.cpp:150:19
frame #5: 0x00000001000b5478 DDNet`CGraphics_Threaded::WaitForIdle(this=0x00000001085d8000) at graphics_threaded.cpp:3205:14
frame #6: 0x00000001000b4784 DDNet`CGraphics_Threaded::Swap(this=0x00000001085d8000) at graphics_threaded.cpp:3134:3
frame #7: 0x000000010006e738 DDNet`CClient::Run(this=0x0000000108020000) at client.cpp:3300:19
frame #8: 0x0000000100077910 DDNet`::TWMain(argc=1, argv=0x000000016fdff7e8) at client.cpp:4726:11
frame #9: 0x0000000100166524 DDNet`main(argc=1, argv=0x000000016fdff7e8) at client.mm:21:10
frame #10: 0x000000018fb9fe50 dyld`start + 2544
(lldb) thread list
Process 12560 stopped
* thread #1: tid = 0x25c78, 0x000000018fe8d564 libsystem_kernel.dylib`__psynch_cvwait + 8, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
thread #2: tid = 0x25cd2, 0x000000018fe9885c libsystem_kernel.dylib`sem_wait + 8
thread #3: tid = 0x25cd3, 0x000000018fe9885c libsystem_kernel.dylib`sem_wait + 8
thread #4: tid = 0x25cd4, 0x000000018fe9885c libsystem_kernel.dylib`sem_wait + 8
thread #6: tid = 0x25cd6, 0x000000018fe8ba1c libsystem_kernel.dylib`__workq_kernreturn + 8
thread #9: tid = 0x25cdf, 0x000000018fe8bb24 libsystem_kernel.dylib`__ulock_wait + 8
thread #10: tid = 0x25ce0, 0x000000018fe8ba1c libsystem_kernel.dylib`__workq_kernreturn + 8
thread #11: tid = 0x25ce1, 0x000000018fe8ba1c libsystem_kernel.dylib`__workq_kernreturn + 8
thread #12: tid = 0x25ce2, 0x000000018fe89cec libsystem_kernel.dylib`semaphore_wait_trap + 8, name = 'caulk.messenger.shared:17'
thread #13: tid = 0x25cfa, 0x000000018fe89d70 libsystem_kernel.dylib`mach_msg2_trap + 8, name = 'AudioQueue thread'
thread #14: tid = 0x25cfb, 0x000000018fe89cec libsystem_kernel.dylib`semaphore_wait_trap + 8, name = 'caulk.messenger.shared:high'
thread #15: tid = 0x25cfd, 0x000000018fe8d564 libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'AQConverterThread'
thread #16: tid = 0x25cfe, 0x000000018fe89d70 libsystem_kernel.dylib`mach_msg2_trap + 8, name = 'com.apple.audio.IOThread.client'
thread #17: tid = 0x25d1c, 0x000000018fe89d70 libsystem_kernel.dylib`mach_msg2_trap + 8, name = 'com.apple.NSEventThread'
thread #18: tid = 0x25d2f, 0x0000000000000000
thread #19: tid = 0x25d6e, 0x000000018fe8d564 libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'CVDisplayLink'
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x000000018fe8d564 libsystem_kernel.dylib`__psynch_cvwait + 8
frame #1: 0x000000018fec9638 libsystem_pthread.dylib`_pthread_cond_wait + 1232
frame #2: 0x000000018fe16ac4 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
frame #3: 0x0000000100048934 DDNet`void std::__1::condition_variable::wait<CGraphicsBackend_Threaded::WaitForIdle()::$_2>(this=0x0000000105826690, __lk=0x000000016fdfc748, __pred=(unnamed class) @ 0x000000016fdfc700)::$_2) at __mutex_base:404:9
frame #4: 0x00000001000488b0 DDNet`CGraphicsBackend_Threaded::WaitForIdle(this=0x0000000105826600) at backend_sdl.cpp:150:19
frame #5: 0x00000001000b5478 DDNet`CGraphics_Threaded::WaitForIdle(this=0x00000001085d8000) at graphics_threaded.cpp:3205:14
frame #6: 0x00000001000b4784 DDNet`CGraphics_Threaded::Swap(this=0x00000001085d8000) at graphics_threaded.cpp:3134:3
frame #7: 0x000000010006e738 DDNet`CClient::Run(this=0x0000000108020000) at client.cpp:3300:19
frame #8: 0x0000000100077910 DDNet`::TWMain(argc=1, argv=0x000000016fdff7e8) at client.cpp:4726:11
frame #9: 0x0000000100166524 DDNet`main(argc=1, argv=0x000000016fdff7e8) at client.mm:21:10
frame #10: 0x000000018fb9fe50 dyld`start + 2544
#ifdef CONF_PLATFORM_MACOS
if(str_find(GetVersionString(), "Metal"))
WaitForIdle();
#endif
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x000000018fe8ca1c libsystem_kernel.dylib`__psynch_mutexwait + 8
frame #1: 0x000000018fec6144 libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_wait + 84
frame #2: 0x000000018fec3a9c libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_slow + 248
frame #3: 0x000000018fe189e8 libc++.1.dylib`std::__1::mutex::lock() + 16
frame #4: 0x0000000100057f44 DDNet`std::__1::unique_lock<std::__1::mutex>::unique_lock(this=0x000000016fdfc4d8, __m=0x000000010601f650) at __mutex_base:118:61
frame #5: 0x0000000100047b30 DDNet`std::__1::unique_lock<std::__1::mutex>::unique_lock(this=0x000000016fdfc4d8, __m=0x000000010601f650) at __mutex_base:118:54
frame #6: 0x00000001000488ec DDNet`CGraphicsBackend_Threaded::WaitForIdle(this=0x000000010601f600) at backend_sdl.cpp:149:31
frame #7: 0x0000000100048474 DDNet`CGraphicsBackend_Threaded::RunBuffer(this=0x000000010601f600, pBuffer=0x000060000172cb00) at backend_sdl.cpp:122:2
frame #8: 0x00000001000a4a74 DDNet`CGraphics_Threaded::KickCommandBuffer(this=0x00000001085b8000) at graphics_threaded.cpp:795:14
frame #9: 0x00000001000b39d4 DDNet`CGraphics_Threaded::GotResized(this=0x00000001085b8000, w=1512, h=945, RefreshRate=120) at graphics_threaded.cpp:3000:2
frame #10: 0x00000001000d6c48 DDNet`CInput::Update(this=0x000000010580d000) at input.cpp:713:17
frame #11: 0x000000010006e07c DDNet`CClient::Run(this=0x0000000108020000) at client.cpp:3166:15
frame #12: 0x0000000100077964 DDNet`::TWMain(argc=1, argv=0x000000016fdff7e8) at client.cpp:4726:11
frame #13: 0x0000000100166544 DDNet`main(argc=1, argv=0x000000016fdff7e8) at client.mm:21:10
frame #14: 0x000000018fb9fe50 dyld`start + 2544
(lldb)
(edited) frame #0: 0x000000018fe8bb24 libsystem_kernel.dylib`__ulock_wait + 8
frame #1: 0x000000018fd42ef4 libdispatch.dylib`_dlock_wait + 56
frame #2: 0x000000018fd42ca8 libdispatch.dylib`_dispatch_thread_event_wait_slow + 56
frame #3: 0x000000018fd51d88 libdispatch.dylib`__DISPATCH_WAIT_FOR_QUEUE__ + 368
frame #4: 0x000000018fd51934 libdispatch.dylib`_dispatch_sync_f_slow + 144
frame #5: 0x00000001013ff034 libSDL2-2.0.0.dylib`-[SDLOpenGLContext explicitUpdate] + 216
frame #6: 0x00000001013ff9bc libSDL2-2.0.0.dylib`Cocoa_GL_SwapWindow + 284
frame #7: 0x00000001000493d4 DDNet`CCommandProcessorFragment_SDL::Cmd_Swap(this=0x00006000029186a0, pCommand=0x0000000108a8cdc0) at backend_sdl.cpp:217:3
frame #8: 0x0000000100049704 DDNet`CCommandProcessorFragment_SDL::RunCommand(this=0x00006000029186a0, pBaseCommand=0x0000000108a8cdc0) at backend_sdl.cpp:256:33
frame #9: 0x0000000100049f28 DDNet`CCommandProcessor_SDL_GL::RunBuffer(this=0x0000600002918690, pBuffer=0x000060000172cb80) at backend_sdl.cpp:353:12
frame #10: 0x0000000100047a6c DDNet`CGraphicsBackend_Threaded::ThreadFunc(pUser=0x000000010601f600) at backend_sdl.cpp:63:25
frame #11: 0x000000010049caf0 DDNet`thread_run(user=0x0000600000009560) at system.cpp:731:2
frame #12: 0x000000018fec906c libsystem_pthread.dylib`_pthread_start + 148
In that crash report, thread 0 (the main thread) is doing the OpenGL context update that was sent through a dispatch queue, while thread 9 (the rendering thread?) is calling into the GL to draw, and this is causing a crash inside the GL.
Which leads me to ask: are you sure you used the right build of SDL? The latest in revision control, that changed the hint to default to synchronous updates? I don't see any threads that appear to be blocked, waiting on that update in the main thread to finish, which would cause this sort of crash.
SDL_HINT_MAC_OPENGL_SYNC_DISPATCH=1 ./DDNet