ogre1.7 and cegui0.7.1 debug problem

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

haibo19981984
Just popping in
Just popping in
Posts: 10
Joined: Wed May 06, 2009 06:37

ogre1.7 and cegui0.7.1 debug problem

Postby haibo19981984 » Sat Apr 24, 2010 11:07

I build a project which use cegui in ogre.
Before the ogre window starts,I set a breakpoint.
However,it occasions an error when I continue to run the project after arrive to the breakpoint.
Just as follows.
Anybody can solve it.

Code: Select all

the place of error:
void OgreRenderer::initialiseRenderStateSettings()
{
   using namespace Ogre;
   // initialise render settings
   d_renderSystem->setLightingEngEnabled(false);
   d_renderSystem->_setDepthBufferParams(false,false);
   d_renderSystem->_setDepthBias(0,0);
   d_renderSystem->_setCullingMode(CULL_NONE); // error pop
   .......
}
error pop:
CEGUI_ExControl.exe ...0x0237f366(RenderSystem_Direct3D9_d.dll)...

haibo19981984
Just popping in
Just popping in
Posts: 10
Joined: Wed May 06, 2009 06:37

Re: ogre1.7 and cegui0.7.1 debug problem

Postby haibo19981984 » Mon Apr 26, 2010 07:03

I spend 2 days to test the problem.
I find the problem will be occasioned in 2 cases:
1.make a breakpoint before "m_pOgreRoot->startRendering();",then continue to run the application.
2.don't make a breakpoint,just after press button "OK" in OGRE Engine Rendering Setupuse window,use "alt+tab" to open another window.
(I set Sleep(5000) before "m_pOgreRoot->startRendering();" for this case)

my code:
GameApplication.h

Code: Select all

#ifndef _GAME_APPLICATION_H
#define _GAME_APPLICATION_H

#include "CEGUI.h"
#include "RendererModules/Ogre/CEGUIOgreRenderer.h"
#include <Ogre.h>
#include <OIS/OIS.h>

class GameFrameListener;

class GameApplication
{
public:
    //! Constructor.
    GameApplication();

    //! Destructor.
    ~GameApplication();
   
   bool Execute();
protected:
    const char* getDataPathPrefix() const;
    Ogre::Root* m_pOgreRoot;
    Ogre::Camera* m_pCamera;
    Ogre::RenderWindow* m_pWindow;
    bool m_bInitialised;

   CEGUI::Renderer* m_pRenderer;
   CEGUI::ImageCodec* m_pImageCodec;
   CEGUI::ResourceProvider* m_pResourceProvider;
   //CEGUI::GeometryBuffer* m_pLogoGeometry;
   //CEGUI::GeometryBuffer* m_pFPSGeometry;

    GameFrameListener* m_pFrameListener;   
};

class GameFrameListener : public Ogre::FrameListener, public Ogre::WindowEventListener, public OIS::KeyListener, public OIS::MouseListener
{
public:
   
   GameFrameListener(Ogre::RenderWindow* pWin, Ogre::Camera* pCam);
    ~GameFrameListener();

    bool frameStarted(const Ogre::FrameEvent& evt);
    bool frameEnded(const Ogre::FrameEvent& evt);
   void windowResized(Ogre::RenderWindow* rw);
    bool mouseMoved(const OIS::MouseEvent &e);
    bool keyPressed(const OIS::KeyEvent &e);
    bool keyReleased(const OIS::KeyEvent &e);
    bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
    bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);
protected:
    CEGUI::MouseButton convertOISButtonToCegui(int buttonID);

    Ogre::Overlay* m_pStatsOverlay;
    OIS::InputManager* m_pInputManager;
    OIS::Keyboard* m_pKeyboard;
    OIS::Mouse* m_pMouse;
    Ogre::Camera* m_pCamera;
    Ogre::RenderWindow* m_pWindow;
    bool m_bQuit;   
};

#endif  // _GAME_APPLICATION_H


GameApplication.cpp

Code: Select all

