blueboxd / chromium-legacy

Latest Chromium (≒Chrome Canary/Stable) for Mac OS X 10.7+
BSD 3-Clause "New" or "Revised" License
297 stars 17 forks source link

[CRASH] Chromium GPU Helper uses unavailable VideoToolBox function (VTIsHardwareDecodeSupported) #210

Open RJVB opened 7 months ago

RJVB commented 7 months ago

Describe the bug The CPU helper process attemps to use a VideoToolBox function (VTIsHardwareDecodeSupported) that isn't available before I think 10.13 .

Desktop (please complete the following information):

Logs Process: Chromium Helper (GPU) [6848] Path: /Applications/Internet/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/121.0.6167.160.1/Helpers/Chromium Helper (GPU).app/Contents/MacOS/Chromium Helper (GPU) Identifier: Chromium Helper (GPU) Version: 121.0.6167.160.1 (6167.160) Code Type: X86-64 (Native) Parent Process: Chromium [6798] Responsible: Chromium [6798] User ID: 505

Date/Time: 2024-03-07 03:20:56.351 +0100 OS Version: Mac OS X 10.9.5 (13F1911) Report Version: 11 Anonymous UUID: 64B814D9-356F-6F85-8341-E17C1354A330

Sleep/Wake UUID: 5B7AB66C-BDFC-4652-A4D9-8AB52EC30FE8

Crashed Thread: 15 ThreadPoolSingleThreadSharedForeground0

Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000

Dyld Error Message: Symbol not found: _VTIsHardwareDecodeSupported Referenced from: /Applications/Internet/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/121.0.6167.160.1/Helpers/Chromium Helper (GPU).app/Contents/MacOS/../../../../Chromium Framework Expected in: /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox

Thread 0:: CrGpuMain Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff85423a1a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff85422d18 mach_msg + 64 2 com.apple.CoreFoundation 0x00007fff8d920f15 CFRunLoopServiceMachPort + 181 3 com.apple.CoreFoundation 0x00007fff8d920539 CFRunLoopRun + 1161 4 com.apple.CoreFoundation 0x00007fff8d91fe75 CFRunLoopRunSpecific + 309 5 com.apple.Foundation 0x00007fff8a0b60fc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 253 6 org.chromium.Chromium.framework 0x00000001103f21a9 base::MessagePumpNSRunLoop::DoRun(base::MessagePump::Delegate) + 153 7 org.chromium.Chromium.framework 0x00000001103f0f09 base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate) + 105 8 org.chromium.Chromium.framework 0x00000001103aa50c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 284 9 org.chromium.Chromium.framework 0x0000000110373965 base::RunLoop::Run(base::Location const&) + 389 10 org.chromium.Chromium.framework 0x0000000116614c49 content::GpuMain(content::MainFunctionParams) + 1097 11 org.chromium.Chromium.framework 0x000000010f67ce64 content::RunOtherNamedProcessTypeMain(std::Cr::basic_string<char, std::__Cr::char_traits, std::Cr::allocator > const&, content::MainFunctionParams, content::ContentMainDelegate) + 612 12 org.chromium.Chromium.framework 0x000000010f67d8d9 content::ContentMainRunnerImpl::Run() + 601 13 org.chromium.Chromium.framework 0x000000010f67c51a content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner) + 1226 14 org.chromium.Chromium.framework 0x000000010f67c602 content::ContentMain(content::ContentMainParams) + 98 15 org.chromium.Chromium.framework 0x000000010b623161 ChromeMain + 769 16 org.chromium.Chromium.helper 0x000000010b567a4b main + 363 17 org.chromium.Chromium.helper 0x000000010b5678d4 start + 52

Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x00007fff85428662 kevent64 + 10 1 libdispatch.dylib 0x00007fff8ddf8421 _dispatch_mgr_invoke + 239 2 libdispatch.dylib 0x00007fff8ddf8136 _dispatch_mgr_thread + 52

Thread 2: 0 libsystem_kernel.dylib 0x00007fff85427e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff85fddf08 _pthread_wqthread + 330 2 libsystem_pthread.dylib 0x00007fff85fe0fb9 start_wqthread + 13

