Log in or register to post comments

Play In Editor Mode No Longer Functioning. Freezing Unity

April 12, 2019 - 5:55pm #1

I just recently purchased an El Gato Cam Link. 



Before connecting it to my computer, my Vuforia application was able to play in editor using my Logitech c920. Now, after I connected the cam link it will no longer play with the same logitech setup. Instead it Freezes. This issue is persistent on two computers, and is also persistent if I remove my cam link. This is not project specific as I already tried a blank project. It does not freeze Unity when I have no camera plugged in or when Cam Link is plugged in. 



Issue 1: It freezes my Unity Editor on both of my computers even when Cam Link Is Not Connected.



Issue 2: It does not freeze when Cam Link is plugged in but the Unity Webcam Texture fails to initialize.

Oddly it works in a UWP Build without issues.



Unity Version 2018.3.6f1

Vuforia 8.0.1



Thank you in advance for your help. 

Play In Editor Mode No Longer Functioning. Freezing Unity

June 18, 2019 - 9:04am #30

Hello,

I'm suffer a lot from this issue. In my case the editor freeze call stack looks like this:

Void UnityEngine.WebCamTexture:Play ()+0x2 at C:\buildslave\unity\build\artifacts\generated\bindings_old\common\Audio\UnityEngineWebCamTextureBindings.gen.cs:63 C#<br>
	Void Vuforia.WebCamTexAdaptor:Play ()+0x1b at :-1 C#<br>
	Void Vuforia.WebCam:StartCamera ()+0x1a at :-1 C#<br>
	Int32 Vuforia.CameraDevice:StartCameraDevice ()+0x15 at :-1 C#<br>
	Boolean Vuforia.CameraDevice:Start ()+0x2f at :-1 C#<br>
	Boolean Vuforia.VuforiaARController:StartVuforia (Boolean)+0x31 at :-1 C#<br>
	Void Vuforia.VuforiaARController:StartAfterInitializationCompleted ()+0x136 at :-1 C#<br>
	Void Vuforia.VuforiaARController:Start ()+0x3e at :-1 C#

So the UnityEngine.WebCamTexture:Play () is causing the freeze. It freezes Unity ones per two app launches. If one time everything works, than next time a guaranteed freeze occurs. Would be ultimately great if anyone could share some fix or workaround for this.



Unity 2018.3.13f1

Vuforia 8.1.7

Logitech Webcam C200

Play In Editor Mode No Longer Functioning. Freezing Unity

May 7, 2019 - 4:10am #29

I did a factory reset on my notebook, and now it works.

I wonder if it had anything to do with Windows Updates.

I'll keep an eye out for that.

 

Thanks for the help.

Play In Editor Mode No Longer Functioning. Freezing Unity

May 2, 2019 - 12:52pm #28

@medabit very impressive support! Thank you. This did not fix the issue for me unfortunately. My issue happened only after I plugged in the cam link, tried it then switched back to the webcam. I purchased another HDMI pass-through device which happens to work in Vuforia play mode and editor mode without freezing the editor. It's called Mirabox. The issue is quite weird because if I switch back to the webcam it will freeze. I'm glad i was able to get a HDMI pass-through to work in editor. 

Play In Editor Mode No Longer Functioning. Freezing Unity

May 1, 2019 - 2:10pm #27

Hello,

I purchased the Logitech HD Pro Webcam C920 and was not able to replicate the issue. The webcam worked perfectly for me.

One thing I played with is the settings in <unity-install-folder>/Editor/Data/PlaybackEngines/VuforiaSupport/VuforiaResource/webcamprofiles.xml. These are the PlayMode settings for webcams, and the parameters can be adjusted by editing the file. If your webcam is not listed, you can also add entries by using the device name that shows in Unity Editor->Window->Vuforia Configuration->Webcam->Camera Device.

I noted that there was already a listing for the same named webcam (surprise), so I updated the values as follows:

    <webcam deviceName="Logitech HD Pro Webcam C920">
        <windows>
            <!-- size of the web cam texture requested from Unity -->
            <requestedTextureWidth>1920</requestedTextureWidth>
            <requestedTextureHeight>1080</requestedTextureHeight>
            <!-- size of the texture Unity's web cam texture will be rescaled to -->
            <resampledTextureWidth>1920</resampledTextureWidth>
        </windows>
        <osx>
            <!-- size of the web cam texture requested from Unity -->
            <requestedTextureWidth>640</requestedTextureWidth>
            <requestedTextureHeight>480</requestedTextureHeight>
            <!-- size of the texture Unity's web cam texture will be rescaled to -->
            <resampledTextureWidth>640</resampledTextureWidth>
        </osx>
    </webcam>

