microsoft / HoloLens2ForCV

Sample code and documentation for using the Microsoft HoloLens 2 for Computer Vision research.
MIT License
494 stars 144 forks source link

In DEPTH_AHAT mode, the StreamRecorder program cannot work #20

Closed jinpengxuan closed 4 years ago

jinpengxuan commented 4 years ago

When setting the following configuration: std::vector AppMain::kEnabledRMStreamTypes = { ResearchModeSensorType::DEPTH_AHAT }; The following logic does not work correctly:

 _while (!pCameraReader->m_fExit && pCameraReader->m_pRMSensor)
    {
        HRESULT hr = S_OK;
        IResearchModeSensorFrame* pSensorFrame = nullptr;

        hr = pCameraReader->m_pRMSensor->GetNextBuffer(&pSensorFrame);

        if (SUCCEEDED(hr))
        {
            std::lock_guard<std::mutex> guard(pCameraReader->m_sensorFrameMutex);
            if (pCameraReader->m_pSensorFrame)
            {
                pCameraReader->m_pSensorFrame->Release();
            }
            pCameraReader->m_pSensorFrame = pSensorFrame;
        }
    }_

The GetNextBuffer function crashed, resulting in the inability to perform the next step

fbogo commented 4 years ago

Have you observed this behavior since the first time you deployed the app? There is a known issue with AHAT depth that needs further investigating and is in our radar. Could you try to reboot the HoloLens and see if the problem remains?

naleksiev commented 4 years ago

I had the same issue. This is the only project that has ARM (32bit) target platform, which happens to be the default one. For fix check PR #23

chiarapalu commented 1 year ago

I'm having the same issue while running the app in AHAT mode. I Installed it again after a few months (I was using it without any problem a few months ago). Any help? Thanks!