MFC Ribbon crashes in windows 2008-Collection of common programming errors

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->LoadFromResource(IDR_RIBBON1); //IDR_RIBBON1 is the resource id.

The stack trace is below

gui.exe!ATL::CComPtrBase::~CComPtrBase()  Line 162 + 0xa bytes    C++
gui.exe!ATL::CComPtr::~CComPtr()  + 0x11 bytes    C++
gui.exe!ATL::CComQIPtr::~CComQIPtr()  + 0x11 bytes    C++
gui.exe!ATL::CXMLNode::~CXMLNode()  Line 47 + 0xb bytes   C++
gui.exe!ATL::CXMLDocument::~CXMLDocument()  Line 269 + 0x13 bytes   C++
gui.exe!CXMLParserRoot::~CXMLParserRoot()  Line 423 + 0x43 bytes    C++
gui.exe!CMFCRibbonInfo::Read(unsigned char * lpBuffer=0x013acb14, unsigned int nSize=83851)  Line 703 + 0x15 bytes  C++
gui.exe!CMFCRibbonInfoLoader::LoadFromBuffer(unsigned char * lpBuffer=0x013acb14, unsigned int nSize=83851)  Line 112 + 0x1b bytes  C++
gui.exe!CMFCRibbonInfoLoader::Load(const char * lpszResID=0x000005d8, const char * lpszResType=0x0000001c, HINSTANCE__ * hInstance=0x00400000)  Line 85 + 0x1c bytes    C++
gui.exe!CMFCRibbonBar::LoadFromResource(const char * lpszXMLResID=0x000005d8, const char * lpszResType=0x0000001c, HINSTANCE__ * hInstance=0x00000000)  Line 740 + 0x17 bytes   C++
gui.exe!CMFCRibbonBar::LoadFromResource(unsigned int uiXMLResID=1496, const char * lpszResType=0x0000001c, HINSTANCE__ * hInstance=0x00000000)  Line 731    C++

Any suggestions, advice as to how to go about this issue is greatly appreciated. Do, ask if you need more information.