MSVC++ 2009, Win32, Unexplained Crashing/Errors

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

tylerp9p
Just popping in
Just popping in
Posts: 15
Joined: Tue Aug 25, 2009 22:18

MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby tylerp9p » Tue Aug 25, 2009 22:27

Hello there,

I am a tad new to the CEGUI world, but have been programming C++ for quite a while. I am presently working on a game project utilizing an OpenGL-based Renderer (Leadwerks Engine).

I have been attempting to implement CEGUI, but am continuously held up by crashes that exist regardless of whether I compile in Debug, Release, or static variants thereof. Also, even when using the debug libraries, no symbols are ever loaded into the call stack, and I have to trace through disassembly and breakpoints to determine the cause.

This is the code of my class that is causing the issue:

Code: Select all

#include "CUIManager.h"

bool CUIManager::Initialize()
{
   // GUI
   try
   {
      mRenderer = new CEGUI::OpenGLRenderer(1024, 800, 600);
      mSystem = new CEGUI::System(mRenderer);

      //using CEGUI::UVector2;
      
      //glPixelStoref(0x806E, 0); // GL_UNPACK_IMAGE_HEIGHT
      //glPixelStoref(GL_PACK_ROW_LENGTH, 0);
      //glPixelStoref(GL_UNPACK_ROW_LENGTH, 0);
   
      // initialise the required dirs for the DefaultResourceProvider
      CEGUI::DefaultResourceProvider* rp = static_cast<CEGUI::DefaultResourceProvider*>
         (CEGUI::System::getSingleton().getResourceProvider());

      rp->setResourceGroupDirectory("schemes", "datafiles/schemes/");
      rp->setResourceGroupDirectory("imagesets", "datafiles/imagesets/");
      rp->setResourceGroupDirectory("fonts", "datafiles/fonts/");
      rp->setResourceGroupDirectory("layouts", "datafiles/layouts/");
      rp->setResourceGroupDirectory("looknfeels", "datafiles/looknfeel/");
      rp->setResourceGroupDirectory("lua_scripts", "datafiles/lua_scripts/");

      // Set the default resource groups to be used      
      CEGUI::Imageset::setDefaultResourceGroup("imagesets");
      CEGUI::Font::setDefaultResourceGroup("fonts");
      CEGUI::Scheme::setDefaultResourceGroup("schemes");
      CEGUI::WidgetLookManager::setDefaultResourceGroup("looknfeels");
      CEGUI::WindowManager::setDefaultResourceGroup("layouts");
      CEGUI::ScriptModule::setDefaultResourceGroup("lua_scripts");

      // load in the scheme file, which auto-loads the TaharezLook imageset
      CEGUI::SchemeManager::getSingleton().loadScheme( "TaharezLook.scheme" );

      // load in a font.  The first font loaded automatically becomes the default font.
      //if(! CEGUI::FontManager::getSingleton().isFontPresent( "Commonwealth-10" ) )
      //  CEGUI::FontManager::getSingleton().createFont( "Commonwealth-10.font" );
      
      mSystem->setDefaultFont( "Commonwealth-10" );
      mSystem->setDefaultMouseCursor( "TaharezLook", "MouseArrow" );
      mSystem->setDefaultTooltip( "TaharezLook/Tooltip" );

      mWindowManager = CEGUI::WindowManager::getSingletonPtr();
      CEGUI::Window* myRoot = mWindowManager->createWindow( "DefaultWindow", "root" );
      mSystem->setGUISheet( myRoot );

      CEGUI::FrameWindow* fWnd = (CEGUI::FrameWindow*)mWindowManager->createWindow( "TaharezLook/FrameWindow", "testWindow" );
   
      myRoot->addChildWindow( fWnd );

      // position a quarter of the way in from the top-left of parent.
      fWnd->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.25f, 0 ), CEGUI::UDim( 0.25f, 0 ) ) );

      // set size to be half the size of the parent
      fWnd->setSize( CEGUI::UVector2( CEGUI::UDim( 0.5f, 0 ), CEGUI::UDim( 0.5f, 0 ) ) );

      fWnd->setText( "Hello World!" );
   }
   catch(CEGUI::Exception & e)
   {
      printf("CEGUI Error: %s\n", e.getMessage().c_str());
      return false;
   }

   return true;
}

void CUIManager::Render()
{
   //glPixelStoref(0x806E, 0); // GL_UNPACK_IMAGE_HEIGHT
   //glPixelStoref(GL_PACK_ROW_LENGTH, 0);
   //glPixelStoref(GL_UNPACK_ROW_LENGTH, 0);
   mSystem->renderGUI();
}


I have traced the problem, via breakpoints, to occuring at/after:

Code: Select all

CEGUI::SchemeManager::getSingleton().loadScheme( "TaharezLook.scheme" );


The exception is an Access Violation Exception. My CEGUI Log, which also remains the same regardless of compile setting, is:

Code: Select all