Thread 3: 0 libsystem_kernel.dylib 0x00007fff85427e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff85fddf08 _pthread_wqthread + 330 2 libsystem_pthread.dylib 0x00007fff85fe0fb9 start_wqthread + 13

Thread 4: 0 libsystem_kernel.dylib 0x00007fff85427e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff85fddf08 _pthread_wqthread + 330 2 libsystem_pthread.dylib 0x00007fff85fe0fb9 start_wqthread + 13

Thread 5:: StackSamplingProfiler 0 libsystem_kernel.dylib 0x00007fff85423a1a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff85422d18 mach_msg + 64 2 org.chromium.Chromium.framework 0x00000001103f5686 base::WaitableEvent::TimedWaitImpl(base::TimeDelta) + 390 3 org.chromium.Chromium.framework 0x000000011038eaf3 base::WaitableEvent::TimedWait(base::TimeDelta) + 163 4 org.chromium.Chromium.framework 0x000000011034632c base::MessagePumpDefault::Run(base::MessagePump::Delegate) + 252 5 org.chromium.Chromium.framework 0x00000001103aa50c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 284 6 org.chromium.Chromium.framework 0x0000000110373965 base::RunLoop::Run(base::Location const&) + 389 7 org.chromium.Chromium.framework 0x00000001103c9498 base::Thread::Run(base::RunLoop) + 56 8 org.chromium.Chromium.framework 0x00000001103c95bc base::Thread::ThreadMain() + 268 9 org.chromium.Chromium.framework 0x00000001103dcfa9 base::(anonymous namespace)::ThreadFunc(void*) + 105 10 libsystem_pthread.dylib 0x00007fff85fdc899 _pthread_body + 138 11 libsystem_pthread.dylib 0x00007fff85fdc72a _pthread_start + 137 12 libsystem_pthread.dylib 0x00007fff85fe0fc9 thread_start + 13

Thread 6:: GpuWatchdog 0 libsystem_kernel.dylib 0x00007fff85423a1a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff85422d18 mach_msg + 64 2 org.chromium.Chromium.framework 0x00000001103f5686 base::WaitableEvent::TimedWaitImpl(base::TimeDelta) + 390 3 org.chromium.Chromium.framework 0x000000011038eaf3 base::WaitableEvent::TimedWait(base::TimeDelta) + 163 4 org.chromium.Chromium.framework 0x000000011034632c base::MessagePumpDefault::Run(base::MessagePump::Delegate) + 252 5 org.chromium.Chromium.framework 0x00000001103aa50c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 284 6 org.chromium.Chromium.framework 0x0000000110373965 base::RunLoop::Run(base::Location const&) + 389 7 org.chromium.Chromium.framework 0x00000001103c9498 base::Thread::Run(base::RunLoop) + 56 8 org.chromium.Chromium.framework 0x00000001103c95bc base::Thread::ThreadMain() + 268 9 org.chromium.Chromium.framework 0x00000001103dcfa9 base::(anonymous namespace)::ThreadFunc(void*) + 105 10 libsystem_pthread.dylib 0x00007fff85fdc899 _pthread_body + 138 11 libsystem_pthread.dylib 0x00007fff85fdc72a _pthread_start + 137 12 libsystem_pthread.dylib 0x00007fff85fe0fc9 thread_start + 13

