Page 1 of 1

FalagardWRModule destruct error

Posted: Wed Oct 21, 2009 11:31
by kili
Hi,
we use CEGUI0.7, the log is:

********************************************************************************
21/10/2009 17:13:50 (Std) * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
21/10/2009 17:13:50 (Std) ********************************************************************************
21/10/2009 17:13:50 (Std) ---- Version 0.7.9999 (Build: Oct 20 2009 Debug Microsoft Windows MSVC++ 8.0 32 bit) ----
21/10/2009 17:13:50 (Std) ---- Renderer module is: CEGUIGamebryoRenderer ----
21/10/2009 17:13:50 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
21/10/2009 17:13:50 (Std) ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
21/10/2009 17:13:50 (Std) ---- Scripting module is: None ----
21/10/2009 17:13:50 (Std) ********************************************************************************
21/10/2009 17:13:50 (Std) * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
21/10/2009 17:13:50 (Std) ********************************************************************************

our AP would crash when d_registry in FalagardWRModule deallocated.

Code: Select all

FalagardWRModule::~FalagardWRModule()
{
    FactoryRegistry::iterator i = d_registry.begin();
    for ( ; i != d_registry.end(); ++i)
        delete (*i);
}  //after this line, then:


Code: Select all

template<class _Ty,
   class _Alloc> inline
   void _Destroy_range(_Ty *_First, _Ty *_Last, _Alloc& _Al)
   {   // destroy [_First, _Last)
   _Destroy_range(_First, _Last, _Al, _Ptr_cat(_First, _Last));   //crash
   }



Could anyone help me?

Re: FalagardWRModule destruct error

Posted: Thu Oct 22, 2009 08:44
by CrazyEddie
Hi,

It appears to be a memory release issue; is there some kind of memory manager / custom allocator in use? Is the error an actual crash / exception (if so which one), or is it an assert of some kind? In either case, can we see a backtrace / callstack from the point of failure? (because I'm interested in what's a bit higher up :)).

I don't think there should be any actual bugs here (but there could be); it seems more like a config issue (either those items mentioned above, or c/c++ runtime settings and so on).

CE.

Re: FalagardWRModule destruct error

Posted: Mon Oct 26, 2009 01:26
by kili
umm...maybe the reason is MultiThread. I changed the CELayoutEditor to MTd,
then this appears, too. I'll check this later.