This project is read-only.

2 Problems with Touchless

Mar 19, 2009 at 4:01 AM
I currently have two problems running touchless on my pc:

When using the new source code with mouse demo, I get the following error on start:

 

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

************** Exception Text **************
System.IO.FileLoadException: Could not load file or assembly 'WebCamLib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)
File name: 'WebCamLib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.Runtime.InteropServices.COMException (0x800736B1): The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)
   at TouchlessLib.TouchlessMgr.RefreshCameraList()
   at TouchlessLib.TouchlessMgr.get_Cameras()
   at TouchlessDemo.TouchlessDemo.TouchlessDemo_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
TouchlessDemo
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/William%20Anderson/Desktop/touchless-28723/bin/Release/TouchlessDemo.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
TouchlessLib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/William%20Anderson/Desktop/touchless-28723/bin/Release/TouchlessLib.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:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

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.

and also, when i am using touchless, my camera image appears backwards. Maybe we could add a flip function in the program (my cam software doesn't have one)


Thank You,
William Anderson

Mar 19, 2009 at 7:35 AM
Hi William,

Thanks for letting me know about these problems. I hope I can help.

First, you should be able to flip the camera image in code and in TouchlessDemo.
Code: use "Camera.RotateFlip", a System.Drawing.RotateFlipType enum value.
TouchlessDemo app: On the "Camera" tab use the "Flip Image Horizontally"/"Flip Image Vertically".

I can't seem to reproduce those JIT errors. Has anyone else run into this problem?
Can you provide some additional info and try these suggestions?
First, I would try moving the files to a directory without spaces in the path and retry.
Do you get these errors when launching TouchlessDemo from Visual Studio or when? In debug/release/both?
What version of Visual Studio are you using? Any other relevant info on your setup?
Are you using TouchlessDev.sln? Do you have any local edits? Does WebCamLib build successfully?
Do you have "C:/Users/William%20Anderson/Desktop/touchless-28723/bin/Release/WebCamLib.dll"?
Double check the WebCamLib Output Directory in Proect Properties: $(ProjectDir)bin\$(ConfigurationName)
Try force-syncing your source code to the latest version. (or delete your local files and re-download).
Try removing the WebCamLib project from your solution and referencing a prebuilt .dll.

Hopefully that will help you out. Please let me know if you find a solution.
Thanks for using Touchless and helping me improve the project with feedback!
- Mike
Mar 25, 2009 at 12:57 AM

a litte searching effort resultet in this piece of information:
http://rant.blackapache.net/2008/05/17/resolving-side-by-side-configuration-issues/

I suppose William is using a precompiled (binary) version of the project, but doesn't have the same version of the runtime libraries.

Compiling it yourself would possibly help, otherwise you have to find out (see the link above) what runtime you need and install it
(just guessing:
http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en
or maybe follow the "what others are downloading" links at the end of that page)

Mike can surely say what VC++ (?) version is used for the WebCamLib?

PS: don't wonder Mike, I am a bit busy at the moment, so no new patches currently ;)

Mar 25, 2009 at 1:52 AM
Edited Mar 25, 2009 at 2:03 AM
Hey guys.Got home last night and I didn't post my solution. Turned out I had forgotten I still had Visual Basic 2005 instead of updating to 2008 on this computer. After updating everything ran great. Perhaps we could make a better stabilization technique for touchless since most of ourhands are a little shaky. Anyways this is a great project. I'll keep helping out as much as I can.

William Anderson

P.S. VS 2005 was also apparently the reason I wasn't getting my flip image horizontally button to work. 
Mar 25, 2009 at 5:35 AM
Thanks for helping out, eFloh; you're the man.
I'm glad you were able to work around this problem, William.

Of course stabilization is important, but so is accurate information.
Spatial and temporal data smoothing is definitely a viable approach.
However, it's not something we'd want to build into the system, because of the accuracy tradeoff.

Client projects could easily implement their choice of smoothing on the data.
But perhaps it's worth building an optional or variable level of this smoothing in the library.
Probably a discussion for another thread.

Thanks
- Mike