Project

General

Profile

Actions

Emulator Issues #12554

closed

Crash when creating input recording after game launch with OpenGL backend

Added by Dentomologist almost 3 years ago. Updated 5 months ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
Yes
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
5.0-10707
Fixed in:
5.0-20395

Description

Game Name?

Any game.

What's the problem? Describe what went wrong.

When using the OpenGL backend, creating a movie input recording while a game is already running causes Dolphin to crash.

What steps will reproduce the problem?

  • Set Graphics backend to OpenGL
  • Start a game normally, without input recording active
  • Start input recording with Movie->"Start Input Recording".
  • A warning window appears stating an error occurred at line 333 of Core\VideoBackends\OGL\OGLTexture.cpp.
  • Selecting No crashes; attempting to continue produces two more identical dialogs.
  • The fourth dialog points to line 248 of Core\Core\HW\DVD\DVDThread.cpp instead. All dialog choices here result in a crash.

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

Yes, 5.0-14435.

If the issue isn't present in the latest stable version, which is the first broken version?

5.0-10707, commit 1082468133342586ae2a5986408d163ce5aa14ca

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

Intel i5-4670k
Nvidia GeForce GTX 770 4gig
Windows 10 Home build 18362

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

Stack trace 1:
Dolphin.exe!OGL::OGLStagingTexture::Create(StagingTextureType type, const TextureConfig& config) Line 334
Dolphin.exe!OGL::Renderer::CreateStagingTexture(StagingTextureType type, const TextureConfig & config) Line 822
[Inline Frame] Dolphin.exe!TextureCacheBase::CheckReadbackTexture(unsigned int format, unsigned int) Line 429
Dolphin.exe!TextureCacheBase::SerializeTexture(AbstractTexture * tex, const TextureConfig & config, PointerWrap & p) Line 441
[Inline Frame] Dolphin.exe!FramebufferManager::DoSaveState(PointerWrap&) Line 921
Dolphin.exe!FramebufferManager::DoState(PointerWrap & p) Line 904
Dolphin.exe!VideoCommon_DoState(PointerWrap & p) Line 79
Dolphin.exe!VideoBackendBase::DoState(PointerWrap & p) Line 291
Dolphin.exe!State::DoState(PointerWrap & p) Line 201
Dolphin.exe!State::SaveAs'::2'::<lambda_1>::operator()() Line 426
[Inline Frame] Dolphin.exe!std::_Func_class::operator()() Line 968
Dolphin.exe!Core::RunOnCPUThread(std::function<void __cdecl(void)> function, bool wait_for_completion) Line 828
Dolphin.exe!State::SaveAs(const std::string & filename, bool wait) Line 451
Dolphin.exe!Movie: : BeginRecordingInput'::2'::<lambda_1>::operator()() Line 527
[Inline Frame] Dolphin.exe!std::_Func_class::operator()() Line 968
Dolphin.exe!Core::RunAsCPUThread(std::function<void __cdecl(void)> function) Line 819
Dolphin.exe!Movie::BeginRecordingInput(int controllers) Line 551
Dolphin.exe!MainWindow::OnStartRecording() Line 1700

Stack trace 2 (from the last dialog):
KernelBase.dll!00007ff807a80192()
Dolphin.exe!DVDThread::WaitUntilIdle() Line 250
Dolphin.exe!DVDThread::DoState(PointerWrap & p) Line 138
Dolphin.exe!DVDInterface::DoState(PointerWrap & p) Line 240
Dolphin.exe!HW::DoState(PointerWrap & p) Line 92
Dolphin.exe!State::DoState(PointerWrap & p) Line 210
Dolphin.exe!State::SaveAs'::2'::<lambda_1>::operator()() Line 426
[Inline Frame] Dolphin.exe!std::_Func_class::operator()() Line 968
Dolphin.exe!Core::RunOnCPUThread(std::function<void __cdecl(void)> function, bool wait_for_completion) Line 828
Dolphin.exe!State::SaveAs(const std::string & filename, bool wait) Line 451
Dolphin.exe!Movie: : BeginRecordingInput'::2'::<lambda_1>::operator()() Line 527
[Inline Frame] Dolphin.exe!std::_Func_class::operator()() Line 968
Dolphin.exe!Core::RunAsCPUThread(std::function<void __cdecl(void)> function) Line 819
Dolphin.exe!Movie::BeginRecordingInput(int controllers) Line 551
Dolphin.exe!MainWindow::OnStartRecording() Line 1700

The immediate cause of the crash is a failed assertion that buffer_ptr isn't null, which in turn is caused by every gl function failing and glGetError() returning GL_INVALID_OPERATION.

When creating a recording after launch Dolphin creates a save state as the base point for the recording. The bisected commit moves the savestate saving and loading code from the GPU thread to the CPU thread; my guess (emphasis on guess) is that there isn't a valid OpenGL context in the CPU thread, causing the OpenGL calls in OGLStagingTexture::Create (and possibly others, if that one succeeded) to fail.

Actions #1

Updated by JosJuice almost 3 years ago

  • Regression changed from No to Yes
  • Regression start set to 5.0-10707
Actions #2

Updated by JosJuice 5 months ago

  • Status changed from New to Fixed
  • Fixed in set to 5.0-20395
Actions

Also available in: Atom PDF