RunTime Check Failure #0 when going /MDd

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

RunTime Check Failure #0 when going /MDd

Postby Stephan » Fri Jan 21, 2011 10:26 pm

I changed the cefclient2008 project to be Multi-threaded Debug DLL and then followed all the instructions to rebuild the libcef_dll_wrapper.lib and the project builds without any link errors.

However when I run the code I get the follow exception:

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.
This is usually a result of calling a function declared with one calling convention with a function pointer
declared with a different calling convention.

This happens in hander_cpptoc.cc in handler_handle_load_start right at the end when it tries to exit.....

Anybody have any ideas where I might have gone wrong?

I do notice that CEF_CALLBACK is defined as __stdcall and that libcef_dll_wrapper is built with __cdecl (/Gd) as is cefclient, could that have anything to do with it?

enum cef_retval_t CEF_CALLBACK handler_handle_load_start(
struct _cef_handler_t* self, cef_browser_t* browser, cef_frame_t* frame,
int isMainContent)
{
DCHECK(self);
DCHECK(browser);
if(!self || !browser)
return RV_CONTINUE;

CefRefPtr<CefFrame> framePtr;
if(frame)
framePtr = CefFrameCToCpp::Wrap(frame);

return CefHandlerCppToC::Get(self)->HandleLoadStart(
CefBrowserCToCpp::Wrap(browser), framePtr, isMainContent?true:false);
} <----------------- Error happens here
Stephan
Newbie
 
Posts: 2
Joined: Fri Jan 21, 2011 10:09 pm

Re: RunTime Check Failure #0 when going /MDd

Postby magreenblatt » Mon Jan 24, 2011 11:18 am

Anybody have any ideas where I might have gone wrong?

You need to build everything using the same revision of CEF and Chromium. The current binary release is revision 158 and the HandleLoadStart method change causing you problems was implemented in revision 162. See the CHROMIUM_BUILD_COMPATIBILITY.txt file for more information.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: RunTime Check Failure #0 when going /MDd

Postby Stephan » Tue Jan 25, 2011 5:24 pm

That did the trick, things are working, Thanks!
Stephan
Newbie
 
Posts: 2
Joined: Fri Jan 21, 2011 10:09 pm


Return to Support Forum

Who is online

Users browsing this forum: Majestic-12 [Bot] and 33 guests