#include <OgreWindowEventUtilities.h>
#include "GameApplication.h"
#include "RendererModules/Ogre/CEGUIOgreImageCodec.h"
#include "RendererModules/Ogre/CEGUIOgreResourceProvider.h"
#define WIN32_LEAN_AND_MEAN
//----------------------------------------------------------------------------//
GameApplication::GameApplication() :
    m_pOgreRoot(0),
    m_bInitialised(false),
    m_pFrameListener(0)   
{
    using namespace Ogre;

   m_pOgreRoot = OGRE_NEW Root("plugins.cfg", "ogre.cfg", "Ogre.log");

    if (m_pOgreRoot->showConfigDialog())
    {
        m_pWindow = m_pOgreRoot->initialise(true);

        SceneManager* sm = m_pOgreRoot->createSceneManager(ST_GENERIC, "SampleSceneMgr");
       
        m_pCamera = sm->createCamera("SampleCam");
        m_pCamera->setPosition(Vector3(0,0,500));
        m_pCamera->lookAt(Vector3(0,0,-300));
        m_pCamera->setNearClipDistance(5);

        // Create a viewport covering whole window
        Viewport* vp = m_pWindow->addViewport(m_pCamera);
        vp->setBackgroundColour(ColourValue(0, 0, 0));
        // Update the camera aspect ratio to that of the viewport
        m_pCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight()));

        // create ogre renderer, image codec and resource provider.
        CEGUI::OgreRenderer& renderer = CEGUI::OgreRenderer::create();
        m_pRenderer = &renderer;
        m_pImageCodec = &renderer.createOgreImageCodec();
        m_pResourceProvider = &renderer.createOgreResourceProvider();

        // create frame listener
        m_pFrameListener= new GameFrameListener(m_pWindow, m_pCamera);
      WindowEventUtilities::addWindowEventListener(m_pWindow, m_pFrameListener);
      m_pOgreRoot->addFrameListener(m_pFrameListener);
       
        m_bInitialised = true;
    } else {
        delete m_pOgreRoot;
        m_pOgreRoot = 0;
    }
}

//----------------------------------------------------------------------------//
GameApplication::~GameApplication()
{
   
    CEGUI::OgreRenderer& renderer =
        *static_cast<CEGUI::OgreRenderer*>(m_pRenderer);
    renderer.destroyOgreResourceProvider(
        *static_cast<CEGUI::OgreResourceProvider*>(m_pResourceProvider));
    renderer.destroyOgreImageCodec(*static_cast<CEGUI::OgreImageCodec*>(m_pImageCodec));
    CEGUI::OgreRenderer::destroy(renderer);

    OGRE_DELETE m_pOgreRoot;
   delete m_pFrameListener;
}

//----------------------------------------------------------------------------//
bool GameApplication::Execute()
{
    if (!m_pOgreRoot || !m_bInitialised)
        return false;

    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
   
   Sleep(5000); // test
   CEGUI::System::create(*m_pRenderer, m_pResourceProvider, 0, m_pImageCodec);
   m_pOgreRoot->startRendering();
    return true;
}

//----------------------------------------------------------------------------//
GameFrameListener::GameFrameListener(Ogre::RenderWindow* pWindow, Ogre::Camera* pCamera)
{
    // OIS setup
    OIS::ParamList paramList;
    size_t windowHnd = 0;
    std::ostringstream windowHndStr;

    // get window handle
    pWindow->getCustomAttribute("WINDOW", &windowHnd);

    // fill param list
    windowHndStr << (unsigned int)windowHnd;
    paramList.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));

    // create input system
    m_pInputManager = OIS::InputManager::createInputSystem(paramList);

   m_pKeyboard = static_cast<OIS::Keyboard*>(m_pInputManager->createInputObject(OIS::OISKeyboard, true));
    m_pKeyboard->setEventCallback(this);
   

    m_pMouse = static_cast<OIS::Mouse*>(m_pInputManager->createInputObject(OIS::OISMouse, true));
    m_pMouse->setEventCallback(this);

    unsigned int width, height, depth;
    int left, top;

    pWindow->getMetrics(width, height, depth, left, top);
    const OIS::MouseState& mouseState = m_pMouse->getMouseState();
    mouseState.width = width;
    mouseState.height = height;
   

    // store inputs we want to make use of
    m_pCamera = pCamera;
    m_pWindow = pWindow;

    // we've not quit yet.
    m_bQuit = false;
}

//----------------------------------------------------------------------------//
GameFrameListener::~GameFrameListener()
{
    if (m_pInputManager)
    {
        m_pInputManager->destroyInputObject(m_pMouse);
        m_pInputManager->destroyInputObject(m_pKeyboard);
        OIS::InputManager::destroyInputSystem(m_pInputManager);
    }
}

//----------------------------------------------------------------------------//
bool GameFrameListener::frameStarted(const Ogre::FrameEvent& evt)
{
    if(m_pWindow->isClosed() || m_bQuit)
        return false;
   
    if (m_pMouse)
        m_pMouse->capture();
    if (m_pKeyboard)
        m_pKeyboard->capture();

    return true;
}

//----------------------------------------------------------------------------//
bool GameFrameListener::frameEnded(const Ogre::FrameEvent& evt)
{
    return true;
}