Thread 7:: ThreadPoolServiceThread 0 libsystem_kernel.dylib 0x00007fff85428662 kevent64 + 10 1 org.chromium.Chromium.framework 0x0000000110402ed6 base::MessagePumpKqueue::DoInternalWork(base::MessagePump::Delegate, base::MessagePump::Delegate::NextWorkInfo) + 374 2 org.chromium.Chromium.framework 0x0000000110402cde base::MessagePumpKqueue::RunSimplified(base::MessagePump::Delegate) + 78 3 org.chromium.Chromium.framework 0x0000000110402bb6 base::MessagePumpKqueue::Run(base::MessagePump::Delegate) + 70 4 org.chromium.Chromium.framework 0x00000001103aa50c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 284 5 org.chromium.Chromium.framework 0x0000000110373965 base::RunLoop::Run(base::Location const&) + 389 6 org.chromium.Chromium.framework 0x00000001103c9498 base::Thread::Run(base::RunLoop) + 56 7 org.chromium.Chromium.framework 0x00000001103b75dd base::internal::ServiceThread::Run(base::RunLoop) + 13 8 org.chromium.Chromium.framework 0x00000001103c95bc base::Thread::ThreadMain() + 268 9 org.chromium.Chromium.framework 0x00000001103dcfa9 base::(anonymous namespace)::ThreadFunc(void*) + 105 10 libsystem_pthread.dylib 0x00007fff85fdc899 _pthread_body + 138 11 libsystem_pthread.dylib 0x00007fff85fdc72a _pthread_start + 137 12 libsystem_pthread.dylib 0x00007fff85fe0fc9 thread_start + 13

Thread 8:: ThreadPoolForegroundWorker 0 libsystem_kernel.dylib 0x00007fff85423a1a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff85422d18 mach_msg + 64 2 org.chromium.Chromium.framework 0x00000001103f5686 base::WaitableEvent::TimedWaitImpl(base::TimeDelta) + 390 3 org.chromium.Chromium.framework 0x000000011038eaf3 base::WaitableEvent::TimedWait(base::TimeDelta) + 163 4 org.chromium.Chromium.framework 0x00000001103c059d base::internal::WorkerThreadWaitableEvent::Delegate::TimedWait(base::TimeDelta) + 13 5 org.chromium.Chromium.framework 0x00000001103bfde3 base::internal::WorkerThread::RunWorker() + 451 6 org.chromium.Chromium.framework 0x00000001103bfb9d base::internal::WorkerThread::RunPooledWorker() + 13 7 org.chromium.Chromium.framework 0x00000001103bfa90 base::internal::WorkerThread::ThreadMain() + 128 8 org.chromium.Chromium.framework 0x00000001103dcfa9 base::(anonymous namespace)::ThreadFunc(void*) + 105 9 libsystem_pthread.dylib 0x00007fff85fdc899 _pthread_body + 138 10 libsystem_pthread.dylib 0x00007fff85fdc72a _pthread_start + 137 11 libsystem_pthread.dylib 0x00007fff85fe0fc9 thread_start + 13

Thread 9:: ThreadPoolBackgroundWorker 0 libsystem_kernel.dylib 0x00007fff85423a1a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff85422d18 mach_msg + 64 2 org.chromium.Chromium.framework 0x00000001103f5686 base::WaitableEvent::TimedWaitImpl(base::TimeDelta) + 390 3 org.chromium.Chromium.framework 0x000000011038eaf3 base::WaitableEvent::TimedWait(base::TimeDelta) + 163 4 org.chromium.Chromium.framework 0x00000001103c059d base::internal::WorkerThreadWaitableEvent::Delegate::TimedWait(base::TimeDelta) + 13 5 org.chromium.Chromium.framework 0x00000001103bfde3 base::internal::WorkerThread::RunWorker() + 451 6 org.chromium.Chromium.framework 0x00000001103bfb0d base::internal::WorkerThread::RunBackgroundPooledWorker() + 13 7 org.chromium.Chromium.framework 0x00000001103bfae6 base::internal::WorkerThread::ThreadMain() + 214 8 org.chromium.Chromium.framework 0x00000001103dcfa9 base::(anonymous namespace)::ThreadFunc(void*) + 105 9 libsystem_pthread.dylib 0x00007fff85fdc899 _pthread_body + 138 10 libsystem_pthread.dylib 0x00007fff85fdc72a _pthread_start + 137 11 libsystem_pthread.dylib 0x00007fff85fe0fc9 thread_start + 13

