Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D3D12 Device Remove : Device Hung #623

Closed
Cop46 opened this issue Jan 16, 2023 · 9 comments
Closed

D3D12 Device Remove : Device Hung #623

Cop46 opened this issue Jan 16, 2023 · 9 comments

Comments

@Cop46
Copy link
Contributor

Cop46 commented Jan 16, 2023

There is a bug in the engine with dx12.
Sometimes that work sometimes that crash with D3D12 Device Remove : DXGI_ERROR_DEVICE_HUNG.
I have noticed this crash arrived when I remove meshes with entity_remove. Tested with two differents computers on Win11 with RTX 2080S and Win11 RTX3070TI.
That appear to be working well on Win10 ???
Other users have reported this bug on discord that arrived when loading scene like Sponza with a Radeon 6800U and updated drivers.
If anyone have this bug, that was cool to report this here to find where it is and how to fix it.

@turanszkij
Copy link
Owner

Sorry, I couldn't repro this, but I have Win10.

@Enzojz
Copy link

Enzojz commented Mar 14, 2023

I am trying to create a simplest window with engine, like the ImGUI example, even simplier, without anything about ImGUI, just the teapot rendered with RenderPath3D.

When I replace RenderPath3D with RenderPath3D_PathTracing, I come to the same error.

I am also on Windows 11, RTX 2070s.

module;
#include "stdafx.h"
export module renderer;

namespace RailwaySandbox {
    export class Renderer : public wi::RenderPath3D_PathTracing {
	    wi::gui::Label label;
    public:
	    void Load() override;
	    void Update(float dt) override;
	    void ResizeLayout() override;
	    void Render() const override;
    };

    void Renderer::Load() {
	    setSSREnabled(false);
	    setReflectionsEnabled(true);
	    setFXAAEnabled(false);

	    // Reset all state that tests might have modified:
	    wi::eventhandler::SetVSync(true);
	    wi::renderer::SetToDrawGridHelper(false);
	    wi::renderer::SetTemporalAAEnabled(true);
	    wi::renderer::ClearWorld(wi::scene::GetScene());
	    wi::scene::GetScene().weather = wi::scene::WeatherComponent();
	    this->ClearSprites();
	    this->ClearFonts();
	    if (wi::lua::GetLuaState() != nullptr) {
		    wi::lua::KillProcesses();
	    }

	    // Reset camera position:
	    wi::scene::TransformComponent transform;
	    transform.Translate(XMFLOAT3(0, 2.f, -4.5f));
	    transform.UpdateTransform();
	    wi::scene::GetCamera().TransformCamera(transform);

	    // Load model.
	    wi::scene::LoadModel("../Content/models/teapot.wiscene");

	    RenderPath3D_PathTracing::Load();
    }

    void Renderer::Update(float dt) {
	    RenderPath3D_PathTracing::Update(dt);
    };

    void Renderer::Render() const {
	    RenderPath3D_PathTracing::Render();
    };

    void Renderer::ResizeLayout() {
	    RenderPath3D_PathTracing::ResizeLayout();
	    float screenW = GetLogicalWidth();
	    float screenH = GetLogicalHeight();
	    label.SetPos(XMFLOAT2(screenW / 2.f - label.scale.x / 2.f, screenH * 0.95f));
    };
}

@Cop46
Copy link
Contributor Author

Cop46 commented Sep 19, 2024

I think the pathTracing error is not the same issue...
I have identified one cause of this bug, this is "SurfelGI" !
And other type of similar bug is when removing the Terrain but I think this is not the same bug but same result.

2024-09-19.23-08-16.mp4
2024-09-19.23-12-11.mp4

@turanszkij
Copy link
Owner

The terrain hang is fixed here: 098d7f6
The other one I couldn't repro, so can you send me the model either here or private message?

@Cop46
Copy link
Contributor Author

Cop46 commented Sep 20, 2024

Sended a private message on discord because this model is not free.

@turanszkij
Copy link
Owner

Should be fixed with that model you sent, thanks.

@Cop46
Copy link
Contributor Author

Cop46 commented Sep 22, 2024

This bug is not fixed,
If you not select all meshes for deleting, the crash is always here...

2024-09-22.16-14-37.mp4

@turanszkij
Copy link
Owner

Please try the above commit and see if the hang still persists.

@Cop46
Copy link
Contributor Author

Cop46 commented Sep 23, 2024

Fixed !!! Many thanks and keep up the good work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants