Project

General

Profile

Actions

Emulator Issues #11819

closed

Crash on macOS when enabling GPU Texture Decoding with Vulkan Backend - crash in Vulkan::CommandBufferManager::SubmitCommandBuffer

Added by gilcel over 5 years ago. Updated about 2 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
OS X
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Game Name?

Any game (Wii or GC) choosen.

What's the problem? Describe what went wrong.

On macOS choose "Vulkan Backend" an enable "GPU Texture Decoding" (Safe or Fast).

Start a game:

  • With a GC-game the N-Logo is displayed but will crash immediately when the intro screen of the game appears.
  • With a Wii-game it crashes immediately, no Wii logo is displayed.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

Dolphin dev version 5.0-10772, tried also older dev-version, but same crash, it seems to be an issue in the function Vulkan::CommandBufferManager::SubmitCommandBuffer()

Is the issue present in the latest stable version?

No since stable version 5.0 is 3 years ago and no Vulkan Backend for Dolphin existed then...
However with OpenGL backend it doesn't crash when "GPU Texture Decoding" is enabled.

Tried recording with Fifolog, but here it's clearly not a graphical issue...

Crash with:

Application Specific Information:
-[MTLIOAccelComputeCommandEncoder bindEmulationArguments]:53: failed assertion `No compute pipeline state bound'

Here's "CrashReporter" log:

Thread 15 Crashed:
0   libsystem_kernel.dylib        	0x00007fff791ce2c6 __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff79289bf1 pthread_kill + 284
2   libsystem_c.dylib             	0x00007fff791386a6 abort + 127
3   libsystem_c.dylib             	0x00007fff7910120d __assert_rtn + 324
4   com.apple.Metal               	0x00007fff51c9268e MTLReportFailure + 567
5   com.apple.Metal               	0x00007fff51c50468 -[MTLIOAccelComputeCommandEncoder bindEmulationArguments] + 350
6   com.apple.driver.AppleIntelHD4000GraphicsMTLDriver	0x00007fff4504c4f3 -[MTLIGAccelComputeCommandEncoder dispatchThreadgroups:threadsPerThreadgroup:] + 209
7   libvulkan.dylib               	0x0000000118812b18 MVKCmdDispatch::encode(MVKCommandEncoder*) + 120
8   libvulkan.dylib               	0x00000001187bcddb MVKCommandEncoder::encode(id<MTLCommandBuffer>) + 139
9   libvulkan.dylib               	0x00000001187bcc1b MVKCommandBuffer::submit(MVKQueueCommandBufferSubmission*) + 363
10  libvulkan.dylib               	0x00000001187ecc64 MVKQueueCommandBufferSubmission::execute() + 420
11  libvulkan.dylib               	0x00000001187eb7c1 MVKQueue::submit(unsigned int, VkSubmitInfo const*, VkFence_T*) + 561
12  org.dolphin-emu.dolphin       	0x000000010f9656ea Vulkan::CommandBufferManager::SubmitCommandBuffer(unsigned int, VkSwapchainKHR_T*, unsigned int) + 234

What are your PC specifications? (CPU, GPU, Operating System, more)

Apple Mac mini (Late 2012) Core i7 with "Intel HD Graphics 4000",
macOS 10.14.6 and vulkansdk-macos-1.1.114.0 (vulkansdk-macos-1.1.108.0 also tested).


Files

crash.txt (67.2 KB) crash.txt core dump Pizuz, 08/07/2019 07:27 PM
Screenshot 2020-06-03 at 22.18.59.png (50.2 KB) Screenshot 2020-06-03 at 22.18.59.png Missing textures Pizuz, 06/03/2020 08:26 PM
Actions #1

Updated by JMC4789 over 5 years ago

I mean, probably the best we can do is just disable the option. Apple is not making it easy to support their OS.

If you want a far better experience, literally use any other supported OS than macOS.

Actions #2

Updated by gilcel over 5 years ago

Ok thanks ;-)

However Vulkan runs much better, even faster than OpenGL on macOS...it's only this issue (hopefully someone will find a solution).

Actions #3

Updated by Pizuz over 5 years ago

I get a segfault instead, however I'm on nVidia. Wind Waker manages to show the Nintendo logo and the Dolby ProLogic II logo before crashing.

This seems to be a regression in Dolphin, because 5.0-9431, which I still have lying somewhere, doesn't crash with GPU Texture decoding enabled. Current master crashes with any MoltenVK version I tried (1.0.26 released earlier than that).

However, I observed that starting with MoltenVK 1.0.35 (the one currently bundled with Dolphin) GPU Texture decoding stops garbling textures, so this might be worth investigating further.

Actions #4

Updated by Pizuz over 5 years ago

To specify further: The regression must have been introduced somewhere between 9431 and 9694.

Actions #5

Updated by JMC4789 over 5 years ago

Feel free to find the exact build, so I can tag whoever caused the regression. That'd help a lot :)

Actions #6

Updated by Pizuz over 5 years ago

Found it.

5.0-9638 (Move a significant amount of video backend logic to VideoCommon - PR #7753 from stenzek) is the first version that broke it.

I guess this slipped by, because no one would use GPU texture decoding on macOS anyway with all the garbled textures it produced (until 1.0.35 apparently).

Actions #7

Updated by JMC4789 over 5 years ago

  • Assignee set to Stenzek
Actions #8

Updated by gilcel over 5 years ago

I completely missed this, but hey thanks for this fix ;-) It works also with the latest Vulkan SDK 1.1.121.

Actions #9

Updated by gilcel over 5 years ago

Oh sorry! Please forget my previous reply:
Dolphin on macOS with Vulkan-Backend still crashes when GPU Texture Decoding. Otherwise everything works fine
Tested with Dolphin 5.0-10912 on macMini 2018 core i5 / INTEL UHD Graphics 630, Vulkan SDK 1.1.121

Here's the crash log:

0   com.apple.driver.AppleIntelKBLGraphicsMTLDriver	0x00007fff347bf642 CHAL_INTEL::ChalContext::ChalExecuteKernel(CHAL_INTEL::tagDecodedBinaryInfo const*, MTLSize&, MTLSize&, MTLSize&, IGBufferMemory<31ul>&, sTextureArgument const*, sSamplerArgument const*, unsigned int const*, MTLRegion, MTLIGAccelBuffer*, unsigned int, MTLIGAccelBuffer*, unsigned int) + 578
1   com.apple.driver.AppleIntelKBLGraphicsMTLDriver	0x00007fff347746d0 IGAccelComputeCommandEncoder::dispatchThreadgroups(MTLSize, MTLSize) + 172
2   com.apple.driver.AppleIntelKBLGraphicsMTLDriver	0x00007fff34774574 -[MTLIGAccelComputeCommandEncoder dispatchThreadgroups:threadsPerThreadgroup:] + 234
3   libvulkan.dylib               	0x000000011342cb18 MVKCmdDispatch::encode(MVKCommandEncoder*) + 120
4   libvulkan.dylib               	0x00000001133d6ddb MVKCommandEncoder::encode(id<MTLCommandBuffer>) + 139
5   libvulkan.dylib               	0x00000001133d6c1b MVKCommandBuffer::submit(MVKQueueCommandBufferSubmission*) + 363
6   libvulkan.dylib               	0x0000000113406c64 MVKQueueCommandBufferSubmission::execute() + 420
7   libvulkan.dylib               	0x00000001134057c1 MVKQueue::submit(unsigned int, VkSubmitInfo const*, VkFence_T*) + 561
8   org.dolphin-emu.dolphin       	0x000000010a0a9aba Vulkan::CommandBufferManager::SubmitCommandBuffer(unsigned int, VkSwapchainKHR_T*, unsigned int) + 234
Actions #10

Updated by rapito over 4 years ago

I can also confirm that version 5.0-9638 introduced this issues on Mac, after a year not a single version is able to play any games using Vulkan which is faster and probably the definite performance boost macOS users need.
The problem is not present on version 5.0-9633.

On my case this is the crash log:

Process:               Dolphin [1630]
Path:                  /Users/USER/Desktop/*/Dolphin 2.app/Contents/MacOS/Dolphin
Identifier:            org.dolphin-emu.dolphin
Version:               5.0-11830 (5.0)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Dolphin [1630]
User ID:               501

Date/Time:             2020-04-07 16:44:55.212 -0400
OS Version:            Mac OS X 10.14.6 (18G103)
Report Version:        12
Anonymous UUID:        94D53549-75FB-116F-2993-42E3018802C4

Crashed Thread:        15  Video thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
-[MTLIOAccelComputeCommandEncoder bindEmulationArguments]:53: failed assertion `No compute pipeline state bound'

