{"id":4554,"date":"2014-03-30T13:31:22","date_gmt":"2014-03-30T13:31:22","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/mfc-ribbon-crashes-in-windows-2008-collection-of-common-programming-errors\/"},"modified":"2014-03-30T13:31:22","modified_gmt":"2014-03-30T13:31:22","slug":"mfc-ribbon-crashes-in-windows-2008-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/mfc-ribbon-crashes-in-windows-2008-collection-of-common-programming-errors\/","title":{"rendered":"MFC Ribbon crashes in windows 2008-Collection of common programming errors"},"content":{"rendered":"<p>I have an application that uses the MFC Ribbon. It is developed in Visual Studio 2010. I am facing a strange issue. The app works fine in Windows 7 and windows 2008 R2. However it crashes in windows 2008 when it tries to load the ribbon from resource. The exact line is<\/p>\n<blockquote>\n<p>ribbonBar-&gt;LoadFromResource(IDR_RIBBON1); \/\/IDR_RIBBON1 is the resource id.<\/p>\n<\/blockquote>\n<p>The stack trace is below<\/p>\n<pre><code>gui.exe!ATL::CComPtrBase::~CComPtrBase()  Line 162 + 0xa bytes    C++\ngui.exe!ATL::CComPtr::~CComPtr()  + 0x11 bytes    C++\ngui.exe!ATL::CComQIPtr::~CComQIPtr()  + 0x11 bytes    C++\ngui.exe!ATL::CXMLNode::~CXMLNode()  Line 47 + 0xb bytes   C++\ngui.exe!ATL::CXMLDocument::~CXMLDocument()  Line 269 + 0x13 bytes   C++\ngui.exe!CXMLParserRoot::~CXMLParserRoot()  Line 423 + 0x43 bytes    C++\ngui.exe!CMFCRibbonInfo::Read(unsigned char * lpBuffer=0x013acb14, unsigned int nSize=83851)  Line 703 + 0x15 bytes  C++\ngui.exe!CMFCRibbonInfoLoader::LoadFromBuffer(unsigned char * lpBuffer=0x013acb14, unsigned int nSize=83851)  Line 112 + 0x1b bytes  C++\ngui.exe!CMFCRibbonInfoLoader::Load(const char * lpszResID=0x000005d8, const char * lpszResType=0x0000001c, HINSTANCE__ * hInstance=0x00400000)  Line 85 + 0x1c bytes    C++\ngui.exe!CMFCRibbonBar::LoadFromResource(const char * lpszXMLResID=0x000005d8, const char * lpszResType=0x0000001c, HINSTANCE__ * hInstance=0x00000000)  Line 740 + 0x17 bytes   C++\ngui.exe!CMFCRibbonBar::LoadFromResource(unsigned int uiXMLResID=1496, const char * lpszResType=0x0000001c, HINSTANCE__ * hInstance=0x00000000)  Line 731    C++\n<\/code><\/pre>\n<p>Any suggestions, advice as to how to go about this issue is greatly appreciated. Do, ask if you need more information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have an application that uses the MFC Ribbon. It is developed in Visual Studio 2010. I am facing a strange issue. The app works fine in Windows 7 and windows 2008 R2. However it crashes in windows 2008 when it tries to load the ribbon from resource. The exact line is ribbonBar-&gt;LoadFromResource(IDR_RIBBON1); \/\/IDR_RIBBON1 is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4554","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4554"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4554\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}