Thread 10:: ThreadPoolForegroundWorker 0 libsystem_kernel.dylib 0x00007fff85423a1a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff85422d18 mach_msg + 64 2 org.chromium.Chromium.framework 0x00000001103f5686 base::WaitableEvent::TimedWaitImpl(base::TimeDelta) + 390 3 org.chromium.Chromium.framework 0x000000011038eaf3 base::WaitableEvent::TimedWait(base::TimeDelta) + 163 4 org.chromium.Chromium.framework 0x00000001103c059d base::internal::WorkerThreadWaitableEvent::Delegate::TimedWait(base::TimeDelta) + 13 5 org.chromium.Chromium.framework 0x00000001103bfde3 base::internal::WorkerThread::RunWorker() + 451 6 org.chromium.Chromium.framework 0x00000001103bfb9d base::internal::WorkerThread::RunPooledWorker() + 13 7 org.chromium.Chromium.framework 0x00000001103bfa90 base::internal::WorkerThread::ThreadMain() + 128 8 org.chromium.Chromium.framework 0x00000001103dcfa9 base::(anonymous namespace)::ThreadFunc(void*) + 105 9 libsystem_pthread.dylib 0x00007fff85fdc899 _pthread_body + 138 10 libsystem_pthread.dylib 0x00007fff85fdc72a _pthread_start + 137 11 libsystem_pthread.dylib 0x00007fff85fe0fc9 thread_start + 13

Thread 11:: Chrome_ChildIOThread 0 libsystem_kernel.dylib 0x00007fff85428662 kevent64 + 10 1 org.chromium.Chromium.framework 0x0000000110402ed6 base::MessagePumpKqueue::DoInternalWork(base::MessagePump::Delegate, base::MessagePump::Delegate::NextWorkInfo) + 374 2 org.chromium.Chromium.framework 0x0000000110402cde base::MessagePumpKqueue::RunSimplified(base::MessagePump::Delegate) + 78 3 org.chromium.Chromium.framework 0x0000000110402bb6 base::MessagePumpKqueue::Run(base::MessagePump::Delegate) + 70 4 org.chromium.Chromium.framework 0x00000001103aa50c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 284 5 org.chromium.Chromium.framework 0x0000000110373965 base::RunLoop::Run(base::Location const&) + 389 6 org.chromium.Chromium.framework 0x00000001103c9498 base::Thread::Run(base::RunLoop) + 56 7 org.chromium.Chromium.framework 0x00000001139d2a3f content::(anonymous namespace)::ChildIOThread::Run(base::RunLoop) + 95 8 org.chromium.Chromium.framework 0x00000001103c95bc base::Thread::ThreadMain() + 268 9 org.chromium.Chromium.framework 0x00000001103dcfa9 base::(anonymous namespace)::ThreadFunc(void*) + 105 10 libsystem_pthread.dylib 0x00007fff85fdc899 _pthread_body + 138 11 libsystem_pthread.dylib 0x00007fff85fdc72a _pthread_start + 137 12 libsystem_pthread.dylib 0x00007fff85fe0fc9 thread_start + 13

Thread 12:: ThreadPoolForegroundWorker 0 libsystem_kernel.dylib 0x00007fff85423a1a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff85422d18 mach_msg + 64 2 org.chromium.Chromium.framework 0x00000001103f5686 base::WaitableEvent::TimedWaitImpl(base::TimeDelta) + 390 3 org.chromium.Chromium.framework 0x000000011038eaf3 base::WaitableEvent::TimedWait(base::TimeDelta) + 163 4 org.chromium.Chromium.framework 0x00000001103c059d base::internal::WorkerThreadWaitableEvent::Delegate::TimedWait(base::TimeDelta) + 13 5 org.chromium.Chromium.framework 0x00000001103bfde3 base::internal::WorkerThread::RunWorker() + 451 6 org.chromium.Chromium.framework 0x00000001103bfb9d base::internal::WorkerThread::RunPooledWorker() + 13 7 org.chromium.Chromium.framework 0x00000001103bfa90 base::internal::WorkerThread::ThreadMain() + 128 8 org.chromium.Chromium.framework 0x00000001103dcfa9 base::(anonymous namespace)::ThreadFunc(void*) + 105 9 libsystem_pthread.dylib 0x00007fff85fdc899 _pthread_body + 138 10 libsystem_pthread.dylib 0x00007fff85fdc72a _pthread_start + 137 11 libsystem_pthread.dylib 0x00007fff85fe0fc9 thread_start + 13

