Bug 2035235 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Bug 1992915 plans to run test suites in isolation in CI. This thread of work by :afranchuk has uncovered a preexisting issue with TestMediaDataDecoder (added by bug 1905878) that I can reproduce the issue consistently locally by running:

```
./mach gtest --debugger=windbgx --debugger-args="-g -o -G" 'TestMediaDataDecoder*'
```

This runs into the following crash:

```
(b374.8260): Access violation - code c0000005 (first chance)
xul!mozilla::BlockingResourceBase::CheckAcquire+0x25:
00007ff9`a5dfc2c5 83791002        cmp     dword ptr [rcx+10h],2 ds:00000000`00000050=????????
0:011> k
 # Call Site
00 xul!mozilla::BlockingResourceBase::CheckAcquire+0x25 [D:\mozilla-source\firefox\xpcom\threads\BlockingResourceBase.cpp @ 245] 
01 xul!mozilla::OffTheBooksMutex::Lock+0x15 [D:\mozilla-source\firefox\xpcom\threads\BlockingResourceBase.cpp @ 343] 
02 xul!mozilla::detail::BaseAutoLock<mozilla::Mutex &>::BaseAutoLock+0x8 [D:\mozilla-source\firefox\obj-x86_64-pc-windows-msvc\dist\include\mozilla\Mutex.h @ 159] 
03 xul!mozilla::gfx::DeviceManagerDx::GetImageDevice+0x31 [D:\mozilla-source\firefox\gfx\thebes\DeviceManagerDx.cpp @ 1409] 
04 xul!mozilla::WMFVideoMFTManager::InitInternal+0xc74 [D:\mozilla-source\firefox\dom\media\platforms\wmf\WMFVideoMFTManager.cpp @ 391] 
05 xul!mozilla::WMFVideoMFTManager::Init::<lambda_15>::operator()+0x5 [D:\mozilla-source\firefox\dom\media\platforms\wmf\WMFVideoMFTManager.cpp @ 206] 
...
```

We crash because `WMFVideoMFTManager::InitInternal()` runs into `gfx::DeviceManagerDx::Get()->GetImageDevice()`, where `gfx::DeviceManagerDx::Get()` returns a null pointer. I believe that currently the test implicitly relies on the fact that other tests will do the initialization job required to get a non-null `gfx::DeviceManagerDx::Get()` there.
Bug 1992915 plans to run test suites in isolation in CI. This thread of work by :afranchuk has uncovered a preexisting issue with TestMediaDataDecoder (added by bug 1905878) that I can reproduce consistently locally by running:

```
./mach gtest --debugger=windbgx --debugger-args="-g -o -G" 'TestMediaDataDecoder*'
```

This runs into the following crash:

```
(b374.8260): Access violation - code c0000005 (first chance)
xul!mozilla::BlockingResourceBase::CheckAcquire+0x25:
00007ff9`a5dfc2c5 83791002        cmp     dword ptr [rcx+10h],2 ds:00000000`00000050=????????
0:011> k
 # Call Site
00 xul!mozilla::BlockingResourceBase::CheckAcquire+0x25 [D:\mozilla-source\firefox\xpcom\threads\BlockingResourceBase.cpp @ 245] 
01 xul!mozilla::OffTheBooksMutex::Lock+0x15 [D:\mozilla-source\firefox\xpcom\threads\BlockingResourceBase.cpp @ 343] 
02 xul!mozilla::detail::BaseAutoLock<mozilla::Mutex &>::BaseAutoLock+0x8 [D:\mozilla-source\firefox\obj-x86_64-pc-windows-msvc\dist\include\mozilla\Mutex.h @ 159] 
03 xul!mozilla::gfx::DeviceManagerDx::GetImageDevice+0x31 [D:\mozilla-source\firefox\gfx\thebes\DeviceManagerDx.cpp @ 1409] 
04 xul!mozilla::WMFVideoMFTManager::InitInternal+0xc74 [D:\mozilla-source\firefox\dom\media\platforms\wmf\WMFVideoMFTManager.cpp @ 391] 
05 xul!mozilla::WMFVideoMFTManager::Init::<lambda_15>::operator()+0x5 [D:\mozilla-source\firefox\dom\media\platforms\wmf\WMFVideoMFTManager.cpp @ 206] 
...
```

We crash because `WMFVideoMFTManager::InitInternal()` runs into `gfx::DeviceManagerDx::Get()->GetImageDevice()`, where `gfx::DeviceManagerDx::Get()` returns a null pointer. I believe that currently the test implicitly relies on the fact that other tests will do the initialization job required to get a non-null `gfx::DeviceManagerDx::Get()` there.

Back to Bug 2035235 Comment 0