OSVR / OSVR-Core

The core libraries, applications, and plugins of the OSVR software platform.
Apache License 2.0
329 stars 124 forks source link

Windows 10 Insider Preview DirectShow Image Capture Crash #434

Open rpavlik opened 8 years ago

rpavlik commented 8 years ago

In the xx319 build and later, opening the camera in the tracker plugin causes a crash. Camera apparently works fine in the native camera app as well as "dsgrab".

My hypothesis is either a Windows bug, or this new build doesn't like us setting the powerline frequency.

cc @d235j

rpavlik commented 8 years ago

A test would be to pass &nullAction as the second param to new directx_camera_server here: https://github.com/OSVR/OSVR-Core/blob/master/plugins/videobasedtracker/DirectShowHDKCameraFactory.h#L91 , with that function defined as:

inline void nullAction(IBaseFilter &) {
    // Might be needed on newer builds of Windows.
}

(I've sent such a build to one user experiencing this)

In any case, unless this is a documented intentional change, it's a bug in the Windows preview build and should be reported through their feedback mechanisms - all the code there has proper checks of the hresult as far as I can tell and should be logically sound.

russell-taylor commented 8 years ago

That code is using a deprecated header/struct to talk to the camera. That struct broke when reading from files several years back, but kept working for cameras. Maybe they finally did away with this for cameras as well. Don't remember the details, but it was a version-2 struct change that took things from 32 bits to 64 bits as I recall.

russell-taylor commented 8 years ago

The issue I had before did not have to do with the powerline frequency, so it may be a red herring.

d235j commented 8 years ago

The non-deprecated way is to use the Windows Media Foundation API (described at https://msdn.microsoft.com/en-us/library/bb970511(v=vs.85).aspx). That said, the old methods should not break entirely — but neither should they be relied on.

stanmanwplan commented 8 years ago

Hi Guys,

I will no longer be working on the OSVR project, and should be removed from this mailing list. I'm not sure how to unsubscribe. Perhaps someone can help me to do so.

Stan

On Wed, May 18, 2016 at 8:48 AM, Ryan Pavlik notifications@github.com wrote:

A test would be to pass &nullAction as the second param to new directx_camera_server here: https://github.com/OSVR/OSVR-Core/blob/master/plugins/videobasedtracker/DirectShowHDKCameraFactory.h#L91 , with that function defined as:

inline void nullAction(IBaseFilter &) { // Might be needed on newer builds of Windows. }

(I've sent such a build to one user experiencing this)

In any case, unless this is a documented intentional change, it's a bug in the Windows preview build and should be reported through their feedback mechanisms - all the code there has proper checks of the hresult as far as I can tell and should be logically sound.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/OSVR/OSVR-Core/issues/434#issuecomment-220070105

d235j commented 8 years ago

@stanmanwplan go to the Github URL at the bottom of the email, then log in and there should be an "unstar" button on the upper right hand corner, and an "unsubscribe" button at the lower right. Maker sure both of them are clicked so this project is no longer starred, and this issue is no longer subscribed to.

gothickitty93 commented 8 years ago

@russell-taylor I agree about the powerline freq not being the issue. After trying the test apps that @rpavlik sent me, they both tried to open the device and then crashed.

d235j commented 8 years ago

@gothickitty93 did you try at all with DSGrab? That didn't work for me either with the OSVR camera.

However, a Logitech webcam worked just fine! I did do some debugging of the crash so I know where it happens — I can easily do this again if it would benefit @russell-taylor or @rpavlik.

gothickitty93 commented 8 years ago

@d235j I didn't get anything with DSGrab either. The only thing that seems to work with the IR camera (that I currently have installed) is the default Camera application that comes with Windows 10. I think you should post your debug stuff just in case. (If anything, I'm interested in looking at it.)

d235j commented 8 years ago

@gothickitty93 do you mean it crashed?

If you want to debug it yourself you can get the source code for DSGrab from https://github.com/thegrandpoobah/dsgrab and compile it and run it in Visual Studio and it should crash there too.

I'm back on a stable release of Win10 for now so I can't test this for you.

gothickitty93 commented 8 years ago

@d235j My bad, for some reason I thought you meant you debugged the crash in OSVR server, not DSGrab.

d235j commented 8 years ago

I debugged both and both crash in the same function calls, IIRC. Just DSGrab is simpler and easier to follow.

gothickitty93 commented 8 years ago

Ah. OK. Since that is the case, I'll try to get some debug info and post it tonight.

On Thursday, May 19, 2016, David Ryskalczyk notifications@github.com wrote:

I debugged both and both crash in the same function calls, IIRC. Just DSGrab is simpler and easier to follow.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/OSVR/OSVR-Core/issues/434#issuecomment-220332268

Sent from one of my iOS devices.

gothickitty93 commented 8 years ago

@d235j Sorry, but I don't have any experience with source code building on Windows. I attempted to get it to work, but I could not get it to build in VS, and it seems that it requires Boost, and I have no idea how to add dev libraries on a non *NIX OS. Tried putting the boost source folder in the same dir, but no luck. (I'm more of a "./configure;make;make install" guy)

rpavlik commented 8 years ago

So two approaches that don't involve finding and fixing the crash itself would be:

We've ruled out the powerline thing as not the cause, and we've also concluded that uvbi-view-cam is enough of a test app, don't need the full plugin to get the crash. I had thought DSGrab didn't crash, but knowing that it did is interesting. Where exactly does it all crash?

d235j commented 8 years ago

I'd have to try again, but I'm no longer on the insider build. Usability was more important at the time.

gothickitty93 commented 8 years ago

I have updated to build 14352, and the issue seems to be gone. Test app I was given is functioning, as well as normal OSVR server.

dabigloosa commented 8 years ago

Hi guys, sorry to just jump in to this, but, can you please let me know if you can "calibrate" the HMD with the video tracker calibration utility from osvr folder? I am on this inside build now and the server does not crash anymore, however, when I run the calibration utility it seems that the beacons are seen, but not detected correctly. So I can see them shining but no numbers appear and no calibrations happens. I just want to doublecheck if others also have such an issue.

gothickitty93 commented 8 years ago

What I have happen is after the beacons are seen, the calibration app freezes when trying to perform the actual calibration

Sent from one of my iOS devices.

zamorasf commented 8 years ago

Same problem here, at first the camera works without showing the red/green numbers and when the numbers show up the application freezes.

gothickitty93 commented 8 years ago

I am still having this issue, and I'm not even using insider previews anymore. I'm running the Windows 10 Anniversary Update.

dabigloosa commented 8 years ago

Try to reinstall everything osvr related. I am not having issues with the server anymore while using it. However, when shutting down the machine, it goes into a bluescreen. So I need to unplug the HMD and everything to be able to shut it down correctly.

gothickitty93 commented 8 years ago

Could the issue described in this article be a possibility? https://www.thurrott.com/windows/windows-10/76719/microsoft-broken-millions-webcams-windows-10-anniversary-update

rpavlik commented 8 years ago

Yes, this is now a different issue than the one that initially promoted this report, but is now a known issue and does seem to be related to the webcam architecture changes. Additionally there are USB host driver changes (for motherboards, add in cards, etc) which also are sometimes causing failure at earlier steps (can't get an image at all)

On Mon, Aug 22, 2016, 8:39 AM Ryan Kitty notifications@github.com wrote:

Could the issue described in this article be a possibility? https://www.thurrott.com/windows/windows-10/76719/microsoft-broken-millions-webcams-windows-10-anniversary-update

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OSVR/OSVR-Core/issues/434#issuecomment-241415264, or mute the thread https://github.com/notifications/unsubscribe-auth/AADuyaC2Nm5hbm6R6FUo1PIxboTa70Vwks5qiaargaJpZM4Ihauz .

Ryan A. Pavlik, Ph.D. CTO - OSVR Platform Sensics, Inc. www.sensics.com

Latest news and blog posts (subscribe here http://sensics.com/subscribe-to-our-mailing-list/ to get weekly updates):

Aug 17: VRGuy podcast: Nonny de la Pena on immersive journalism http://sensics.com/vrguy-podcast-episode-20-nonny-de-la-pena-co-founder-emblematic-group/

Aug 9: Why we launched the OSVR Store http://sensics.com/launch-osvr-store/

Aug 1: OSVR, a look ahead http://sensics.com/osvr-look-ahead/