Thread 13:: VizCompositorThread 0 libsystem_kernel.dylib 0x00007fff85423a1a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff85422d18 mach_msg + 64 2 org.chromium.Chromium.framework 0x00000001103f5686 base::WaitableEvent::TimedWaitImpl(base::TimeDelta) + 390 3 org.chromium.Chromium.framework 0x000000011038eaf3 base::WaitableEvent::TimedWait(base::TimeDelta) + 163 4 org.chromium.Chromium.framework 0x000000011034632c base::MessagePumpDefault::Run(base::MessagePump::Delegate) + 252 5 org.chromium.Chromium.framework 0x00000001103aa50c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 284 6 org.chromium.Chromium.framework 0x0000000110373965 base::RunLoop::Run(base::Location const&) + 389 7 org.chromium.Chromium.framework 0x00000001103c9498 base::Thread::Run(base::RunLoop) + 56 8 org.chromium.Chromium.framework 0x00000001103c95bc base::Thread::ThreadMain() + 268 9 org.chromium.Chromium.framework 0x00000001103dcfa9 base::(anonymous namespace)::ThreadFunc(void*) + 105 10 libsystem_pthread.dylib 0x00007fff85fdc899 _pthread_body + 138 11 libsystem_pthread.dylib 0x00007fff85fdc72a _pthread_start + 137 12 libsystem_pthread.dylib 0x00007fff85fe0fc9 thread_start + 13

Thread 14:: CVDisplayLink 0 libsystem_kernel.dylib 0x00007fff85427716 __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x00007fff85fdec77 _pthread_cond_wait + 787 2 com.apple.CoreVideo 0x00007fff8a4a8464 CVDisplayLink::waitUntil(unsigned long long) + 244 3 com.apple.CoreVideo 0x00007fff8a4a7998 CVDisplayLink::runIOThread() + 496 4 com.apple.CoreVideo 0x00007fff8a4a778f startIOThread(void*) + 147 5 libsystem_pthread.dylib 0x00007fff85fdc899 _pthread_body + 138 6 libsystem_pthread.dylib 0x00007fff85fdc72a _pthread_start + 137 7 libsystem_pthread.dylib 0x00007fff85fe0fc9 thread_start + 13

