Items with no label
3335 Discussions

Having trouble getting the SDK sample app to run

ALeat
Beginner
2,490 Views

HI, I am trying to build and run in Visual Studio 2013 the sample Windows app downloadable at https://software.intel.com/en-us/articles/background-replacement-code-sample-using-intel-realsense-technology Archived - Background Replacement Code Sample Using Intel® RealSense™ Technology | Intel® Software. When I run the app in VS13, the green light on my RealSense camera momentarily lights up, as if the app is running, but then shuts off. The output in VS13 is a follows:

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\Users\My Name\Downloads\background-replacement-sample\BackgroundReplacementSample\BackgroundReplacementSample\bin\Release\BackgroundReplacementSample.vshost.exe'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll'. Symbols loaded.

A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.VisualStudio.HostingProcess.Utilities.dll

The thread 0x2430 has exited with code 259 (0x103).

The thread 0xff8 has exited with code 259 (0x103).

The thread 0x1c0c has exited with code 259 (0x103).

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\Users\My Name\Downloads\background-replacement-sample\BackgroundReplacementSample\BackgroundReplacementSample\bin\Release\BackgroundReplacementSample.exe'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero2\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero2.dll'. Symbols loaded.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\Users\My Name\Downloads\background-replacement-sample\BackgroundReplacementSample\BackgroundReplacementSample\bin\Release\libpxcclr.cs.dll'. Cannot find or open the PDB file.

'BackgroundReplacementSample.vshost.exe' (CLR v4.0.30319: BackgroundReplacementSample.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\UIAutomationProvider\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationProvider.dll'. Symbols loaded.

The program '[6680] BackgroundReplacementSample.vshost.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.

Could anyone help me get this app running?

Thanks.

0 Kudos
20 Replies
ALeat
Beginner
939 Views

By the way, my hardware is an Intel Core i5-6200U with 8 GB of RAM running Windows 10 Home.

0 Kudos
MartyG
Honored Contributor III
939 Views

Which RealSense camera model are you using please? The comments left at the bottom of the article suggests that it only works with the F200 and SR300 camera models, but not the R200. The article itself, which is a couple of years old, references the F200 in its text.

If you do have an R200, the RealSense Sample Browser application does have an R200 sample called SegmentationEP (C++). EP refers to Enhanced Photography, a mode that was originally built for tablets with both a front-facing RGB camera and a rear-facing R200 camera. If you try to run it with just the R200 on its own, it may not work. You can simulate those old tablets though if you attach an ordinary webcam to a desktop computer along with your R200, or plug the R200 into a laptop and use the built-in webcam that most laptop screens have. EP applications should then work with such a setup.

0 Kudos
ALeat
Beginner
939 Views

Hi Marty, thanks a lot for the reply. I'm using an F200 integrated in my Dell laptop.

0 Kudos
ALeat
Beginner
939 Views

Also, here are the RealSense logs, in case they help with diagnostics.

0 Kudos
MartyG
Honored Contributor III
939 Views

RealSense cameras that are integrated into laptops are unfortunately a lot harder to fix than the external USB model. The two main choices you have are:

1. Try to download the camera drivers for your Dell model from Dell's support website.

2. If you have not wiped the laptop's hard drive since you bought it, there may be a 'recovery boot' image on it that you can use to restore the machine to factory-new condition. This differs from a normal Windows wipe and reinstall, as a recovery boot restores all the additional drivers and applications that came with your PC. Paste the link below into a browser window to open it (it won't open when launched from this page).

www.dell.com/support/article/us/en/19/sln297920/reset-or-reinstall-windows-10-on-your-dell-computer?lang=en# WinRE

You may also find this discussion about another F200 Dell laptop F200 useful.

0 Kudos
ALeat
Beginner
939 Views

Actually the camera works fine. I use it with Personify Presenter and it starts and work flawlessly. Could there be something in the SDK causing the error?

0 Kudos
MartyG
Honored Contributor III
939 Views

Given that the article is dated May 2015, it may indeed be incompatible with the current SDKs, as there have been several versions since then. After the 2016 R1 SDK, some programs stopped working with the camera from 2016 R2 onwards.

0 Kudos
ALeat
Beginner
939 Views

Ah ok. Is there an updated version of the Background Replacement Sample App? Were the logs I sent of any help identifying what is causing the access-violation error that makes the app shut down?

0 Kudos
MartyG
Honored Contributor III
939 Views

This access violation apparently has numerous causes, making it hard to diagnose. Memory issues, viruses or a bad Windows registry are among the most common causes. It may also be caused by being unable to locate a file.

I have also seen it on this forum before with Unity game engine projects, where it may be caused by a graphics conflict.

0 Kudos
ALeat
Beginner
939 Views

Thanks Marty. I updated Windows and now get a slightly different result. The debugging just seems to hang or go on forever, and I have to stop it manually, which produces this in the output in VS:

