Git Product home page Git Product logo

Comments (1)

veeenu avatar veeenu commented on August 12, 2024

Hi! Thank you for reporting this!

Unfortunately it's not a great moment for me, between commitments and other personal issues, so I've paused work on hudhook for a bit. I'll still review pull requests though, so if you get to this before I have a chance to, feel free to open one!

The culprit is most likely around here:

hudhook/src/hooks/dx12.rs

Lines 782 to 809 in bebcddc

unsafe fn unhook(&mut self) {
trace!("Disabling hooks...");
CQECL_RUNNING.wait();
PRESENT_RUNNING.wait();
RBUF_RUNNING.wait();
trace!("Cleaning up renderer...");
if let Some(renderer) = IMGUI_RENDERER.take() {
let mut renderer = renderer.lock();
// XXX
// This is a hack for solving this concurrency issue:
// https://github.com/veeenu/hudhook/issues/34
// We should investigate deeper into this and find a way of synchronizing with
// the moment the actual resources involved in the rendering are
// dropped. Using a condvar like above does not work, and still
// leads clients to crash.
//
// The 34ms value was chosen because it's a bit more than 1 frame @ 30fps.
thread::sleep(Duration::from_millis(34));
renderer.cleanup(None);
}
drop(IMGUI_RENDER_LOOP.take());
COMMAND_QUEUE_GUARD.take();
DXGI_DEBUG_ENABLED.store(false, Ordering::SeqCst);
}

The synchronization is already a hack, and a potential solution is included in the comment, but I (personally) need a better understanding of the DX12 pipeline to debug that. Attaching a debugger to inspect the crash should provide some insight.

from hudhook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.