Thread 15 Crashed:: ThreadPoolSingleThreadSharedForeground0 0 dyld 0x00007fff6807c09d dyld_fatal_error + 1 1 dyld 0x00007fff6807edf6 dyld::fastBindLazySymbol(ImageLoader*, unsigned long) + 171 2 libdyld.dylib 0x00007fff8dd072dd dyld_stubbinder + 13 3 ??? 0x0000000117b6c000 0 + 4692819968 4 org.chromium.Chromium.framework 0x000000011287bb7d media::GetPlatformSupportedVideoDecoderConfigs(base::WeakPtr, gpu::GpuDriverBugWorkarounds, gpu::GpuPreferences, gpu::GPUInfo const&, base::OnceCallback<std::Cr::vector<media::SupportedVideoDecoderConfig, std::Cr::allocator > ()>) + 77 5 org.chromium.Chromium.framework 0x000000011285c30a media::GpuMojoMediaClient::GetSupportedVideoDecoderConfigsStatic(base::WeakPtr, gpu::GpuPreferences const&, gpu::GpuDriverBugWorkarounds const&, gpu::GPUInfo const&) + 218 6 org.chromium.Chromium.framework 0x000000011285c0e1 media::GpuMojoMediaClient::GetSupportedVideoDecoderConfigs() + 369 7 org.chromium.Chromium.framework 0x000000011286a014 media::MojoVideoDecoderService::GetSupportedConfigs(base::OnceCallback<void (std::Cr::vector<media::SupportedVideoDecoderConfig, std::Cr::allocator > const&, media::VideoDecoderType)>) + 84 8 org.chromium.Chromium.framework 0x000000010c100d7a media::mojom::VideoDecoderStubDispatch::AcceptWithResponder(media::mojom::VideoDecoder, mojo::Message, std::__Cr::unique_ptr<mojo::MessageReceiverWithStatus, std::__Cr::default_delete >) + 890 9 org.chromium.Chromium.framework 0x0000000110ae999b mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message) + 683 10 org.chromium.Chromium.framework 0x0000000110aee7c7 mojo::MessageDispatcher::Accept(mojo::Message) + 167 11 org.chromium.Chromium.framework 0x0000000110aeb48f mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message) + 79 12 org.chromium.Chromium.framework 0x0000000110af177f mojo::internal::MultiplexRouter::ProcessIncomingMessage(mojo::internal::MultiplexRouter::MessageWrapper, mojo::internal::MultiplexRouter::ClientCallBehavior, base::SequencedTaskRunner) + 975 13 org.chromium.Chromium.framework 0x0000000110af0f3a mojo::internal::MultiplexRouter::Accept(mojo::Message) + 426 14 org.chromium.Chromium.framework 0x0000000110aee7fe mojo::MessageDispatcher::Accept(mojo::Message) + 222 15 org.chromium.Chromium.framework 0x0000000110ae6af7 mojo::Connector::DispatchMessage(mojo::ScopedHandleBase) + 423 16 org.chromium.Chromium.framework 0x0000000110ae752f mojo::Connector::ReadAllAvailableMessages() + 287 17 org.chromium.Chromium.framework 0x0000000110ae7347 mojo::Connector::OnWatcherHandleReady(char const, unsigned int) + 55 18 org.chromium.Chromium.framework 0x000000010cac524b mojo::SimpleWatcher::DiscardReadyState(base::RepeatingCallback<void (unsigned int)> const&, unsigned int, mojo::HandleSignalsState const&) + 43 19 org.chromium.Chromium.framework 0x0000000110b040f7 mojo::SimpleWatcher::OnHandleReady(int, unsigned int, mojo::HandleSignalsState const&) + 343 20 org.chromium.Chromium.framework 0x0000000110391cdd base::TaskAnnotator::RunTaskImpl(base::PendingTask&) + 269 21 org.chromium.Chromium.framework 0x00000001103b8c5c base::internal::TaskTracker::RunTaskImpl(base::internal::Task&, base::TaskTraits const&, base::internal::TaskSource, base::SequenceToken const&) + 60 22 org.chromium.Chromium.framework 0x00000001103b9140 base::internal::TaskTracker::RunSkipOnShutdown(base::internal::Task&, base::TaskTraits const&, base::internal::TaskSource, base::SequenceToken const&) + 64 23 org.chromium.Chromium.framework 0x00000001103b8a87 base::internal::TaskTracker::RunTask(base::internal::Task, base::internal::TaskSource, base::TaskTraits const&) + 503 24 org.chromium.Chromium.framework 0x00000001103b86d5 base::internal::TaskTracker::RunAndPopNextTask(base::internal::RegisteredTaskSource) + 629 25 org.chromium.Chromium.framework 0x00000001103c0038 base::internal::WorkerThread::RunWorker() + 1048 26 org.chromium.Chromium.framework 0x00000001103bfbcd base::internal::WorkerThread::RunSharedWorker() + 13 27 org.chromium.Chromium.framework 0x00000001103bfaa4 base::internal::WorkerThread::ThreadMain() + 148 28 org.chromium.Chromium.framework 0x00000001103dcfa9 base::(anonymous namespace)::ThreadFunc(void*) + 105 29 libsystem_pthread.dylib 0x00007fff85fdc899 _pthread_body + 138 30 libsystem_pthread.dylib 0x00007fff85fdc72a _pthread_start + 137 31 libsystem_pthread.dylib 0x00007fff85fe0fc9 thread_start + 13

