PresentMon icon indicating copy to clipboard operation
PresentMon copied to clipboard

PresentMon crashes with Windows 19H1 Mixed Reality

Open jenatali opened this issue 5 years ago • 1 comments

Running on the latest Windows Insider builds, PresentMon crashes when running with mixed reality providers in a mixed reality scenario.

jenatali avatar Mar 20 '19 15:03 jenatali

Crash only occurs when running DEBUG version of PresentMon with the -include_mixed_reality parameter running on 19H1 insider build (tested on build 18362)

It appears that in the 19H1 we never see the OnTimePresentationTiming or LatePresentationTiming events which ends up causing an assert(). There is no obvious replacement event in the trace. @jenatali and @sebmerry to investigate.

Analysis:

The Assert is because Completed is false here:

LateStageReprojectionEvent::~LateStageReprojectionEvent()
{
    assert(Completed || gMixedRealityTraceConsumer_Exiting);
}

Completed would normally be set here but FinalState is always Unknown

void MRTraceConsumer::CompleteLSR(std::shared_ptr<LateStageReprojectionEvent> p)
{
    if (p->FinalState == LateStageReprojectionResult::Unknown) {
        return;
    }

    if (p->Completed) {
        p->FinalState = LateStageReprojectionResult::Error;
        return;
    }

    p->Completed = true;
    {
        auto lock = scoped_lock(mMutex);
        mCompletedLSRs.push_back(p);
    }
}

It looks like we are seeing multiple of these else if (taskName.compare(L"LsrThread_BeginLsrProcessing") == 0) without any of these else if (taskName.compare(L"OnTimePresentationTiming") == 0 || taskName.compare(L"LatePresentationTiming") == 0) which is the only possible place that FinalState could be set to something valid

theZMan avatar Apr 12 '19 17:04 theZMan