microsoft / RoomAliveToolkit

Other
715 stars 191 forks source link

.dll Issues and Samples #10

Closed TheNome closed 9 years ago

TheNome commented 9 years ago

A colleague and I are working on getting RoomAlive set up, we're starting with the default single projector/kinect setup as is in the ReadMe. The process goes along and at random points we will get a Microsoft .NET Framework error that points to line 854 in the Ensemble's main config or files missing entirely. We have extracted the files, re-extracted them, rebuilt numerous time and this error will still come up at random times. At one point, when we finally got far enough, we opened up the sample projects and managed to get the 3D object to display. We were UNable to get the Wobble effect to work and, again, received the error in Ensemble before we were able to test the rest of the samples.

Is anyone else experiencing these problems or know of a suggestion we might try to either avoid or entirely fix this issue in the future? Thanks.

thundercarrot commented 9 years ago

Line 854 in which file? Can you be any more specific about the exception?

TheNome commented 9 years ago

unnamed

There is the error box that shows up and the entire text error is following this.

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

\ Exception Text ** SharpDX.SharpDXException: HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: The parameter is incorrect.

at SharpDX.Result.CheckError() at SharpDX.Direct3D11.Device.CreateTexture2D(Texture2DDescription& descRef, DataBox[] initialDataRef, Texture2D texture2DOut) at SharpDX.Direct3D11.Texture2D..ctor(Device device, Texture2DDescription description) at RoomAliveToolkit.MainForm.videoPanel1_SizeChanged(Object sender, EventArgs e) in c:\Users\gvis\Desktop\RoomAlive\ProCamCalibration\CalibrateEnsemble\MainForm.cs:line 854 at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight) at System.Windows.Forms.Control.UpdateBounds() at System.Windows.Forms.Control.WmWindowPosChanged(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

\ Loaded Assemblies ** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

CalibrateEnsemble Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0

CodeBase: file:///C:/Users/gvis/Desktop/RoomAlive/ProCamCalibration/CalibrateEnsemble/bin/Debug/CalibrateEnsemble.exe

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34250 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34239 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

SharpDX Assembly Version: 2.6.3.0 Win32 Version: 2.6.3

CodeBase: file:///C:/Users/gvis/Desktop/RoomAlive/ProCamCalibration/CalibrateEnsemble/bin/Debug/SharpDX.DLL

ProCamEnsembleCalibration Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0

CodeBase: file:///C:/Users/gvis/Desktop/RoomAlive/ProCamCalibration/CalibrateEnsemble/bin/Debug/ProCamEnsembleCalibration.DLL

SharpDX.Direct3D11 Assembly Version: 2.6.3.0 Win32 Version: 2.6.3

CodeBase: file:///C:/Users/gvis/Desktop/RoomAlive/ProCamCalibration/CalibrateEnsemble/bin/Debug/SharpDX.Direct3D11.DLL

System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

SharpDX.DXGI Assembly Version: 2.6.3.0 Win32 Version: 2.6.3

CodeBase: file:///C:/Users/gvis/Desktop/RoomAlive/ProCamCalibration/CalibrateEnsemble/bin/Debug/SharpDX.DXGI.DLL

SharpDX.D3DCompiler Assembly Version: 2.6.3.0 Win32 Version: 2.6.3

CodeBase: file:///C:/Users/gvis/Desktop/RoomAlive/ProCamCalibration/CalibrateEnsemble/bin/Debug/SharpDX.D3DCompiler.DLL

\ JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

thundercarrot commented 9 years ago

I've never seen this error before. Can you double check that the Height and Width fields in depthBufferDesc look reasonable? (set a breakpoint at line 854).

Can you tell me what kind of video card you are using?

TheNome commented 9 years ago

The video card is an NVidia Quadro 5000. The Height and Width fields are automatically changed to the required resolution of the projector (and the monitor) of 1024x768. We've not even gotten to the point to create the calibration.xml file to manually change the resolution (something we have not done nor intend to). Is there anything else I can provide that could help you understand this issue we're having? Thanks.

thundercarrot commented 9 years ago

I've never worked with that card before; but I would suspect that either it does not support non-power-of-2 texture dimensions, or floating point format is not supported for depth stencil buffers.

You can inspect the capabilities of your video card with the dxcapsviewer that is included in the Windows SDK: https://msdn.microsoft.com/en-US/windows/desktop/bg162891

dxcapsviewer is located in

C:\Program Files (x86)\Windows Kits\8.1\bin\x64\dxcapsviewer.exe

capture

TheNome commented 9 years ago

Going through the steps provided, the machine we are using DOES allow full Non Power of 2 Textures. We managed to get the 3D model to work, as previously stated. Any ideas as to why these errors are persisting?

thundercarrot commented 9 years ago

Try this: Enable native code debugging in the project (right click the project, Properties... Debug tab, "native code debugging"). Run the project, and see if there are any D3D error messages in Visual Studio's output window. CalibrateEnsemble creates a D3D debug device which enables useful warning messages from D3D but these are only visible when native code debugging is enabled in VS.

Let me know if you see anything interesting just before the crash happens.

TheNome commented 9 years ago

Alright, thank you. The PC we were using has been returned to have Demos done for a group of students coming in today. We've moved onto an HP sprout that also fully supports the Non Power of 2 Textures. We will be restarting the RoomAlive configuration shortly and will get back to you once that is complete. Thank you, ThunderCarrot.

TheNome commented 9 years ago

We've managed to get through the native code debugging. Running it through there actually allowed CalibrateEnsemble to run this time. Upon starting the GrayCodes, we get the error

~~"EndpointNotFoundException An unhandled exception of type 'System.ServiceModel.EndpointNotFoundException' occurred in mscorlib.dll~~

~~Additional information: Could not connect to net.tcp://localhost:9000/KinectServer2/Service. The connection attempt last for a time spawn of 00:00:02.0378838. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:9000 "~~

Any thoughts?

We closed the Windows Firewall and managed to get it to run the GrayCodes. Once we hit "Solve," however, we came across and error we haven't seen but you hopefully have.

" NullReferenceException was unhandled

An unhandled exception of type 'System.NullReferenceException' occured in ProCamEnsembleCalibration.dll

Additional information: Object reference not set to instance of an object. "

thundercarrot commented 9 years ago

Can you zip up the entire directory of files that contains calibration.xml and put that where I can download it? Typically, errors like this in Solve are due to some problem in the setup, like the projection is too small, too bright, or the scene is too planar. I can troubleshoot this quickly if I have that directory.

TheNome commented 9 years ago

Had to migrate the folder to another system (Windows 7). The UnInstall.ps1 file was "nonexistant or is read-only" so I migrated it, as it was, indeed, a real file and the account had full access to it. Anyways, the .zip is labelled "RoomAlive.zip" and is hosted on filedropper. Here's the link: http://www.filedropper.com/roomalive

thundercarrot commented 9 years ago

Got it. Looks to me like the scene is too planar. At the moment, the Toolkit requires that that, during calibration only, the scene must not be planar. You might consider setting up your projector/camera somewhere else where you can manipulate the scene more easily to make it less coplanar. e.g., put a few boxes around etc. Now in runtime, this is not necessary.

laurenegts commented 9 years ago

Hi, I'm @TheNome 's colleague. I added more objects to the scene, and am still getting the same error. At one point we got it working in a different location, although the location is not ideal for us to use in runtime. Is it possible to move locations after the Kinect is calibrated and still have RoomAlive work without recalibrating?

TheNome commented 9 years ago

We have moved the screen towards a corner and gotten it to acquire and calibrate. We've gotten to this point a couple of times before but we start getting the error we had that started this thread once we have shut down the RoomAlive setup, and VisualStudios. We'll continue to progress and will update you with more information if the error comes up once again. Thank you for the assistance.

TheNome commented 9 years ago

Update:

We are no longer receiving these mysterious errors. Though, as we lack a multitude of Windows 8 computers, would it be possible to run Windows 7 on the external computers that run a projector? Our thought is to have the main computer run Windows 8 and have each projector on a more readily available Windows 7 computer instead. Any thought on if this would work or not?

thundercarrot commented 9 years ago

How many cameras and projectors do you have?

TheNome commented 9 years ago

We've got access to two cameras and projectors at this moment. Given a couple hours, we can scrounge up maybe a total of five.

thundercarrot commented 9 years ago

AFAIK the KinectV2 requires Windows 8, and a PC can host only one.

As far as the rendering goes, I'm not sure what dependencies I've let sneak into the projection mapping sample. I haven't used a Windows 7 machine in quite a while. But you could conceivably find out.

The easiest configuration is connect all your projectors to one machine with a reasonable 4 output graphics card; have that machine host one camera, and then add more Windows 8 machines to host cameras as needed.

TheNome commented 9 years ago

What if we were to host all Kinects off of the Windows 8 Host and essentially reverse everything so that each projector was on a different Windows 7 machine? I can go snag one and attempt it and get back to you.

thundercarrot commented 9 years ago

You can only host one KinectV2 on a PC.

TheNome commented 9 years ago

Ah, that's what I was afraid of. Thanks.