Thread 15 crashed with X86 Thread State (64-bit): rax: 0x00007fff680b0db0 rbx: 0x00007f9cabd69b70 rcx: 0x0000000000000000 rdx: 0x0000000000000000 rdi: 0x00007fff680b0f20 rsi: 0x0000000000000000 rbp: 0x0000000134c1b8c0 rsp: 0x0000000134c1b8a8 r8: 0x00007fff6809bb8c r9: 0x0000000000000000 r10: 0x0000000134c1b621 r11: 0x00007fff680b0f20 r12: 0x0000000134c1bb30 r13: 0x00007f9cac9360d8 r14: 0x00007fff680b0f20 r15: 0x0000000134c1bbe4 rip: 0x00007fff6807c09d rfl: 0x0000000000000246 cr2: 0x0000000134c1ad48

Logical CPU: 2 Error Code: 0x00000000 Trap Number: 3

RJVB commented 7 months ago

Regression also present in 121.0.6167.139.1 and I think it could effectively disable hw-accelerated video playback

Wowfunhappy commented 7 months ago

I'm on vacation in a week and a half and I'm going to go through and polyfill and stub a bunch of things to fix recent regressions without needing to actually recompile Chromium (if bluebox doesn't get to them first).

If I was to pollyfill this, should it always return true or should it call a different/older function to see if hardware decode is supported?

RJVB commented 7 months ago

On Wednesday March 06 2024 18:47:04 Jonathan wrote:

If I was to pollyfill this, should it always return yes or should it call a different/older function to see if hardware decode is supported?

I think that depends on how VTB failures are handled. If the call to VTIsHardwareDecodeSupported was just added as a means to avoid time setting up HW decoding only to have it fail, then yes, just replace the function with a false positive.

See https://github.com/zaps166/QMPlay2/pull/615#issuecomment-1582541869 and after for a similar case in QMPlay2 (where use of the VTIsHardwareDecodeSupported) function was ultimately discontinued).

Either way we know that VTB didn't have support for hw-accelerated VP9 decoding until somewhere in 2018, so most likely starting with 10.15 . I don't know what the minimum required OS version for standard Chromium is nowadays but I'd hope not after 10.15 - in which case your wrapper could be a little bit more clever like in https://github.com/zaps166/QMPlay2/pull/615#issuecomment-1583089631 .

I've been thinking about trying to inject a VTIsHardwareDecodeSupported function via DYLD_INSERT_LIBRARIES but that tends not to work with applications that are linked the normal two-level namespace way.

(It would be even nicer if we could add the function to the VTB framework library itself but I don't see a way to add a dylib as one can with ELF binaries and also don't know if it's possible to relink the library ... plus I see the framework is code-signed so modifying it could be very risky :-/)

Wowfunhappy commented 7 months ago

I've been thinking about trying to inject a VTIsHardwareDecodeSupported function via DYLD_INSERT_LIBRARIES but that tends not to work with applications that are linked the normal two-level namespace way.

See https://apple.stackexchange.com/questions/414688/how-can-i-run-newer-unity-games-on-os-x-10-9-mavericks/414689#414689 for how I usually work around this.

RJVB commented 7 months ago

See https://apple.stackexchange.com/questions/414688/how-can-i-run-newer-unity-games-on-os-x-10-9-mavericks/414689#414689 for how I usually work around this.

Hah, clever! I wasn't aware of optool, so thanks :)

I don't think you need to use ObjC for your stub module, or do you?

And I wonder, DYLD_INSERT_LIBRARIES does do what it promises, despite the fact that applications don't look inside it. I just did some testing with libc++ 17 from my LLVM-17 install tree. Normally they have their ID set to the libc++ and libc++abi dylibs that were used during the build (a priori the system ones), so inserting them still causes the system libraries to be loaded first. But if you change their ID (and make libc++.dylib link to the desired libc++abi) then they are the only libc++ libraries showing up when running with DYLD_PRINT_LIBRARIES=1. IOW, what if you set the ID of your UnityMavericksWorkarounds.dylib to /usr/lib/libSystem.B.dylib, could you then DYLD_INSERT_LIBRARIES it so you don't have to use install_name_tool?

Wowfunhappy commented 7 months ago

@RJVB Let's continue the discussion here: https://github.com/blueboxd/chromium-legacy/discussions/211

krackers commented 7 months ago

If I was to pollyfill this, should it always return true or should it call a different/older function to see if hardware decode is supported?

Theoretically polyfilling to true should work since chrome should fallback to swdec if videotoolbox hwdec session cannot init. If that doesn't work I guess can always whitelist the formats we know should work (H.263, H.264, MPEG-1, MPEG-2, MPEG-4 Part 2)

RJVB commented 7 months ago

Theoretically polyfilling to true should work since chrome should fallback to swdec if videotoolbox hwdec session cannot init.

That's what I would have hoped, but what about side-effects, even if only additional visual glitching? If hwdec requires setting up special memory or "viewports" might it not add to the (risk of) instability if done for nothing?

IMHO the most elegant polyfill/overload would do something like what I proposed in the QMPlay2 ticket I referred to: use dlopen to fetch the actual function, and use it if that attempt succeeds, and otherwise return false for anything not in the aforementioned list. FWIW, I tested all theoretically supported codecs back then, and concluded that only H264 will actually decode; IIRC there are a number that are encode-only but it is of course possible that QMPlay2 or FFmpeg don't get the initialisation just right for the other codecs to hwdec.

krackers commented 7 months ago

If hwdec requires setting up special memory or "viewports"

It might require allocating some gpu memory, but I don't see why that would lead to glitching? It doesn't allocate any viewport, once decoded the texture lies on the gpu and it's your job to render it.

Now the application itself might not handle it properly, e.g. it might try to reinit windows or whatever. But that's an application problem, not a fundamental hwdec limitation. A properly architected application would have separation between the two, and could even switch at runtime without any disruption. (There will of course be a necessary frame-drop as swdec picks up where hwdec left off or vice-versa)

I don't know how chrome behaves. Could always just try the simplest thing first and if there is a noticeable issue, then go to the more complex solution.

RJVB commented 7 months ago

It might require allocating some gpu memory, but I don't see why that would lead to glitching?

Allocating the memory probably not, going further with setting up the context might. That QMPlay2 app had an intermediate stage when figuring this all out where it would restart playback if hwdec failed unexpectedly, and that was quite visible as you can imagine.

Wowfunhappy commented 6 months ago

The latest version of https://github.com/blueboxd/chromium-legacy/discussions/25 will polyfill the missing function. I went with the simple option, because it works:

#include <stdio.h>

int VTIsHardwareDecodeSupported() {
    return 1;
}

int main(int argc, char *argv[]) {}

This has an immediately noticeable impact on the stability of WebGL applications. Pre-patch, I can't get https://webglsamples.org/field/field.html to run for a significant length of time without crashing, particularly if I switch to a different tab and come back or open Chromium's developer tools.

RJVB commented 6 months ago

This has an immediately noticeable impact on the stability of WebGL applications.

I can see how that would be on an OS version that misses the function and will thus abort (aka crash) any application trying to execute it. IMHO, if WebGL pages are more stable with the patch it almost has to be because the use of VTIsHardwareDecodeSupported is part of a rewrite that includes other improvements.

Any chance to ship this with the next "stable" release?

FWIW: did you say that turning off HW accel in the settings didn't really turn off all GPU use? You might have an opportunity here to improve that (i.e. return false), if you can access the internal representation of that setting!

Wowfunhappy commented 6 months ago

FWIW: did you say that turning off HW accel in the settings didn't really turn off all GPU use?

No, what I probably said is that Chromium Legacy turns off most hardware acceleration by default via a hardcoded --disable-gpu-compositing flag, but this does not turn off all hardware acceleration. However, you can disable hardware acceleration in Chromium's settings UI to truly turn it all off.

A few weeks ago I noticed that disabling hardware acceleration in settings seemed to improve stability somewhat. However, this may have been entirely because of the missing VideoToolBox function!

Wowfunhappy commented 4 months ago

I think this has been properly fixed in the latest release. https://github.com/blueboxd/chromium-legacy/commit/647f7a9e3fd71ac45324676d3bb19b159e2d1629