void GameFrameListener::windowResized(Ogre::RenderWindow* rw)
{
   CEGUI::System* const sys = CEGUI::System::getSingletonPtr();
   if (sys)
      sys->notifyDisplaySizeChanged(
      CEGUI::Size(static_cast<float>(rw->getWidth()),
      static_cast<float>(rw->getHeight())));
}

//----------------------------------------------------------------------------//
bool GameFrameListener::mouseMoved(const OIS::MouseEvent &e)
{

    CEGUI::System& cegui = CEGUI::System::getSingleton();

    cegui.injectMouseMove(e.state.X.rel, e.state.Y.rel);
    cegui.injectMouseWheelChange(e.state.Z.rel / 120.0f);

    return true;
}

//----------------------------------------------------------------------------//
bool GameFrameListener::keyPressed(const OIS::KeyEvent &e)
{
    CEGUI::System& gui_system(CEGUI::System::getSingleton());

    if (e.key == OIS::KC_ESCAPE)
    {
        m_bQuit = true;
        return true;
    }

    CEGUI::System& cegui = CEGUI::System::getSingleton();

    cegui.injectKeyDown(e.key);

    cegui.injectChar(e.text);

    return true;
}


//----------------------------------------------------------------------------//
bool GameFrameListener::keyReleased(const OIS::KeyEvent &e)
{
    CEGUI::System::getSingleton().injectKeyUp(e.key);
    return true;
}

//----------------------------------------------------------------------------//
bool GameFrameListener::mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id)
{
    CEGUI::System::getSingleton().injectMouseButtonDown(convertOISButtonToCegui(id));

    return true;
}

//----------------------------------------------------------------------------//
bool GameFrameListener::mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id)
{
    CEGUI::System::getSingleton().injectMouseButtonUp(convertOISButtonToCegui(id));

    return true;
}

//----------------------------------------------------------------------------//
CEGUI::MouseButton GameFrameListener::convertOISButtonToCegui(int buttonID)
{
   using namespace OIS;

   switch (buttonID)
    {
   case OIS::MB_Left:
        return CEGUI::LeftButton;
   case OIS::MB_Right:
        return CEGUI::RightButton;
   case OIS::MB_Middle:
        return CEGUI::MiddleButton;
    default:
        return CEGUI::LeftButton;
    }
}


#include "windows.h"

INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
{
   GameApplication app;

   try {
      app.Execute();
   } catch( Ogre::Exception& e ) {
      MessageBoxA( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
   }

   return 0;
}

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

Re: ogre1.7 and cegui0.7.1 debug problem

Postby CrazyEddie » Mon Apr 26, 2010 09:27

I don't understand what the actual issue is that you're getting. Can you post the type of the error or exception that's being raised and a debug call stack. Please post the CEGUI.log file from the second case (there may be no log in the first case). Also, is there anything in the Ogre.log file?

CE.

haibo19981984
Just popping in
Just popping in
Posts: 10
Joined: Wed May 06, 2009 06:37

Re: ogre1.7 and cegui0.7.1 debug problem

Postby haibo19981984 » Mon Apr 26, 2010 14:58

===========================================
In second case,my error pop when switch to another window during starting application.
error's place:

Code: Select all

bool flip = ((mActiveRenderTarget->requiresTextureFlipping() && !mInvertVertexWinding) ||
         (!mActiveRenderTarget->requiresTextureFlipping() && mInvertVertexWinding));
mActiveRenderTarget==0

call stack:

Code: Select all

RenderSystem_Direct3D9_d.dll!Ogre::D3D9RenderSystem::_setCullingMode(Ogre::CullingMode mode=CULL_NONE) line 2393 + 0xc char C++
CEGUIOgreRenderer_d.dll!CEGUI::OgreRenderer::initialiseRenderStateSettings() line 472
CEGUIOgreRenderer_d.dll!CEGUI::OgreRenderer::beginRendering()
CEGUIBase_d.dll!CEGUI::System::renderGUI()
CEGUIOgreRenderer_d.dll!CEGUI::OgreGUIFrameListener::frameRenderingQueued(const Ogre::FrameEvent & __formal={...})
OgreMain_d.dll!Ogre::Root::_fireFrameRenderingQueued(Ogre::FrameEvent & evt={...})
OgreMain_d.dll!Ogre::Root::_fireFrameRenderingQueued()
OgreMain_d.dll!Ogre::Root::_updateAllRenderTargets()
OgreMain_d.dll!Ogre::Root::renderOneFrame()
OgreMain_d.dll!Ogre::Root::startRendering()
Demo_Cegui.exe!GameApplication::Execute() 
Demo_Cegui.exe!WinMain(HINSTANCE__ * hInst=0x00400000, HINSTANCE__ * __formal=0x00000000, char * strCmdLine=0x00151f06, HINSTANCE__ * __formal=0x00000000) 
Demo_Cegui.exe!__tmainCRTStartup()
Demo_Cegui.exe!WinMainCRTStartup()
kernel32.dll!7c817077()    


The main problem is "mActiveRenderTarget==0" after switch to another window and then switch to
ogre window.
The second case is as same as the first case in fact.
Because they all switch ogre window to another window,and then switch to ogre window again.

Just what I say above,make a breakpoint before "m_pOgreRoot->startRendering();".
Then run application,it will arrive at the place of breakpoint,then continue to run.
You will see the error.

I also send a topic in ogre's forum.include error screenshot.
http://www.ogre3d.org/forums/viewtopic.php?f=1&t=57294&sid=b33d0dff615e3cf6fe6ba4372dec274d

cegui log:

Code: Select all

26/04/2010 22:05:25 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
26/04/2010 22:05:25 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
26/04/2010 22:05:25 (Std)    +                          (http://www.cegui.org.uk/)                         +
26/04/2010 22:05:25 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

26/04/2010 22:05:25 (Std)    CEGUI::Logger singleton created. (01AEA4D0)
26/04/2010 22:05:25 (Std)    
26/04/2010 22:05:25 (Std)    ********************************************************************************
26/04/2010 22:05:25 (Std)    * Important:                                                                   *
26/04/2010 22:05:25 (Std)    *     To get support at the CEGUI forums, you must post _at least_ the section *
26/04/2010 22:05:25 (Std)    *     of this log file indicated below.  Failure to do this will result in no  *
26/04/2010 22:05:25 (Std)    *     support being given; please do not waste our time.                       *
26/04/2010 22:05:25 (Std)    ********************************************************************************
26/04/2010 22:05:25 (Std)    ********************************************************************************
26/04/2010 22:05:25 (Std)    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
26/04/2010 22:05:25 (Std)    ********************************************************************************
26/04/2010 22:05:25 (Std)    ---- Version 0.7.9999 (Build: Apr 26 2010 Debug Microsoft Windows MSVC++ 8.0 32 bit) ----
26/04/2010 22:05:25 (Std)    ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
26/04/2010 22:05:25 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
26/04/2010 22:05:25 (Std)    ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
26/04/2010 22:05:25 (Std)    ---- Scripting module is: None ----
26/04/2010 22:05:25 (Std)    ********************************************************************************
26/04/2010 22:05:25 (Std)    * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM         -------- *
26/04/2010 22:05:25 (Std)    ********************************************************************************
26/04/2010 22:05:25 (Std)    
26/04/2010 22:05:25 (Std)    ---- Begining CEGUI System initialisation ----
26/04/2010 22:05:25 (Std)    CEGUI::ImagesetManager singleton created (01AEC6C8)
26/04/2010 22:05:25 (Std)    CEGUI::FontManager singleton created. (01AEDDF0)
26/04/2010 22:05:25 (Std)    CEGUI::WindowFactoryManager singleton created
26/04/2010 22:05:25 (Std)    CEGUI::WindowManager singleton created (01AED968)
26/04/2010 22:05:25 (Std)    CEGUI::SchemeManager singleton created. (01AEE868)
26/04/2010 22:05:25 (Std)    CEGUI::MouseCursor singleton created. (01AEDA08)
26/04/2010 22:05:25 (Std)    CEGUI::GlobalEventSet singleton created. (01AEEDF8)
26/04/2010 22:05:25 (Std)    CEGUI::WidgetLookManager singleton created. (01AEEF48)
26/04/2010 22:05:25 (Std)    CEGUI::WindowRendererManager singleton created (01AEB620)
26/04/2010 22:05:25 (Std)    CEGUI::RenderEffectManager singleton created (01AEEFA0)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'DefaultWindow' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'DefaultWindow' windows added. (01AEB9B0)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'DragContainer' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'DragContainer' windows added. (01AEBB70)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'ScrolledContainer' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'ScrolledContainer' windows added. (01AEBD30)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'ClippedContainer' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'ClippedContainer' windows added. (01AEBEF0)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Checkbox' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Checkbox' windows added. (01AEC150)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/PushButton' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/PushButton' windows added. (01AEC310)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/RadioButton' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/RadioButton' windows added. (01AEC3E8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Combobox' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Combobox' windows added. (01AEF1E8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/ComboDropList' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/ComboDropList' windows added. (01AEF3A8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Editbox' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Editbox' windows added. (01AEF568)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/FrameWindow' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/FrameWindow' windows added. (01AEF728)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/ItemEntry' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/ItemEntry' windows added. (01AEF8E8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Listbox' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Listbox' windows added. (01AEFAA8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/ListHeader' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/ListHeader' windows added. (01AEFC68)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/ListHeaderSegment' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (01AEFE28)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Menubar' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Menubar' windows added. (01AF00B8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/PopupMenu' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/PopupMenu' windows added. (01AF0278)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/MenuItem' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/MenuItem' windows added. (01AF0438)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/MultiColumnList' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/MultiColumnList' windows added. (01AF05F8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/MultiLineEditbox' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (01AF07B8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/ProgressBar' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/ProgressBar' windows added. (01AF0978)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/ScrollablePane' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/ScrollablePane' windows added. (01AF0B38)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Scrollbar' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Scrollbar' windows added. (01AF0CF8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Slider' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Slider' windows added. (01AF0EB8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Spinner' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Spinner' windows added. (01AF1078)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/TabButton' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/TabButton' windows added. (01AF1238)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/TabControl' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/TabControl' windows added. (01AF13F8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Thumb' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Thumb' windows added. (01AF15B8)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Titlebar' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Titlebar' windows added. (01AF1778)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Tooltip' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Tooltip' windows added. (01AF1A20)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/ItemListbox' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/ItemListbox' windows added. (01AF1BE0)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/GroupBox' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/GroupBox' windows added. (01AF1DA0)
26/04/2010 22:05:25 (Std)    Created WindowFactory for 'CEGUI/Tree' windows.
26/04/2010 22:05:25 (Std)    WindowFactory for 'CEGUI/Tree' windows added. (01AF1F60)
26/04/2010 22:05:25 (Std)    Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
26/04/2010 22:05:25 (Std)    CEGUI::System singleton created. (01AEA0B8)
26/04/2010 22:05:25 (Std)    ---- CEGUI System initialisation completed ----
26/04/2010 22:05:25 (Std)    


ogre log:

Code: Select all

22:05:19: Creating resource group General
22:05:19: Creating resource group Internal
22:05:19: Creating resource group Autodetect
22:05:19: SceneManagerFactory for type 'DefaultSceneManager' registered.
22:05:19: Registering ResourceManager for type Material
22:05:19: Registering ResourceManager for type Mesh
22:05:19: Registering ResourceManager for type Skeleton
22:05:19: MovableObjectFactory for type 'ParticleSystem' registered.
22:05:19: OverlayElementFactory for type Panel registered.
22:05:19: OverlayElementFactory for type BorderPanel registered.
22:05:19: OverlayElementFactory for type TextArea registered.
22:05:19: Registering ResourceManager for type Font
22:05:19: ArchiveFactory for archive type FileSystem registered.
22:05:19: ArchiveFactory for archive type Zip registered.
22:05:19: DDS codec registering
22:05:19: FreeImage version: 3.13.1
22:05:19: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
22:05:19: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic,bay,bmq,cr2,crw,cs1,dc2,dcr,dng,erf,fff,hdr,k25,kdc,mdc,mos,mrw,nef,orf,pef,pxn,raf,raw,rdc,sr2,srf,arw,3fr,cine,ia,kc2,mef,nrw,qtk,rw2,sti,drf,dsc,ptx,cap,iiq,rwz
22:05:19: Registering ResourceManager for type HighLevelGpuProgram
22:05:19: Registering ResourceManager for type Compositor
22:05:19: MovableObjectFactory for type 'Entity' registered.
22:05:19: MovableObjectFactory for type 'Light' registered.
22:05:19: MovableObjectFactory for type 'BillboardSet' registered.
22:05:19: MovableObjectFactory for type 'ManualObject' registered.
22:05:19: MovableObjectFactory for type 'BillboardChain' registered.
22:05:19: MovableObjectFactory for type 'RibbonTrail' registered.
22:05:19: Loading library .\RenderSystem_Direct3D9_d
22:05:19: Installing plugin: D3D9 RenderSystem
22:05:19: D3D9 : Direct3D9 Rendering Subsystem created.
22:05:19: D3D9: Driver Detection Starts
22:05:19: D3D9: Driver Detection Ends
22:05:19: Plugin successfully installed
22:05:19: Loading library .\RenderSystem_GL_d
22:05:19: Installing plugin: GL RenderSystem
22:05:19: OpenGL Rendering Subsystem created.
22:05:20: Plugin successfully installed
22:05:20: Loading library .\Plugin_ParticleFX_d
22:05:20: Installing plugin: ParticleFX
22:05:20: Particle Emitter Type 'Point' registered
22:05:20: Particle Emitter Type 'Box' registered
22:05:20: Particle Emitter Type 'Ellipsoid' registered
22:05:20: Particle Emitter Type 'Cylinder' registered
22:05:20: Particle Emitter Type 'Ring' registered
22:05:20: Particle Emitter Type 'HollowEllipsoid' registered
22:05:20: Particle Affector Type 'LinearForce' registered
22:05:20: Particle Affector Type 'ColourFader' registered
22:05:20: Particle Affector Type 'ColourFader2' registered
22:05:20: Particle Affector Type 'ColourImage' registered
22:05:20: Particle Affector Type 'ColourInterpolator' registered
22:05:20: Particle Affector Type 'Scaler' registered
22:05:20: Particle Affector Type 'Rotator' registered
22:05:20: Particle Affector Type 'DirectionRandomiser' registered
22:05:20: Particle Affector Type 'DeflectorPlane' registered
22:05:20: Plugin successfully installed
22:05:20: Loading library .\Plugin_BSPSceneManager_d
22:05:20: Installing plugin: BSP Scene Manager
22:05:20: Plugin successfully installed
22:05:20: Loading library .\Plugin_CgProgramManager_d
22:05:20: Installing plugin: Cg Program Manager
22:05:20: Plugin successfully installed
22:05:20: Loading library .\Plugin_PCZSceneManager_d
22:05:20: Installing plugin: Portal Connected Zone Scene Manager
22:05:20: PCZone Factory Type 'ZoneType_Default' registered
22:05:20: Plugin successfully installed
22:05:20: Loading library .\Plugin_OctreeZone_d
22:05:20: Installing plugin: Octree Zone Factory
22:05:20: Plugin successfully installed
22:05:20: Loading library .\Plugin_OctreeSceneManager_d
22:05:20: Installing plugin: Octree & Terrain Scene Manager
22:05:20: Plugin successfully installed
22:05:20: *-*-* OGRE Initialising
22:05:20: *-*-* Version 1.7.1 (Cthugha)
22:05:20: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
22:05:20: D3D9 : RenderSystem Option: FSAA = 0
22:05:20: D3D9 : RenderSystem Option: Floating-point mode = Fastest
22:05:20: D3D9 : RenderSystem Option: Full Screen = No
22:05:20: D3D9 : RenderSystem Option: Rendering Device = Monitor-1-NVIDIA Quadro NVS 135M
22:05:20: D3D9 : RenderSystem Option: Resource Creation Policy = Create on all devices
22:05:20: D3D9 : RenderSystem Option: VSync = No
22:05:20: D3D9 : RenderSystem Option: VSync Interval = 1
22:05:20: D3D9 : RenderSystem Option: Video Mode = 1024 x 768 @ 32-bit colour
22:05:20: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No
22:05:23: CPU Identifier & Features
22:05:23: -------------------------
22:05:23:  *   CPU ID: GenuineIntel: Intel(R) Core(TM)2 Duo CPU     T8100  @ 2.10GHz
22:05:23:  *      SSE: yes
22:05:23:  *     SSE2: yes
22:05:23:  *     SSE3: yes
22:05:23:  *      MMX: yes
22:05:23:  *   MMXEXT: yes
22:05:23:  *    3DNOW: no
22:05:23:  * 3DNOWEXT: no
22:05:23:  *     CMOV: yes
22:05:23:  *      TSC: yes
22:05:23:  *      FPU: yes
22:05:23:  *      PRO: yes
22:05:23:  *       HT: no
22:05:23: -------------------------
22:05:23: D3D9 : Subsystem Initialising
22:05:23: Registering ResourceManager for type Texture
22:05:23: Registering ResourceManager for type GpuProgram
22:05:23: D3D9RenderSystem::_createRenderWindow "OGRE Render Window", 1024x768 windowed  miscParams: FSAA=0 FSAAHint= colourDepth=32 gamma=false monitorIndex=0 useNVPerfHUD=false vsync=false vsyncInterval=1
22:05:23: D3D9 : Created D3D9 Rendering Window 'OGRE Render Window' : 1024x737, 32bpp
22:05:23: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
22:05:23: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
22:05:23: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
22:05:23: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
22:05:23: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
22:05:23: D3D9: Vertex texture format supported - PF_FLOAT16_R
22:05:23: D3D9: Vertex texture format supported - PF_FLOAT32_R
22:05:23: D3D9: Vertex texture format supported - PF_FLOAT16_GR
22:05:23: D3D9: Vertex texture format supported - PF_FLOAT32_GR
22:05:23: RenderSystem capabilities
22:05:23: -------------------------
22:05:23: RenderSystem Name: Direct3D9 Rendering Subsystem
22:05:23: GPU Vendor: nvidia
22:05:23: Device Name: Monitor-1-NVIDIA Quadro NVS 135M
22:05:23: Driver Version: 6.14.11.7968
22:05:23:  * Fixed function pipeline: yes
22:05:23:  * Hardware generation of mipmaps: yes
22:05:23:  * Texture blending: yes
22:05:23:  * Anisotropic texture filtering: yes
22:05:23:  * Dot product texture operation: yes
22:05:23:  * Cube mapping: yes
22:05:23:  * Hardware stencil buffer: yes
22:05:23:    - Stencil depth: 8
22:05:23:    - Two sided stencil support: yes
22:05:23:    - Wrap stencil values: yes
22:05:23:  * Hardware vertex / index buffers: yes
22:05:23:  * Vertex programs: yes
22:05:23:  * Number of floating-point constants for vertex programs: 256
22:05:23:  * Number of integer constants for vertex programs: 16
22:05:23:  * Number of boolean constants for vertex programs: 16
22:05:23:  * Fragment programs: yes
22:05:23:  * Number of floating-point constants for fragment programs: 224
22:05:23:  * Number of integer constants for fragment programs: 16
22:05:23:  * Number of boolean constants for fragment programs: 16
22:05:23:  * Geometry programs: no
22:05:23:  * Number of floating-point constants for geometry programs: 0
22:05:23:  * Number of integer constants for geometry programs: 0
22:05:23:  * Number of boolean constants for geometry programs: 0
22:05:23:  * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
22:05:23:  * Texture Compression: yes
22:05:23:    - DXT: yes
22:05:23:    - VTC: no
22:05:23:    - PVRTC: no
22:05:23:  * Scissor Rectangle: yes
22:05:23:  * Hardware Occlusion Query: yes
22:05:23:  * User clip planes: yes
22:05:23:  * VET_UBYTE4 vertex element type: yes
22:05:23:  * Infinite far plane projection: yes
22:05:23:  * Hardware render-to-texture: yes
22:05:23:  * Floating point textures: yes
22:05:23:  * Non-power-of-two textures: yes
22:05:23:  * Volume textures: yes
22:05:23:  * Multiple Render Targets: 4
22:05:23:    - With different bit depths: yes
22:05:23:  * Point Sprites: yes
22:05:23:  * Extended point parameters: yes
22:05:23:  * Max Point Size: 10
22:05:23:  * Vertex texture fetch: yes
22:05:23:  * Number of world matrices: 0
22:05:23:  * Number of texture units: 8
22:05:23:  * Stencil buffer depth: 8
22:05:23:  * Number of vertex blend matrices: 0
22:05:23:    - Max vertex textures: 4
22:05:23:    - Vertex textures shared: no
22:05:23:  * Render to Vertex Buffer : no
22:05:23:  * DirectX per stage constants: yes
22:05:23: ***************************************
22:05:23: *** D3D9 : Subsystem Initialised OK ***
22:05:23: ***************************************
22:05:23: DefaultWorkQueue('Root') initialising on thread main.
22:05:23: Particle Renderer Type 'billboard' registered
22:05:23: SceneManagerFactory for type 'BspSceneManager' registered.
22:05:23: Registering ResourceManager for type BspLevel
22:05:23: SceneManagerFactory for type 'PCZSceneManager' registered.
22:05:23: MovableObjectFactory for type 'PCZLight' registered.
22:05:23: MovableObjectFactory for type 'Portal' registered.
22:05:23: MovableObjectFactory for type 'AntiPortal' registered.
22:05:23: PCZone Factory Type 'ZoneType_Octree' registered
22:05:23: PCZone Factory Type 'ZoneType_Terrain' registered
22:05:23: SceneManagerFactory for type 'OctreeSceneManager' registered.
22:05:23: SceneManagerFactory for type 'TerrainSceneManager' registered.
22:05:25: Parsing scripts for resource group Autodetect
22:05:25: Finished parsing scripts for resource group Autodetect
22:05:25: Parsing scripts for resource group General
22:05:25: Finished parsing scripts for resource group General
22:05:25: Parsing scripts for resource group Internal
22:05:25: Finished parsing scripts for resource group Internal

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

Re: ogre1.7 and cegui0.7.1 debug problem

Postby CrazyEddie » Wed Apr 28, 2010 14:03

I think this is the same issue as reported here: viewtopic.php?f=3&t=4515

As mentioned there, I was unable to reproduce the issue.

CE.

haibo19981984
Just popping in
Just popping in
Posts: 10
Joined: Wed May 06, 2009 06:37

Re: ogre1.7 and cegui0.7.1 debug problem

Postby haibo19981984 » Wed Apr 28, 2010 15:26

hai,CrazyEddie.
Just as you say,the problem don't occur in CEGUI samples framework.
Yes,you are right.
It only occurs in the project which contains ogre and cegui.
In especially,it occurs between init ogre resource and create cegui.
In my feel,its cause maybe the ogre window lost.
Maybe I don't describe distinctly above.
If you use my code provide above and make a breakpoint in where i note "make a breakpoint there":

Code: Select all

bool GameApplication::Execute()
{
    if (!m_pOgreRoot || !m_bInitialised)
        return false;

    // make a breakpoint there
    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
   
    Sleep(5000); // test
    CEGUI::System::create(*m_pRenderer, m_pResourceProvider, 0, m_pImageCodec);
    m_pOgreRoot->startRendering();
   
    return true;
}

you can run the application to the breakpoint.right?
This will be no problem.
Then you can press "F10" to continue to run the application.
This will be no problem again.
Just continue to press "F10",the error will be occasioned.
By the way,it seems there is no problem in OpenGL Rendering Subsystem.
It only occurs in Direct3D9 Rendering Subsystem.
I'm so sorry for disturb you.

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

Re: ogre1.7 and cegui0.7.1 debug problem

Postby CrazyEddie » Wed Apr 28, 2010 18:05

Hi,

It's curious that the samples do not have this issue; if the samples do not exhibit the behaviour, my first thought has to be that the issue is somewhere other than CEGUI?

I'll try to get around to testing the example code you posted some time soon (perhaps next week at the earliest) - I generally do not spend a whole lot of time on the Windows platform, so it's not a quick test I can just run in a spare 5 minutes ;)

CE.

rockoz
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Sep 22, 2009 02:26

Re: ogre1.7 and cegui0.7.1 debug problem

Postby rockoz » Fri May 07, 2010 08:16

I've had this problem too.
It seems to be OgreRenderer's issue.
Ogre will not set this mActiveRenderTarget before its render window is focused for rendering the first frame... :pint:

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

Re: ogre1.7 and cegui0.7.1 debug problem

Postby CrazyEddie » Sat May 08, 2010 10:59

I guess my question has to be what can we do to prevent or work around this on the CEGUI side? From a quick glance we can not determine whether or not the offending member variable (mActiveRenderTarget) has been set, and as such are unable to program defensively to avoid the issue.

CE.

foxbat
Just popping in
Just popping in
Posts: 4
Joined: Sat May 05, 2007 01:20

Re: ogre1.7 and cegui0.7.1 debug problem

Postby foxbat » Sat Sep 18, 2010 02:57

After reading the 0.7.2 change log I can't see whether or not this issue has been fixed. Because this bug occurs sporadically and is difficult to test, I'd like to know whether it's been addressed in the new build. If not some kind of solution is required because my app is critically affected by this issue.

Thanks.

foxbat
Just popping in
Just popping in
Posts: 4
Joined: Sat May 05, 2007 01:20

Re: ogre1.7 and cegui0.7.1 debug problem

Postby foxbat » Sat Sep 18, 2010 09:59

I think I've answered my own question. I ran some tests and the problem appears to still be there.

Sinbad made a post on the issue here which may help. In the 1.6 implementation the Ogre CEGUI renderer was getting updated from Ogre's RenderQueueListener which is only called when the render target is in context. In 1.7 however it gets called from FrameListener::frameRenderingQueued which apparently doesn't guarantee that there will be a render target in context.

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

Re: ogre1.7 and cegui0.7.1 debug problem

Postby CrazyEddie » Tue Sep 21, 2010 09:29

No, this was not fixed - for two reasons:

1) I was never able to reproduce it (although based on information gathered, I accept it's a real issue!)
2) As previously mentioned, I don't think there exists a mechanism for us to simply test whether mActiveRenderTarget is set.

There has been some talk of writing (yet another) version of the CEGUI renderer for Ogre that operates at a slightly higher level, this would certainly fix all these types of issue - when or if that will happen is not yet decided. Aside from this, I already have some other Ogre related issues to look at, and I'll look again at this one, though I can not promise any such fixes for 0.7.3, since my inability to reproduce most of these Ogre/D3D related things is severely hampering efforts in this area.

CE.

foxbat
Just popping in
Just popping in
Posts: 4
Joined: Sat May 05, 2007 01:20

Re: ogre1.7 and cegui0.7.1 debug problem

Postby foxbat » Wed Sep 22, 2010 03:45

You may have already tried this, but in reproducing the issue I find that I (usually?) need to start up the app while working in a different window, i.e so that it's trying to init CEGUI when the OS isn't displaying the window.

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

Re: ogre1.7 and cegui0.7.1 debug problem

Postby CrazyEddie » Wed Sep 22, 2010 09:34

Thanks. Other people have told me the same, I didn't have much luck trying that previously (I had a delay at the start of the app - prior to initialising rendering - that allowed me to switch to another window), though I will try again :)

CE.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 9 guests