'BackgroundReplacementSample.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Users\Bert Leatherman\Downloads\background-replacement-sample\BackgroundReplacementSample\BackgroundReplacementSample\bin\Release\BackgroundReplacementSample.exe'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: BackgroundReplacementSample.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: BackgroundReplacementSample.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: BackgroundReplacementSample.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: BackgroundReplacementSample.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: BackgroundReplacementSample.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: BackgroundReplacementSample.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: BackgroundReplacementSample.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: BackgroundReplacementSample.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: BackgroundReplacementSample.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: BackgroundReplacementSample.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero2\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero2.dll'. Symbols loaded.

'BackgroundReplacementSample.exe' (CLR v4.0.30319: BackgroundReplacementSample.exe): Loaded 'C:\Users\My Name\Downloads\background-replacement-sample\BackgroundReplacementSample\BackgroundReplacementSample\bin\Release\libpxcclr.cs.dll'. Cannot find or open the PDB file.

Any idea what to do from here?

0 Kudos
ALeat
Beginner
939 Views

After letting debugging run for a few minutes, I get an icon in the Windows task bar and a message on the screen that says "Unable to configure the RealSense camera! Click OK to close the program." Please see attached pic. The RealSense camera never activates, which is different behavior than before I updated Windows, when the RealSense camera would momentarily activate (the green light would come on) before shutting down due to the "access violation" described in previous posts. Any idea what is happening now and how I might fix it to get the Background Replacement Sample App to work? Thanks.

0 Kudos
MartyG
Honored Contributor III
939 Views

RealSense projects in Virtual Studio usually have to have a RealSense 'development environment' set up to build RealSense applications with it. I wonder if you need to do that with this sample program if you haven't set up a C# development environment already in Visual Studio.

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?doc_devguide_csharp_application.html Intel® RealSense™ SDK 2016 R2 Documentation

0 Kudos
ALeat
Beginner
939 Views

Thanks for the idea. All I did was download the code sample at the link in my original post and then loaded the solution in VS13 to try to run it. Do I need to download something more, like the files at https://software.intel.com/en-us/realsense-sdk-windows-eol Intel® RealSense™ SDK for Windows (Discontinued) | Intel® Software? If so, which would you recommend I download and install to try to get the Background Replacement Sample App to work? Is that what you meant by setting up a development environment?

Also, perhaps noteworthy is that I get an error message in Camera Explorer as per the attached screenshot. However, my RealSense F200 works fine with Personify Presenter, as noted in an earlier post.

0 Kudos
MartyG
Honored Contributor III
939 Views

The RealSense SDK is separate from the RealSense drivers. When installed, it provides the DLL library files for the camera..

I wonder if the F200 works with Personify Presenter simply because it can also act as an ordinary webcam.

You can download the '2016 R2' SDK as a 1.8 gb download with the link below, which launches immediately in your browser when clicked on.

http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe

I have to finish for the day now, so if you leave further comments then I will pick them up first thing on Thursday morning. Good luck!

0 Kudos
JesusG_Intel
Moderator
939 Views

Hello ephbert,

The Background segmentation code you are trying to run was built on a very old version of the SDK that is no longer available. I recommend you do not use it. Your best bet for working with background segmentation is to use the BackGround Segmentation module in the SDK R3 available for download at the bottom half of this page: https://software.intel.com/en-us/realsense-sdk-windows-eol Intel® RealSense™ SDK for Windows (Discontinued) | Intel® Software . You can then adapt the module to your needs.

When responding, please create a new thread so that a case can be created in our tool. Your original post in this thread was too long so our system was not able to create a case in our internal tool.

Regards,

Jesus

Intel Customer Support

0 Kudos
ALeat
Beginner
939 Views

Hi Jesus, thanks a lot for the suggestion. I will download the Background Segmentation Module as you suggest. Does it also include a sample app that I can try to run and modify?

0 Kudos
JesusG_Intel
Moderator
939 Views

Yes. It has a background seg sample app you can modify.

Regards,

Jesus

Intel Customer Support

0 Kudos
ALeat
Beginner
939 Views

Sweet! I'll set up a new thread as you suggested if I have any issues.

0 Kudos
ALeat
Beginner
939 Views

Hi @Jesus, has Intel released the RealSense SDK for Mac as well or is it still Windows-only? Thanks.

0 Kudos
MartyG
Honored Contributor III
917 Views

The old Windows SDKs are no longer developed. Intel has moved on to the RealSense SDK 2.0 for SR300, D415 and D435 camera models. This new SDK is compatible with Mac OS High Sierra.

https://github.com/IntelRealSense/librealsense GitHub - IntelRealSense/librealsense: Intel® RealSense™ SDK

If you cannot use High Sierra, another option for you may be the original version of the Librealsense SDK, now known as the legacy version after the introduction of SDK 2.0.

https://github.com/IntelRealSense/librealsense/tree/v1.12.1 GitHub - IntelRealSense/librealsense at v1.12.1

0 Kudos
Reply