Thread 15 Crashed:: Video thread
0   libsystem_kernel.dylib        	0x00007fff57e092c6 __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff57ec4bf1 pthread_kill + 284
2   libsystem_c.dylib             	0x00007fff57d736a6 abort + 127
3   libsystem_c.dylib             	0x00007fff57d3c20d __assert_rtn + 324
4   com.apple.Metal               	0x00007fff3091b68e MTLReportFailure + 567
5   com.apple.Metal               	0x00007fff308d9468 -[MTLIOAccelComputeCommandEncoder bindEmulationArguments] + 350
6   com.apple.driver.AppleIntelHD5000GraphicsMTLDriver	0x00007fff24477401 -[MTLIGAccelComputeCommandEncoder dispatchThreadgroups:threadsPerThreadgroup:] + 209
7   libvulkan.dylib               	0x00000001217417af MVKCmdDispatch::encode(MVKCommandEncoder*) + 287
8   libvulkan.dylib               	0x00000001216b6cdb MVKCommandEncoder::encode(id<MTLCommandBuffer>) + 123
9   libvulkan.dylib               	0x00000001216b6b31 MVKCommandBuffer::submit(MVKQueueCommandBufferSubmission*) + 353
10  libvulkan.dylib               	0x00000001216fa6e3 MVKQueueCommandBufferSubmission::execute() + 291
11  libvulkan.dylib               	0x00000001216f94e2 MVKQueue::submit(unsigned int, VkSubmitInfo const*, VkFence_T*) + 546
12  libvulkan.dylib               	0x00000001216752f4 vkQueueSubmit + 68
13  org.dolphin-emu.dolphin       	0x0000000106fa0b8a Vulkan::CommandBufferManager::SubmitCommandBuffer(unsigned int, VkSwapchainKHR_T*, unsigned int) + 234
Actions #11

Updated by Pizuz over 4 years ago

The current MoltenVK release 1.0.42 (for Vulkan SDK 1.2.141) fixes the crash for me. However, textures seem to fail to load. As a workaround, you can restart emulation, which seems to help on some games.

Actions #12

Updated by Techjar over 4 years ago

That is a slight improvement, but not really enough to call this fixed.

Actions #13

Updated by Billiard26 about 2 years ago

  • Operating system OS X added
  • Operating system deleted (N/A)
Actions #14

Updated by JMC4789 about 2 years ago

  • Status changed from New to Fixed

Appears to be working on the latest dev builds.

Actions

Also available in: Atom PDF