25/08/2009 18:12:44 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
25/08/2009 18:12:44 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
25/08/2009 18:12:44 (Std)    +                          (http://www.cegui.org.uk/)                         +
25/08/2009 18:12:44 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

25/08/2009 18:12:44 (Std)    CEGUI::Logger singleton created. (003846C0)
25/08/2009 18:12:44 (Std)    ---- Begining CEGUI System initialisation ----
25/08/2009 18:12:44 (Std)    CEGUI::ImagesetManager singleton created (00385B68)
25/08/2009 18:12:44 (Std)    CEGUI::FontManager singleton created. (00385E40)
25/08/2009 18:12:44 (Std)    CEGUI::WindowFactoryManager singleton created
25/08/2009 18:12:44 (Std)    CEGUI::WindowManager singleton created (00386228)
25/08/2009 18:12:44 (Std)    CEGUI::SchemeManager singleton created. (003862A0)
25/08/2009 18:12:44 (Std)    CEGUI::MouseCursor singleton created. (00385418)
25/08/2009 18:12:44 (Std)    CEGUI::GlobalEventSet singleton created. (00385598)
25/08/2009 18:12:44 (Std)    CEGUI::WidgetLookManager singleton created. (003856E8)
25/08/2009 18:12:44 (Std)    CEGUI::WindowRendererManager singleton created (00385960)
25/08/2009 18:12:44 (Std)    WindowFactory for 'DefaultWindow' windows added. (588B75C8)
25/08/2009 18:12:44 (Std)    WindowFactory for 'DragContainer' windows added. (588B7988)
25/08/2009 18:12:44 (Std)    WindowFactory for 'ScrolledContainer' windows added. (588B70B0)
25/08/2009 18:12:44 (Std)    WindowFactory for 'ClippedContainer' windows added. (588B7848)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Checkbox' windows added. (588B7488)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/PushButton' windows added. (588B7C08)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/RadioButton' windows added. (588B7CA8)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Combobox' windows added. (588B6F68)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/ComboDropList' windows added. (588B7DE8)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Editbox' windows added. (588B6E28)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/FrameWindow' windows added. (588B72A8)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/ItemEntry' windows added. (588B7528)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Listbox' windows added. (588B7D48)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/ListHeader' windows added. (588B7F28)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (588B7008)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Menubar' windows added. (588B7E88)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/PopupMenu' windows added. (588B7348)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/MenuItem' windows added. (588B6B00)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/MultiColumnList' windows added. (588B7208)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (588B7B68)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/ProgressBar' windows added. (588B7708)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/ScrollablePane' windows added. (588B78E8)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Scrollbar' windows added. (588B6EC8)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Slider' windows added. (588B77A8)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Spinner' windows added. (588B73E8)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/TabButton' windows added. (588B7AC8)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/TabControl' windows added. (588B7168)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Thumb' windows added. (588B6CE0)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Titlebar' windows added. (588B6C40)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Tooltip' windows added. (588B6BA0)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/ItemListbox' windows added. (588B7A28)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/GroupBox' windows added. (588B6D88)
25/08/2009 18:12:44 (Std)    WindowFactory for 'CEGUI/Tree' windows added. (588B7668)
25/08/2009 18:12:44 (Std)    Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
25/08/2009 18:12:44 (Std)    CEGUI::System singleton created. (00384140)
25/08/2009 18:12:44 (Std)    ---- CEGUI System initialisation completed ----
25/08/2009 18:12:44 (Std)    ---- Version 0.6.2 ----
25/08/2009 18:12:44 (Std)    ---- Renderer module is: CEGUI::OpenGLRenderer - Official OpenGL based renderer module for CEGUI ----
25/08/2009 18:12:44 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
25/08/2009 18:12:44 (Std)    ---- Scripting module is: None ----
25/08/2009 18:12:44 (Std)    Attempting to load Scheme from file 'TaharezLook.scheme'.
25/08/2009 18:12:44 (Std)    Attempting to create an Imageset from the information specified in file 'TaharezLook.imageset'.
25/08/2009 18:12:44 (Std)    Started creation of Imageset from XML specification:
25/08/2009 18:12:44 (Std)    ---- CEGUI Imageset name: TaharezLook
25/08/2009 18:12:44 (Std)    ---- Source texture file: TaharezLook.tga in resource group: (Default)



I also found that I have to import additional libraries to even get the program to compile, that I didn't see in the example/sample projects. My final dependency list is:

Code: Select all

winmm.lib
freetype_d.lib
glu32.lib
opengl32.lib
freeglut_d.lib
pcre_d.lib
CEGUIBase_d.lib
CEGUIExpatParser_d.lib
expat_d.lib CEGUITGAImageCodec_d.lib
CEGUISILLYImageCodec_d.lib
SILLY_d.lib
CEGUIDevILImageCodec_d.lib
CEGUIFreeImageImageCodec_d.lib
CEGUICoronaImageCodec_d.lib
OpenGLGUIRenderer_d.lib
CEGUITinyXMLParser_d.lib
CEGUIXercesParser_d.lib
CEGUIFalagardWRBase_d.lib


The above is debug, and if in static mode I just define CEGUI_STATIC and swap to the "_Static" libraries.

And in Release:

Code: Select all

winmm.lib
opengl32.lib
glu32.lib
freetype.lib
pcre.lib
CEGUIBase.lib
CEGUIExpatParser.lib
expat.lib
CEGUITGAImageCodec.lib
CEGUISILLYImageCodec.lib
SILLY.lib
CEGUIDevILImageCodec.lib
CEGUIFreeImageImageCodec.lib
CEGUICoronaImageCodec.lib
OpenGLGUIRenderer.lib
CEGUIFalagardWRBase.lib


Again, I have no idea why this is occuring, I assume it could possibly be something with XML, because a few days ago in initial tests, there were 1 or 2 symbols for XML Calls, but they were fixed by linking the XML module libraries.

To note, I am using the Visual Studio 2008 Professional IDE, with MSVC++ 9.0 Compiler. I am using the 2008/9.0 binary pack for the libraries of CEGUI.

I would appreciate any help at all, as this is the only thing holding up development progress.

Many Thanks,
Tyler Harden
Last edited by tylerp9p on Tue Aug 25, 2009 23:55, edited 1 time in total.

tylerp9p
Just popping in
Just popping in
Posts: 15
Joined: Tue Aug 25, 2009 22:18

Re: Massively Unexplained Crashing, Help Needed

Postby tylerp9p » Tue Aug 25, 2009 23:27

I was able to trace the stack more closely, and found that the crash occurs after this line in CEGUISingleton.h, Line 79:

Code: Select all

        {  assert( ms_Singleton );  return ( *ms_Singleton );  }


I found that as the result of Stepping Into the line I found that led to the crash:

Code: Select all

CEGUI::SchemeManager::getSingleton().loadScheme( "TaharezLook.scheme" );


Hopefully someone can make more sense of that then me, but it seems like the SchemeManager Singleton was never created?

tylerp9p
Just popping in
Just popping in
Posts: 15
Joined: Tue Aug 25, 2009 22:18

Re: Massively Unexplained Crashing, Help Needed

Postby tylerp9p » Tue Aug 25, 2009 23:29

Even more self notes:

If I use WindowsLook instead, it doesn't crash, atleast, it doesn't crash in STATIC mode. If I compile in non-static mode, all schemes crash it.

In static with WindowsLook, it actually writes the errors out to the log:

Code: Select all

25/08/2009 19:24:37 (Std)    Attempting to load Scheme from file 'WindowsLook.scheme'.
25/08/2009 19:24:37 (Std)    Attempting to create an Imageset from the information specified in file 'WindowsLook.imageset'.
25/08/2009 19:24:37 (Std)    Started creation of Imageset from XML specification:
25/08/2009 19:24:37 (Std)    ---- CEGUI Imageset name: WindowsLook
25/08/2009 19:24:37 (Std)    ---- Source texture file: WindowsLook.tga in resource group: (Default)
25/08/2009 19:24:37 (Error)   Unable to load image, corona::OpenImage failed
25/08/2009 19:24:37 (Error)   CEGUI::RendererException in file ..\..\..\..\RendererModules\OpenGLGUIRenderer\opengltexture.cpp(103) : OpenGLTexture::loadFromFile - CoronaImageCodec - Official Corona based image codec failed to load image 'WindowsLook.tga'.
25/08/2009 19:24:37 (Error)   CEGUI::RendererException in file ..\..\..\src\CEGUIImageset_xmlHandler.cpp(124) : Imageset::xmlHandler::startElement - An unexpected error occurred while creating a Texture object from file 'WindowsLook.tga'
25/08/2009 19:24:37 (Error)   Imageset::load - loading of Imageset from file 'WindowsLook.imageset' failed.


Maybe I could set it to use something other then Corona?

tylerp9p
Just popping in
Just popping in
Posts: 15
Joined: Tue Aug 25, 2009 22:18

Re: Massively Unexplained Crashing, Help Needed

Postby tylerp9p » Tue Aug 25, 2009 23:38

I tried every other image codec with a module, and only Corona got far enough to log the errors. All of the other image codecs just lead to the same error I had before, the crash on the loadScheme line.

jheld
Just popping in
Just popping in
Posts: 18
Joined: Sun Aug 09, 2009 04:06

Re: MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby jheld » Wed Aug 26, 2009 00:19

Hi Tyler,

Could it be that it's just not finding the .scheme file? Might be a resource/path issue.

To make the cegui logger more informative

Code: Select all

CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative);