Per the Logitech C920 specs it can run 1080p @ 30fps. These settings updated once I started PlayMode again, and I could see the improved quality over the default 640x480. I've attached some screen grabs from 3 variations of the settings that show the improvement in the quality of the input to PlayMode.

Can you try adjusting these settings?

Thanks,

Vuforia Engine Support

Play In Editor Mode No Longer Functioning. Freezing Unity

April 29, 2019 - 3:23pm #26

Hello,

Looks like the Logitech C920 is a common denominator. I'll procure and see if I can replicate.

Thanks,

Vuforia Engine Support

Play In Editor Mode No Longer Functioning. Freezing Unity

April 29, 2019 - 10:38am #25

@medabit - Understood. But the main issue is now if I use any webcam it freezes... except 1/15 times. I don't need it to support that device but I do need Vuforia not to freeze Unity on start. Is there anything you can think of that would fix this issue. The other guy is having issues with a supported device on his computer.



 

Play In Editor Mode No Longer Functioning. Freezing Unity

April 26, 2019 - 4:37pm #24

I tested on a friend's computer and it worked.

Same Unity Version (2019.1.0f2)

Same Vuforia Version (8.1.7)

Same Webcam (HD Pro Webcam C920)

Different Windows Version though (The one running Windows 10 presents problems, the one running Windows 8 doesn't)

I am 100% sure that it used to work fine on this computer before, even on Windows 10. It was after a factory reset and a fresh install that I started noticing the problem.

 

I would appreciate any pointers at all to try and fix it myself.

Play In Editor Mode No Longer Functioning. Freezing Unity

April 26, 2019 - 4:19pm #23

That is unfortunate :(

If it makes any difference, I just tested on a HD Pro Webcam C920 and the problem persists

Play In Editor Mode No Longer Functioning. Freezing Unity

April 26, 2019 - 1:23pm #22

Hello,

I know this will be an unpopular position, but Vuforia Engine provides support for Unity Play Mode as a convenience feature to devs. And, as such, we cannot guarantee compatibility with every video input device. We know it works with many off-the-shelf USB webcams.

Thus, to set the correct expectation, it is highly unlikely that this issue will get prioritized and, as such, I do not expect a fix anytime soon, if at all. The primary issue being that it is not possible for us to procure and test every PC/USB dongle/Camera combination for a feature that is not a core Engine feature.

Apologies for not being able to meet your support needs on this issue.

Thanks,

Vuforia Engine Support

Play In Editor Mode No Longer Functioning. Freezing Unity

April 26, 2019 - 10:09am #21

Not from my side! :( I am sure they are working hard on it though. 

Play In Editor Mode No Longer Functioning. Freezing Unity

April 26, 2019 - 8:38am #20

Any updates on this? I'm still facing the problem.

Play In Editor Mode No Longer Functioning. Freezing Unity

April 23, 2019 - 12:44pm #19

@medabit I feel like this issue is similar to when you make an infinite while loop. It completely freezes Unity. 

Play In Editor Mode No Longer Functioning. Freezing Unity

April 18, 2019 - 9:58am #18

@medabit

Both inputs i tried were 1920 x 1080. I don't know the fps though. I think maybe 60. The issue was not the CamLink itself tho, but after the CamLink was plugged in and recognized by the Vuforia plugin the regular webcam (Logitech BRIO & Logitech C920) freezes.  We thought as much as well so we did not want to run a full 4k feed with it. unfortunately there are no capture settings, but I believe it will pass the source resolution. 

Play In Editor Mode No Longer Functioning. Freezing Unity

April 17, 2019 - 4:04pm #17

Hello @lwarner,

I'm wondering what resolution you're running when capturing? Vuforia's CV algorithms have to process every camera frame, so if you're capturing 4K @ 60fps this *could* cause significant computational overhead.

I don't know much about the Camlink, but is there a way to set capture to 1080p/720p @ 30fps?

Thanks,

Vuforia Engine Support

Play In Editor Mode No Longer Functioning. Freezing Unity

April 17, 2019 - 3:32pm #16

@medabit



That's the exact one. Currently a GoPro camera.... and ironically another computers screen when someone else is using the GoPro!  Anything will do. It also works really well in the UWP Build. The issue that I am having is exclusive to the Unity Editor! Thanks for the help!

Play In Editor Mode No Longer Functioning. Freezing Unity

April 17, 2019 - 2:36pm #15

Hello @lwarner,

Thanks for the details. Is this the product you're using? https://www.elgato.com/en/gaming/cam-link-4k

If so, what are you plugging into the HDMI port?

Thanks,

Vuforia Engine Support

Play In Editor Mode No Longer Functioning. Freezing Unity

April 17, 2019 - 10:34am #14

@medabit



The steps I did to cause this error:

1. Plug in ElGato CamLink.

2. Unplug all other cameras.

3. Set the ElGato CamLink as the webcam source in Vuforia Configuration.

4. Press play. 

5. Unplug ElGato CamLink.

6. Replug other webcam device.

7. Set the other webcam device as the webcam source in Vuforia Configuration.

8. Press play. 

9. Observe the editor freezing.

Is the issue persistant across all of your dev machines?

 - All the dev machines we installed the CamLink on. 



Are you running Unity on a VM?

- No, we are not.



Based on the other reply, any time an unorthadox device is registered as a webcam it causes unity to freeze when loading Vuforia. 

As always thank you for the swift replies and assistance. 

Play In Editor Mode No Longer Functioning. Freezing Unity

April 17, 2019 - 7:47am #13

Hello @lwarner,

I'd really like to help here but I'm at a loss for how to reproduce and investigate. We've done a lot of testing of 8.0.X using PlayMode and have not encountered this issue.

Is the issue persistant across all of your dev machines? Are you running Unity on a VM?

Thanks,

Vuforia Support

Play In Editor Mode No Longer Functioning. Freezing Unity

April 16, 2019 - 1:40pm #12

The issue is persistent even if I remove the Camlink Driver too.

Play In Editor Mode No Longer Functioning. Freezing Unity

April 16, 2019 - 1:29pm #11

@Medabit Well Unity is freezing due to this. Even when the device is not plugged in. We would love for a potential investigation and fix, or if Vuforia has encountered this before at any time, how was it addressed. This is an issue beyond more than just my 1 unity project but each unity projects now. Freezing without error code. I left it over the weekend and it was still frozen. Now I cannot test a normal setup in playmode. 

Play In Editor Mode No Longer Functioning. Freezing Unity

April 16, 2019 - 10:53am #10

Hello,

I'm sensitive to the issues you're having with PlayMode using these webcams/adapters. However, there must be thousands of hardware permutations to stream video frames into Unity, all of which we cannot test.

We do our best to test with a variety of USB webcams and feel confident that those work with Vuforia and Unity PlayMode. Please let me know if you want any specific recommendations.

Thanks,

Vuforia Engine Support

Play In Editor Mode No Longer Functioning. Freezing Unity

April 15, 2019 - 4:58pm #9

@medabit I don't have a proper USB webcam, so I tried using my phone as one, with Droidcam. I found out that the behavior is very inconsistent, here's what happened in my tests:

Play with droidcam = worked

Exit play mode

Play with droidcam = worked

Exit play mode

Play with Integrated Webcam = worked

Exit play mode

Play with Integrated Webcam = freeze

killed Unity, opened again

Play with droidcam = worked

Exit play mode

Play with droidcam = freeze

killed Unity, opened again

Play with droidcam = freeze

Play In Editor Mode No Longer Functioning. Freezing Unity

April 15, 2019 - 3:23pm #8

@medabit what about the CamLink issues?

Play In Editor Mode No Longer Functioning. Freezing Unity

April 15, 2019 - 2:14pm #7

Hello @victoralbenor,

Can you also test with a USB webcam to see if it could be related to a driver issue with your embedded webcam?

Unfortunately, we don't have a Dell 7 to see if we can replicate the issue.

Thanks,

Vuforia Engine Support

Play In Editor Mode No Longer Functioning. Freezing Unity

April 15, 2019 - 10:49am #6

Mine is not CamLink though, it's an integrated camera on my Dell G7 notebook. It appears on device manager as "Integrated Webcam"

Play In Editor Mode No Longer Functioning. Freezing Unity

April 15, 2019 - 10:24am #5

Same as @victoralbenor.



So it has something to do with camlink driver compatibility with unity/vuforia i think. Because this issue only happens after CamLink is plugged in.  It does not affect my builds though because they work fine with the CamLink and no freezing. 

 

Play In Editor Mode No Longer Functioning. Freezing Unity

April 15, 2019 - 9:39am #4

Do you mean like using webcamTexture?

If so, yes. In my case, I am able to use webcamTexture in play mode without freezing Unity, if Vuforia is disabled.

Play In Editor Mode No Longer Functioning. Freezing Unity

April 15, 2019 - 9:17am #3

Hello,

In Play mode, Unity is responsible for providing the camera frames to Vuforia.

Are you able to reproduce this in Unity *without* Vuforia enabled?

Thanks,

Vuforia Engine Support

Play In Editor Mode No Longer Functioning. Freezing Unity

April 15, 2019 - 9:07am #2

I am facing the same problem.

Log in or register to post comments