.NET 4.0 and App Hand in DEBUG

Aug 19, 2010 at 8:54 AM
Edited Aug 19, 2010 at 8:56 AM
Hello, I'm use VS2010 Express, latest Awesomium library and u WPF Chromium wrapper (at Windows 7).
My problem is strange but simple: u sample and my application hang when i try run it in debug mode.
In release all seems to be ok - work perfectly. When I try to fix it I check, that app hang at this piece of code:

webCore = new Awesomium::WebCore(
     marshal_as<std::wstring>( userDataPath ),
     marshal_as<std::wstring>( pluginPath ),
     marshal_as<std::wstring>( logPath ),
     level,
     enablePlugins,
     marshal_as<std::string>( userAgentOverride ) );


File "Cjc.AwesomiumWrapper.h", line 872.
All vars have this same values in debug and release mode.
Application dont throw any exception: just stoped and hang. Smb have any idea?
Coordinator
Aug 19, 2010 at 2:29 PM
psychowico - The only similar issue I've seen is when mismatching Awesomium release and debug assemblies (although it would typically throw an exception). The VS2010/.NET4 version of the project has a post-build step to copy the appropriate Awesomium files to the build folder, which should take care of most of those issues... Are you using 32- or 64-bit Windows? What's the actual Awesomium version you're using, and are you using the WebBrowser code from the Downloads page (based on Awesomium 1.6 beta B - http://wpfchromium.codeplex.com/releases/view/49484) or the Source Code tab? (based on Awesomium 1.5.1).
Aug 21, 2010 at 12:17 PM

Post-build step work normally. I use 32-bit windows, 1.6 Beta Awesomium and WebBrowser for this link. I think maybe this problem have relation with VS2010 EXPRESS - this VS version don't supports "Unmanaged Code Debug" options. This option is normally turn on in this project. U try debugging it in this version of VS?

Coordinator
Aug 21, 2010 at 6:46 PM

psychowico - I've not tried debugging with VS2010 Express, so maybe that's somehow the cause...  If you run it as a debug build (with the debugger attached) but don't set any breakpoints does it work, or does it hang at the same point?  If it's just an issue with stepping over that line, it should be possible to make the debugger always skip over it with a compiler directive...

Aug 22, 2010 at 7:37 AM

It hang always it this time. Set any breakpoint dont have meaning in this problem. U think about skip this line? But application will be dont work without it.

Aug 29, 2010 at 11:26 PM

Did you mange to solve this problem? I got similar problem, when it runs, it just hang in that code, and says System.AccessViolation Eror

Aug 30, 2010 at 7:12 AM

No, I dont have idea how fix it.

Aug 31, 2010 at 7:50 AM

I figured it out, use v90 toolset to build the Wrapper project, and it will work. Maybe you will get the 

error RC1106: invalid option: -ologo

error when building with v90, but you can following the instructions below to make it work. Hope it works! http://blog.deskangel.com/?p=369

But I still have problems with the visual designer, I cannot use the Visual Studio Visual Designer ,but I can program in code and it runs well!

Coordinator
Aug 31, 2010 at 1:23 PM

superfishkid - Thanks for posting this :)