might save you some time.

Finally, I'm pretty sure you can't have two .schemes loaded at the same time, (apologies if you aren't actually doing this).

Jason

tylerp9p
Just popping in
Just popping in
Posts: 15
Joined: Tue Aug 25, 2009 22:18

Re: MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby tylerp9p » Wed Aug 26, 2009 00:51

This is the full log:

Code: Select all

25/08/2009 20:50:30 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
25/08/2009 20:50:30 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
25/08/2009 20:50:30 (Std)    +                          (http://www.cegui.org.uk/)                         +
25/08/2009 20:50:30 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

25/08/2009 20:50:30 (Std)    CEGUI::Logger singleton created. (003E37F0)
25/08/2009 20:50:30 (Std)    ---- Begining CEGUI System initialisation ----
25/08/2009 20:50:30 (Std)    CEGUI::ImagesetManager singleton created (003C8F20)
25/08/2009 20:50:30 (Std)    CEGUI::FontManager singleton created. (0109AA68)
25/08/2009 20:50:30 (Std)    CEGUI::WindowFactoryManager singleton created
25/08/2009 20:50:30 (Std)    CEGUI::WindowManager singleton created (003C1590)
25/08/2009 20:50:30 (Std)    CEGUI::SchemeManager singleton created. (01093B30)
25/08/2009 20:50:30 (Std)    CEGUI::MouseCursor singleton created. (003C67A8)
25/08/2009 20:50:30 (Std)    CEGUI::GlobalEventSet singleton created. (01099660)
25/08/2009 20:50:30 (Std)    CEGUI::WidgetLookManager singleton created. (01093B88)
25/08/2009 20:50:30 (Std)    CEGUI::WindowRendererManager singleton created (003C93E0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'DefaultWindow' windows added. (01572380)
25/08/2009 20:50:30 (Std)    WindowFactory for 'DragContainer' windows added. (01572420)
25/08/2009 20:50:30 (Std)    WindowFactory for 'ScrolledContainer' windows added. (015724C0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'ClippedContainer' windows added. (01572560)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Checkbox' windows added. (01572600)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/PushButton' windows added. (01572F60)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/RadioButton' windows added. (01573000)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Combobox' windows added. (01572740)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/ComboDropList' windows added. (015726A0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Editbox' windows added. (015727E0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/FrameWindow' windows added. (01572880)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/ItemEntry' windows added. (01572920)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Listbox' windows added. (01572B00)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/ListHeader' windows added. (015729C0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (01572A60)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Menubar' windows added. (01572C40)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/PopupMenu' windows added. (01572E20)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/MenuItem' windows added. (01572BA0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/MultiColumnList' windows added. (01572CE0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (01572D80)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/ProgressBar' windows added. (01572EC0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/ScrollablePane' windows added. (015730A0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Scrollbar' windows added. (01573140)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Slider' windows added. (015731E0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Spinner' windows added. (01573280)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/TabButton' windows added. (01573320)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/TabControl' windows added. (015733C0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Thumb' windows added. (01573460)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Titlebar' windows added. (01573500)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Tooltip' windows added. (015735A0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/ItemListbox' windows added. (01573640)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/GroupBox' windows added. (015736E0)
25/08/2009 20:50:30 (Std)    WindowFactory for 'CEGUI/Tree' windows added. (01573780)
25/08/2009 20:50:30 (Std)    Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
25/08/2009 20:50:30 (Std)    CEGUI::System singleton created. (003E33C0)
25/08/2009 20:50:30 (Std)    ---- CEGUI System initialisation completed ----
25/08/2009 20:50:30 (Std)    ---- Version 0.6.2 ----
25/08/2009 20:50:30 (Std)    ---- Renderer module is: CEGUI::OpenGLRenderer - Official OpenGL based renderer module for CEGUI ----
25/08/2009 20:50:30 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
25/08/2009 20:50:30 (Std)    ---- Scripting module is: None ----
25/08/2009 20:50:30 (Std)    Attempting to load Scheme from file 'WindowsLook.scheme'.
25/08/2009 20:50:30 (Info)    Started creation of Scheme 'WindowsLookSkin' via XML file.
25/08/2009 20:50:30 (Info)    Finished creation of Scheme 'WindowsLookSkin' via XML file.
25/08/2009 20:50:30 (Info)    Loaded GUI scheme 'WindowsLookSkin' from data in file 'WindowsLook.scheme'. (003E7E00)
25/08/2009 20:50:30 (Info)    ---- Begining resource loading for GUI scheme 'WindowsLookSkin' ----
25/08/2009 20:50:30 (Std)    Attempting to create an Imageset from the information specified in file 'WindowsLook.imageset'.
25/08/2009 20:50:30 (Std)    Started creation of Imageset from XML specification:
25/08/2009 20:50:30 (Std)    ---- CEGUI Imageset name: WindowsLook
25/08/2009 20:50:30 (Std)    ---- Source texture file: WindowsLook.tga in resource group: (Default)
25/08/2009 20:50:30 (Error)   Unable to load image, corona::OpenImage failed
25/08/2009 20:50:30 (Error)   CEGUI::RendererException in file ..\..\..\..\RendererModules\OpenGLGUIRenderer\opengltexture.cpp(103) : OpenGLTexture::loadFromFile - CoronaImageCodec - Official Corona based image codec failed to load image 'WindowsLook.tga'.
25/08/2009 20:50:30 (Error)   CEGUI::RendererException in file ..\..\..\src\CEGUIImageset_xmlHandler.cpp(124) : Imageset::xmlHandler::startElement - An unexpected error occurred while creating a Texture object from file 'WindowsLook.tga'
25/08/2009 20:50:30 (Error)   Imageset::load - loading of Imageset from file 'WindowsLook.imageset' failed.



It clearly seems to be able to load the .scheme fine, it is the TGA Texture that is failing.

tylerp9p
Just popping in
Just popping in
Posts: 15
Joined: Tue Aug 25, 2009 22:18

Re: MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby tylerp9p » Wed Aug 26, 2009 01:08

Not sure what changed now, but I switched over to including libs according to how Demo 7 is doing it, and the log is now a bit different, and I am back to crashing on the line of CEGUI::System::getSingleton.loadScheme("WindowsLook.scheme")

Code: Select all

25/08/2009 21:07:04 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
25/08/2009 21:07:04 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
25/08/2009 21:07:04 (Std)    +                          (http://www.cegui.org.uk/)                         +
25/08/2009 21:07:04 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

25/08/2009 21:07:04 (Std)    CEGUI::Logger singleton created. (00C569D0)
25/08/2009 21:07:04 (Std)    ---- Begining CEGUI System initialisation ----
25/08/2009 21:07:04 (Std)    CEGUI::ImagesetManager singleton created (00D7FF70)
25/08/2009 21:07:04 (Std)    CEGUI::FontManager singleton created. (00D77FD8)
25/08/2009 21:07:04 (Std)    CEGUI::WindowFactoryManager singleton created
25/08/2009 21:07:04 (Std)    CEGUI::WindowManager singleton created (00C3BD88)
25/08/2009 21:07:04 (Std)    CEGUI::SchemeManager singleton created. (00C356F8)
25/08/2009 21:07:04 (Std)    CEGUI::MouseCursor singleton created. (00C35280)
25/08/2009 21:07:04 (Std)    CEGUI::GlobalEventSet singleton created. (00C573F8)
25/08/2009 21:07:04 (Std)    CEGUI::WidgetLookManager singleton created. (00C35750)
25/08/2009 21:07:04 (Std)    CEGUI::WindowRendererManager singleton created (00D74CD8)
25/08/2009 21:07:04 (Std)    WindowFactory for 'DefaultWindow' windows added. (016C66D0)
25/08/2009 21:07:04 (Std)    WindowFactory for 'DragContainer' windows added. (016C6A90)
25/08/2009 21:07:04 (Std)    WindowFactory for 'ScrolledContainer' windows added. (016C61B8)
25/08/2009 21:07:04 (Std)    WindowFactory for 'ClippedContainer' windows added. (016C6950)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Checkbox' windows added. (016C6590)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/PushButton' windows added. (016C6D10)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/RadioButton' windows added. (016C6DB0)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Combobox' windows added. (016C6070)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/ComboDropList' windows added. (016C6EF0)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Editbox' windows added. (016C5F30)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/FrameWindow' windows added. (016C63B0)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/ItemEntry' windows added. (016C6630)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Listbox' windows added. (016C6E50)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/ListHeader' windows added. (016C7030)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (016C6110)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Menubar' windows added. (016C6F90)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/PopupMenu' windows added. (016C6450)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/MenuItem' windows added. (016C5C08)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/MultiColumnList' windows added. (016C6310)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (016C6C70)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/ProgressBar' windows added. (016C6810)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/ScrollablePane' windows added. (016C69F0)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Scrollbar' windows added. (016C5FD0)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Slider' windows added. (016C68B0)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Spinner' windows added. (016C64F0)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/TabButton' windows added. (016C6BD0)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/TabControl' windows added. (016C6270)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Thumb' windows added. (016C5DE8)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Titlebar' windows added. (016C5D48)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Tooltip' windows added. (016C5CA8)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/ItemListbox' windows added. (016C6B30)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/GroupBox' windows added. (016C5E90)
25/08/2009 21:07:04 (Std)    WindowFactory for 'CEGUI/Tree' windows added. (016C6770)
25/08/2009 21:07:04 (Std)    Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
25/08/2009 21:07:04 (Std)    CEGUI::System singleton created. (00C56438)
25/08/2009 21:07:04 (Std)    ---- CEGUI System initialisation completed ----
25/08/2009 21:07:04 (Std)    ---- Version 0.6.2 ----
25/08/2009 21:07:04 (Std)    ---- Renderer module is: CEGUI::OpenGLRenderer - Official OpenGL based renderer module for CEGUI ----
25/08/2009 21:07:04 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
25/08/2009 21:07:04 (Std)    ---- Scripting module is: None ----
25/08/2009 21:07:10 (Std)    Attempting to load Scheme from file 'WindowsLook.scheme'.
25/08/2009 21:07:10 (Info)    Started creation of Scheme 'WindowsLookSkin' via XML file.
25/08/2009 21:07:10 (Info)    Finished creation of Scheme 'WindowsLookSkin' via XML file.
25/08/2009 21:07:10 (Info)    Loaded GUI scheme 'WindowsLookSkin' from data in file 'WindowsLook.scheme'. (00C5B818)
25/08/2009 21:07:10 (Info)    ---- Begining resource loading for GUI scheme 'WindowsLookSkin' ----
25/08/2009 21:07:10 (Std)    Attempting to create an Imageset from the information specified in file 'WindowsLook.imageset'.
25/08/2009 21:07:10 (Std)    Started creation of Imageset from XML specification:
25/08/2009 21:07:10 (Std)    ---- CEGUI Imageset name: WindowsLook
25/08/2009 21:07:10 (Std)    ---- Source texture file: WindowsLook.tga in resource group: (Default)
25/08/2009 21:07:10 (Info)    TGAImageCodec::load()


User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby CrazyEddie » Wed Aug 26, 2009 08:50

Ok. The first thing I can say is that you should not link against all the image codec libs - just link against the one you're actually intending to use. I know our samples link against all of them but it's an error.

The TGA only codec is not much use since some of the files we use now are png files :)
The Corona library has issues loading some TGA files (based upon my previous tests, and as seen in your reports above).
The SILLY, FreeImage or DevIL libraries should all work fine, though - to reiterate - just pick one and only link with that, not the others also.

I think the one bit of info you didn't post was a debug callstack/backtrace (though I think with the SDKs there's no symbols? Is that right?!), I'm fairly certain that it's dying when loading the image files for the Imageset(s) in the scheme - cleanup the linking, use one of the three 'good' libraries mentioned, and let us know if you still get issues.

CE.

tylerp9p
Just popping in
Just popping in
Posts: 15
Joined: Tue Aug 25, 2009 22:18

Re: MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby tylerp9p » Wed Aug 26, 2009 10:25

Still having the same problem.

This is my new code:

Code: Select all

/******************************************
Game: Jeklynn Heights
Author: Tyler H
This source file is part of Jeklynn Heights
Copyright (C) 2009 - Vex Studios
******************************************/

#include "CUIManager.h"

bool CUIManager::Initialize()
{
   // GUI
   try
   {
      mRenderer = new CEGUI::OpenGLRenderer(1024, 800, 600, new CEGUI::SILLYImageCodec());
      mSystem = new CEGUI::System(mRenderer);

      CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative);

      //using CEGUI::UVector2;
      
      //glPixelStoref(0x806E, 0); // GL_UNPACK_IMAGE_HEIGHT
      //glPixelStoref(GL_PACK_ROW_LENGTH, 0);
      //glPixelStoref(GL_UNPACK_ROW_LENGTH, 0);

      // Set the default resource groups to be used      
      CEGUI::Imageset::setDefaultResourceGroup("imagesets");
      CEGUI::Font::setDefaultResourceGroup("fonts");
      CEGUI::Scheme::setDefaultResourceGroup("schemes");
      CEGUI::WidgetLookManager::setDefaultResourceGroup("looknfeels");
      CEGUI::WindowManager::setDefaultResourceGroup("layouts");
      CEGUI::ScriptModule::setDefaultResourceGroup("lua_scripts");
   
      // initialise the required dirs for the DefaultResourceProvider
      CEGUI::DefaultResourceProvider* rp = static_cast<CEGUI::DefaultResourceProvider*>
         (CEGUI::System::getSingleton().getResourceProvider());

      rp->setResourceGroupDirectory("schemes", "datafiles/schemes/");
      rp->setResourceGroupDirectory("imagesets", "datafiles/imagesets/");
      rp->setResourceGroupDirectory("fonts", "datafiles/fonts/");
      rp->setResourceGroupDirectory("layouts", "datafiles/layouts/");
      rp->setResourceGroupDirectory("looknfeels", "datafiles/looknfeel/");
      rp->setResourceGroupDirectory("lua_scripts", "datafiles/lua_scripts/");
      
      // load in the scheme file, which auto-loads the TaharezLook imageset
      CEGUI::SchemeManager::getSingleton().loadScheme( "WindowsLook.scheme" );

      // load in a font.  The first font loaded automatically becomes the default font.
      if(! CEGUI::FontManager::getSingleton().isFontPresent( "Commonwealth-10" ) )
        CEGUI::FontManager::getSingleton().createFont( "Commonwealth-10.font" );
      
      //CEGUI::ImagesetManager::getSingleton().createImageset("WindowsLook.imageset");

      mSystem->setDefaultFont( "Commonwealth-10" );
      mSystem->setDefaultMouseCursor( "WindowsLook", "MouseArrow" );
      mSystem->setDefaultTooltip( "WindowsLook/Tooltip" );

      mWindowManager = CEGUI::WindowManager::getSingletonPtr();
      CEGUI::Window* myRoot = mWindowManager->createWindow( "DefaultWindow", "root" );
      mSystem->setGUISheet( myRoot );

      CEGUI::FrameWindow* fWnd = (CEGUI::FrameWindow*)mWindowManager->createWindow( "WindowsLook/FrameWindow", "testWindow" );
   
      myRoot->addChildWindow( fWnd );

      // position a quarter of the way in from the top-left of parent.
      fWnd->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.25f, 0 ), CEGUI::UDim( 0.25f, 0 ) ) );

      // set size to be half the size of the parent
      fWnd->setSize( CEGUI::UVector2( CEGUI::UDim( 0.5f, 0 ), CEGUI::UDim( 0.5f, 0 ) ) );

      fWnd->setText( "Hello World!" );
   }
   catch(CEGUI::Exception & e)
   {
      printf("CEGUI Error: %s\n", e.getMessage().c_str());
      return false;
   }

   return true;
}

void CUIManager::Render()
{
   //glPixelStoref(0x806E, 0); // GL_UNPACK_IMAGE_HEIGHT
   //glPixelStoref(GL_PACK_ROW_LENGTH, 0);
   //glPixelStoref(GL_UNPACK_ROW_LENGTH, 0);
   mSystem->renderGUI();
}


My Custom CEGUILibrary.h header:

Code: Select all

/******************************************
Game: Jeklynn Heights
Author: Tyler H
This source file is part of Jeklynn Heights
Copyright (C) 2009 - Vex Studios
******************************************/

#define CEGUI_STATIC
#define TOLUA_STATIC
#define STATIC

// ==================================================
// LIBRARIES
// ==================================================

// Non-Static
#pragma comment( lib, "opengl32.lib" )      // OpenGL
#pragma comment( lib, "glu32.lib" )         // OpenGL Utilities
#pragma comment( lib, "winmm.lib" )         // Windows Multimedia API

// CEGUI Dependancies

#ifdef _DEBUG_

   //#pragma comment( lib, "corona_d.lib" )
   #pragma comment( lib, "pcre_d.lib" )
   #pragma comment( lib, "expat_d.lib" )         // CEGUIExpatParser_Static
   //#pragma comment( lib, "FreeImage_d.lib" )      // CEGUIFreeImageImageCodec_Static
   #pragma comment( lib, "freetype_d.lib" )
   #pragma comment( lib, "SILLY_d.lib" )         // CEGUISILLYImageCodec_Static

#else

   //#pragma comment( lib, "corona.lib" )
   #pragma comment( lib, "pcre.lib" )
   #pragma comment( lib, "expat.lib" )         // CEGUIExpatParser_Static
   //#pragma comment( lib, "FreeImage.lib" )      // CEGUIFreeImageImageCodec_Static
   #pragma comment( lib, "freetype.lib" )
   #pragma comment( lib, "SILLY.lib" )         // CEGUISILLYImageCodec_Static

#endif

//#pragma comment( lib, "DevIL.lib" )
//#pragma comment( lib, "ILU.lib" )
//#pragma comment( lib, "ILUT.lib" )

#ifdef _DEBUG_

   #ifdef STATIC

      #pragma comment( lib, "CEGUIBase_Static_d.lib" )
      //#pragma comment( lib, "CEGUICoronaImageCodec_Static_d.lib" )
      //#pragma comment( lib, "CEGUIDevILImageCodec_Static_d.lib" )
      #pragma comment( lib, "CEGUIExpatParser_Static_d.lib" )
      #pragma comment( lib, "CEGUIFalagardWRBase_Static_d.lib" )
      //#pragma comment( lib, "CEGUIFreeImageImageCodec_Static_d.lib" )
      #pragma comment( lib, "CEGUISILLYImageCodec_Static_d.lib")
      //#pragma comment( lib, "CEGUITGAImageCodec_Static_d.lib" )
      //#pragma comment( lib, "CEGUITinyXMLParser_Static_d.lib" )
      //#pragma comment( lib, "CEGUIXercesParser_Static_d.lib" )
      #pragma comment( lib, "OpenGLGUIRenderer_Static_d.lib" )


   #else

      #pragma comment( lib, "CEGUIBase_d.lib" )
      //#pragma comment( lib, "CEGUICoronaImageCodec_d.lib" )
      //#pragma comment( lib, "CEGUIDevILImageCodec_d.lib" )
      #pragma comment( lib, "CEGUIExpatParser_d.lib" )
      #pragma comment( lib, "CEGUIFalagardWRBase_d.lib" )
      //#pragma comment( lib, "CEGUIFreeImageImageCodec_d.lib" )
      #pragma comment( lib, "CEGUISILLYImageCodec_d.lib")
      //#pragma comment( lib, "CEGUITGAImageCodec_d.lib" )
      //#pragma comment( lib, "CEGUITinyXMLParser_d.lib" )
      //#pragma comment( lib, "CEGUIXercesParser_d.lib" )
      #pragma comment( lib, "OpenGLGUIRenderer_d.lib" )

   #endif

#else

   #ifdef CEGUI_STATIC

      #pragma comment( lib, "CEGUIBase_Static.lib" )
      //#pragma comment( lib, "CEGUICoronaImageCodec_Static.lib" )
      //#pragma comment( lib, "CEGUIDevILImageCodec_Static.lib" )
      #pragma comment( lib, "CEGUIExpatParser_Static.lib" )
      #pragma comment( lib, "CEGUIFalagardWRBase_Static.lib" )
      //#pragma comment( lib, "CEGUIFreeImageImageCodec_Static.lib" )
      #pragma comment( lib, "CEGUISILLYImageCodec_Static.lib")
      //#pragma comment( lib, "CEGUITGAImageCodec_Static.lib" )
      //#pragma comment( lib, "CEGUITinyXMLParser_Static.lib" )
      //#pragma comment( lib, "CEGUIXercesParser_Static.lib" )
      #pragma comment( lib, "OpenGLGUIRenderer_Static.lib" )

   #else

      #pragma comment( lib, "CEGUIBase.lib" )
      //#pragma comment( lib, "CEGUICoronaImageCodec.lib" )
      //#pragma comment( lib, "CEGUIDevILImageCodec.lib" )
      #pragma comment( lib, "CEGUIExpatParser.lib" )
      #pragma comment( lib, "CEGUIFalagardWRBase.lib" )
      //#pragma comment( lib, "CEGUIFreeImageImageCodec.lib" )
      #pragma comment( lib, "CEGUISILLYImageCodec.lib")
      //#pragma comment( lib, "CEGUITGAImageCodec.lib" )
      //#pragma comment( lib, "CEGUITinyXMLParser.lib" )
      //#pragma comment( lib, "CEGUIXercesParser.lib" )
      #pragma comment( lib, "OpenGLGUIRenderer.lib" )

   #endif

#endif*/

// ==================================================
// INCLUDES
// ==================================================

#pragma warning( push )

   #pragma warning( disable: 4251 )

   // Windows
   #include <windows.h>
   #include <math.h>
   #include <time.h>

   // CEGUI
   #include "CEGUI.h"
   #include "..\RendererModules\OpenGLGUIRenderer\OpenGLRenderer.h"
   #include "..\ImageCodecModules\SILLYImageCodec\CEGUISILLYImageCodecModule.h"
   #include "CEGUIDefaultResourceProvider.h"

#pragma warning( pop )


And CEGUI.log:

Code: Select all

26/08/2009 06:22:56 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
26/08/2009 06:22:56 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
26/08/2009 06:22:56 (Std)    +                          (http://www.cegui.org.uk/)                         +
26/08/2009 06:22:56 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

26/08/2009 06:22:56 (Std)    CEGUI::Logger singleton created. (00C669E8)
26/08/2009 06:22:56 (Std)    ---- Begining CEGUI System initialisation ----
26/08/2009 06:22:56 (Std)    CEGUI::ImagesetManager singleton created (0011DC58)
26/08/2009 06:22:56 (Std)    CEGUI::FontManager singleton created. (0011DCB0)
26/08/2009 06:22:56 (Std)    CEGUI::WindowFactoryManager singleton created
26/08/2009 06:22:56 (Std)    CEGUI::WindowManager singleton created (00C45520)
26/08/2009 06:22:56 (Std)    CEGUI::SchemeManager singleton created. (00C4B8F0)
26/08/2009 06:22:56 (Std)    CEGUI::MouseCursor singleton created. (00C4BDC8)
26/08/2009 06:22:56 (Std)    CEGUI::GlobalEventSet singleton created. (00C67410)
26/08/2009 06:22:56 (Std)    CEGUI::WidgetLookManager singleton created. (00C4B948)
26/08/2009 06:22:56 (Std)    CEGUI::WindowRendererManager singleton created (0011F198)
26/08/2009 06:22:56 (Std)    WindowFactory for 'DefaultWindow' windows added. (009566F0)
26/08/2009 06:22:56 (Std)    WindowFactory for 'DragContainer' windows added. (00956AB0)
26/08/2009 06:22:56 (Std)    WindowFactory for 'ScrolledContainer' windows added. (009561D8)
26/08/2009 06:22:56 (Std)    WindowFactory for 'ClippedContainer' windows added. (00956970)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Checkbox' windows added. (009565B0)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/PushButton' windows added. (00956D30)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/RadioButton' windows added. (00956DD0)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Combobox' windows added. (00956090)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/ComboDropList' windows added. (00956F10)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Editbox' windows added. (00955F50)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/FrameWindow' windows added. (009563D0)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/ItemEntry' windows added. (00956650)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Listbox' windows added. (00956E70)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/ListHeader' windows added. (00957050)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (00956130)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Menubar' windows added. (00956FB0)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/PopupMenu' windows added. (00956470)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/MenuItem' windows added. (00955C28)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/MultiColumnList' windows added. (00956330)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (00956C90)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/ProgressBar' windows added. (00956830)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/ScrollablePane' windows added. (00956A10)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Scrollbar' windows added. (00955FF0)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Slider' windows added. (009568D0)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Spinner' windows added. (00956510)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/TabButton' windows added. (00956BF0)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/TabControl' windows added. (00956290)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Thumb' windows added. (00955E08)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Titlebar' windows added. (00955D68)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Tooltip' windows added. (00955CC8)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/ItemListbox' windows added. (00956B50)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/GroupBox' windows added. (00955EB0)
26/08/2009 06:22:56 (Std)    WindowFactory for 'CEGUI/Tree' windows added. (00956790)
26/08/2009 06:22:56 (Std)    Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
26/08/2009 06:22:56 (Std)    CEGUI::System singleton created. (00C66370)
26/08/2009 06:22:56 (Std)    ---- CEGUI System initialisation completed ----
26/08/2009 06:22:56 (Std)    ---- Version 0.6.2 ----
26/08/2009 06:22:56 (Std)    ---- Renderer module is: CEGUI::OpenGLRenderer - Official OpenGL based renderer module for CEGUI ----
26/08/2009 06:22:56 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
26/08/2009 06:22:56 (Std)    ---- Scripting module is: None ----
26/08/2009 06:22:56 (Std)    Attempting to load Scheme from file 'WindowsLook.scheme'.
26/08/2009 06:22:56 (Info)    Started creation of Scheme 'WindowsLookSkin' via XML file.
26/08/2009 06:22:56 (Info)    Finished creation of Scheme 'WindowsLookSkin' via XML file.
26/08/2009 06:22:56 (Info)    Loaded GUI scheme 'WindowsLookSkin' from data in file 'WindowsLook.scheme'. (00C6B830)
26/08/2009 06:22:56 (Info)    ---- Begining resource loading for GUI scheme 'WindowsLookSkin' ----
26/08/2009 06:22:56 (Std)    Attempting to create an Imageset from the information specified in file 'WindowsLook.imageset'.
26/08/2009 06:22:56 (Std)    Started creation of Imageset from XML specification:
26/08/2009 06:22:56 (Std)    ---- CEGUI Imageset name: WindowsLook
26/08/2009 06:22:56 (Std)    ---- Source texture file: WindowsLook.tga in resource group: (Default)



Also, you would be correct about the lack of symbols in the SDK. A bit of a pain actually.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby CrazyEddie » Wed Aug 26, 2009 11:52

Thanks for reporting back.

I have run a test using the vc9 SDK and your code (just added some stuff that uses glut to initialise the app window and GL context). I can report that the app (and therefore your linked libs etc) ran fine.

So, a couple of questions:
1) Have you already initialised the OpenGL context in some way (such as via glut, via some other library or directly with Win32 APIs)? This is essential; CEGUI can not do this for you.
2) In your header there you're testing the macro '_DEBUG_' is this defined in your project for the debug build? I ask because for Win32 the usual macro checked is '_DEBUG'.

CE

tylerp9p
Just popping in
Just popping in
Posts: 15
Joined: Tue Aug 25, 2009 22:18

Re: MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby tylerp9p » Wed Aug 26, 2009 19:51

Yes, the macros are defined in the preprocessor section of the project compiler settings per configuration.

OpenGL is indeed initialized properly. No problems occur due to the renderer, and I can actually load imagesets, fonts, etc. But when it needs to load an actual texture, it seems to crash.

tylerp9p
Just popping in
Just popping in
Posts: 15
Joined: Tue Aug 25, 2009 22:18

Re: MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby tylerp9p » Thu Aug 27, 2009 00:09

Quick question CE:

In your app, what were the project settings, etc. I am thinking I may just try and compile the CEGUI source directly into the game.

tylerp9p
Just popping in
Just popping in
Posts: 15
Joined: Tue Aug 25, 2009 22:18

Re: MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby tylerp9p » Thu Aug 27, 2009 01:09

Integrating the source was a stupid mistake and completely ridiculous to attempt. I simply compiled CEGUI from source on VS 2008 to make sure everything was right, and I still get the same exact errors. Using Expat, OpenGL, and SILLY.

And even in debug mode there are no symbols...why is that?

tylerp9p
Just popping in
Just popping in
Posts: 15
Joined: Tue Aug 25, 2009 22:18

Re: MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby tylerp9p » Thu Aug 27, 2009 01:33

I stack traced this entire thing manually with breakpoints, until I could no longer step into functions farther.

Ultimately, it crashes on a call to XML_Parse, when parsing the WindowsLook.imageset file. Line 69 of Expat's CPP file.

Call Stack:

Code: Select all

>   Jeklynn Heights.exe!CEGUI::ExpatParser::parseXMLFile(CEGUI::XMLHandler & handler={...}, const CEGUI::String & filename={...}, const CEGUI::String & schemaName={...}, const CEGUI::String & resourceGroup={...})  Line 69   C++
    Jeklynn Heights.exe!CEGUI::Imageset::load(const CEGUI::String & filename={...}, const CEGUI::String & resourceGroup={...})  Line 157 + 0xa7 bytes   C++
    Jeklynn Heights.exe!CEGUI::Imageset::Imageset(const CEGUI::String & filename={...}, const CEGUI::String & resourceGroup={...})  Line 84   C++
    Jeklynn Heights.exe!CEGUI::ImagesetManager::createImageset(const CEGUI::String & filename={...}, const CEGUI::String & resourceGroup={...})  Line 100 + 0x36 bytes   C++
    Jeklynn Heights.exe!CEGUI::Scheme::loadXMLImagesets()  Line 188 + 0x24 bytes   C++
    Jeklynn Heights.exe!CEGUI::Scheme::loadResources()  Line 119   C++
    Jeklynn Heights.exe!CEGUI::Scheme::Scheme(const CEGUI::String & filename={...}, const CEGUI::String & resourceGroup={...})  Line 93   C++
    Jeklynn Heights.exe!CEGUI::SchemeManager::loadScheme(const CEGUI::String & scheme_filename={...}, const CEGUI::String & resourceGroup={...})  Line 81 + 0x36 bytes   C++
    Jeklynn Heights.exe!CUIManager::Initialize()  Line 46 + 0x58 bytes   C++
    Jeklynn Heights.exe!CGame::Setup()  Line 92   C++
    Jeklynn Heights.exe!WinMain(HINSTANCE__ * hInstance=0x00b30000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00745af0, int __formal=1)  Line 29 + 0x8 bytes   C++
    Jeklynn Heights.exe!__tmainCRTStartup()  Line 574 + 0x35 bytes   C
    Jeklynn Heights.exe!WinMainCRTStartup()  Line 399   C
    kernel32.dll!7615e4a5()    
    [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]   
    ntdll.dll!77a4cfed()    
    ntdll.dll!77a4d1ff()    


User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: MSVC++ 2009, Win32, Unexplained Crashing/Errors

Postby CrazyEddie » Thu Aug 27, 2009 09:46

It will almost certainly be dying in the image loading part of imageset loading. If you want to go 'deeper' still in the debugger set breakpoints in the CEGUIImageset_xmlHander.cpp file, this way you can break into the actual xml parsing process.

It definitely 'feels' like a project configuration issue. What kind of project settings do you have? Which runtime are you linking against? Have you customised any other settings at all in your project?

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 5 guests