Problem in debug version, but not release

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
Viper
Just popping in
Just popping in
Posts: 16
Joined: Mon Aug 29, 2005 01:27
Location: US
Contact:

Problem in debug version, but not release

Postby Viper » Thu Dec 08, 2005 03:46

Okay,

I just switched to VS 2005 Express, and now I am having a problem with the following code:

Code: Select all

void SetupMainMenu()
{
   CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
   wmgr.destroyAllWindows();
   CEGUI::Window* myRoot = wmgr.createWindow("DefaultWindow", "root");
   CEGUI::System::getSingleton().setGUISheet(myRoot);

   CEGUI::Window* myTop = wmgr.loadWindowLayout("Layouts/MainMenu.layout");
   myRoot->addChildWindow(myTop);   

wmgr.getWindow("btnSingle")->subscribeEvent("MouseEnter",EventMouseOver);   
wmgr.getWindow("btnMulti")->subscribeEvent("MouseEnter",EventMouseOver);   
wmgr.getWindow("btnSound")->subscribeEvent("MouseEnter",EventMouseOver);   
wmgr.getWindow("btnGraphics")->subscribeEvent("MouseEnter",EventMouseOver);   
wmgr.getWindow("btnCredits")->subscribeEvent("MouseEnter",EventMouseOver);   
wmgr.getWindow("btnQuit")->subscribeEvent("MouseEnter",EventMouseOver);   
wmgr.getWindow("btnQuit")->subscribeEvent("MouseClick",QuitClicked);
wmgr.getWindow("btnSound")->subscribeEvent("MouseClick",SoundClicked);
};


When it executes, i get the error:

Code: Select all

Unhandled exception at 0x0042d9ab in SpaceRaceD.exe: 0xC0000005: Access violation reading location 0xcdcdcd08.


When it gets to:

Code: Select all

wmgr.getWindow("btnSingle")->subscribeEvent("MouseEnter",EventMouseOver);   


Although there are no errors shown, here is my ceGUI.log

Code: Select all

07/12/2005 21:38:16 (InfL1)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
07/12/2005 21:38:16 (InfL1)   +                     Crazy Eddie's GUI System - Event log                    +
07/12/2005 21:38:16 (InfL1)   +                          (http://www.cegui.org.uk/)                         +
07/12/2005 21:38:16 (InfL1)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

07/12/2005 21:38:16 (InfL1)   CEGUI::Logger singleton created.
07/12/2005 21:38:16 (InfL1)   ---- Begining CEGUI System initialisation ----
07/12/2005 21:38:16 (InfL1)   CEGUI::ImagesetManager singleton created
07/12/2005 21:38:16 (InfL1)   CEGUI::FontManager singleton created.
07/12/2005 21:38:16 (InfL1)   CEGUI::WindowFactoryManager singleton created
07/12/2005 21:38:16 (InfL1)   CEGUI::WindowManager singleton created
07/12/2005 21:38:16 (InfL1)   CEGUI::SchemeManager singleton created.
07/12/2005 21:38:16 (InfL1)   CEGUI::MouseCursor singleton created.
07/12/2005 21:38:16 (InfL1)   CEGUI::GlobalEventSet singleton created.
07/12/2005 21:38:16 (InfL1)   WindowFactory for 'DefaultWindow' windows added.
07/12/2005 21:38:16 (InfL1)   WindowFactory for 'DragContainer' windows added.
07/12/2005 21:38:16 (InfL1)   WindowFactory for 'ScrolledContainer' windows added.
07/12/2005 21:38:16 (InfL1)   Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
07/12/2005 21:38:16 (InfL1)   CEGUI::System singleton created.
07/12/2005 21:38:16 (InfL1)   ---- CEGUI System initialisation completed ----
07/12/2005 21:38:16 (InfL1)   Attempting to load Scheme from file 'Layouts\TaharezLook.scheme'.
07/12/2005 21:38:16 (InfL1)   Attempting to create an Imageset from the information specified in file 'Layouts/TaharezLook.imageset'.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/AlternateProgressBar' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/Button' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/Checkbox' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/CloseButton' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/Combobox' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/ComboDropList' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/ComboEditbox' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/Editbox' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/FrameWindow' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/LargeVerticalScrollbar' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/LargeVerticalScrollbarThumb' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/Listbox' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/ListHeader' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/ListHeaderSegment' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/HorizontalScrollbar' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/HorizontalScrollbarThumb' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/MultiColumnList' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/MultiLineEditbox' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/ProgressBar' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/RadioButton' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/ScrollablePane' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/Slider' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/SliderThumb' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/Spinner' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/StaticImage' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/StaticText' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/TabButton' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/TabControl' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/TabPane' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/Titlebar' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/Tooltip' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/VerticalScrollbar' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/VerticalScrollbarThumb' windows added.
07/12/2005 21:38:17 (InfL1)   WindowFactory for 'TaharezLook/VUMeter' windows added.
07/12/2005 21:38:17 (InfL1)   Attempting to create Font from the information specified in file 'Layouts/Commonwealth-10.font'.
07/12/2005 21:38:17 (InfL1)   Attempting to create Imageset 'Commonwealth-10_auto_glyph_images' with texture only.
07/12/2005 21:38:23 (InfL1)   ---- Successfully completed loading of GUI layout from 'Layouts/MainMenu.layout' ----


This only happens when I compile to my debug version. My release works just fine, and evn handles the events correctly. I have tried linking my debug with both debug and release versions of all ceGUI DLLs, but it does not make a difference.

Any ideas?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Problem in debug version, but not release

Postby lindquist » Thu Dec 08, 2005 04:46

A backtrace might shed some light on this.

Your log seems to be CEGUI v0.3... Why not upgrade?

User avatar
Viper
Just popping in
Just popping in
Posts: 16
Joined: Mon Aug 29, 2005 01:27
Location: US
Contact:

Re: Problem in debug version, but not release

Postby Viper » Thu Dec 08, 2005 05:25

I will try upgrading and see if it helps. I hadn't wanted to as I was afraid that something might break, but since it's broke already :)

User avatar
Viper
Just popping in
Just popping in
Posts: 16
Joined: Mon Aug 29, 2005 01:27
Location: US
Contact:

Re: Problem in debug version, but not release

Postby Viper » Thu Dec 08, 2005 20:20

Okay, I updated to 0.4.1, but the problem is still there. Also, by backtrace, do you mean the call stack? Before updating to 0.4.1, I remember CEGUI stuff being listed in the call stack, but not after updating, which was odd. After the update, the last thing in my call stack was my own code.

Here is my new CEGUI.log:

Code: Select all

08/12/2005 07:21:53 (InfL1)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
08/12/2005 07:21:53 (InfL1)   +                     Crazy Eddie's GUI System - Event log                    +
08/12/2005 07:21:53 (InfL1)   +                          (http://www.cegui.org.uk/)                         +
08/12/2005 07:21:53 (InfL1)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

08/12/2005 07:21:53 (InfL1)   CEGUI::Logger singleton created.
08/12/2005 07:21:53 (InfL1)   ---- Begining CEGUI System initialisation ----
08/12/2005 07:21:53 (InfL1)   CEGUI::ImagesetManager singleton created
08/12/2005 07:21:53 (InfL1)   CEGUI::FontManager singleton created.
08/12/2005 07:21:53 (InfL1)   CEGUI::WindowFactoryManager singleton created
08/12/2005 07:21:53 (InfL1)   CEGUI::WindowManager singleton created
08/12/2005 07:21:53 (InfL1)   CEGUI::SchemeManager singleton created.
08/12/2005 07:21:53 (InfL1)   CEGUI::MouseCursor singleton created.
08/12/2005 07:21:53 (InfL1)   CEGUI::GlobalEventSet singleton created.
08/12/2005 07:21:53 (InfL1)   CEGUI::WidgetLookManager singleton created.
08/12/2005 07:21:53 (InfL1)   WindowFactory for 'DefaultWindow' windows added.
08/12/2005 07:21:53 (InfL1)   WindowFactory for 'DragContainer' windows added.
08/12/2005 07:21:53 (InfL1)   WindowFactory for 'ScrolledContainer' windows added.
08/12/2005 07:21:53 (InfL1)   Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
08/12/2005 07:21:53 (InfL1)   CEGUI::System singleton created.
08/12/2005 07:21:53 (InfL1)   ---- CEGUI System initialisation completed ----
08/12/2005 07:21:53 (InfL1)   ---- Version 0.4.1 ----
08/12/2005 07:21:53 (InfL1)   ---- Renderer module is: CEGUI::DirectX81Renderer - Official Direct3D 9 based renderer module for CEGUI ----
08/12/2005 07:21:53 (InfL1)   ---- XML Parser module is: CEGUI::TinyXMLParser - Official tinyXML based parser module for CEGUI ----
08/12/2005 07:21:53 (InfL1)   ---- Scripting module is: None ----
08/12/2005 07:21:53 (InfL1)   Attempting to load Scheme from file 'Layouts\TaharezLook.scheme'.
08/12/2005 07:21:53 (InfL1)   Attempting to create an Imageset from the information specified in file 'Layouts/TaharezLook.imageset'.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/AlternateProgressBar' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/Button' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/Checkbox' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/CloseButton' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/Combobox' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/ComboDropList' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/ComboEditbox' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/Editbox' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/FrameWindow' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/LargeVerticalScrollbar' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/LargeVerticalScrollbarThumb' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/Listbox' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/ListHeader' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/ListHeaderSegment' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/HorizontalScrollbar' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/HorizontalScrollbarThumb' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/MultiColumnList' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/MultiLineEditbox' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/ProgressBar' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/RadioButton' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/ScrollablePane' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/Slider' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/SliderThumb' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/Spinner' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/StaticImage' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/StaticText' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/TabButton' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/TabControl' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/TabPane' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/Titlebar' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/Tooltip' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/VerticalScrollbar' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/VerticalScrollbarThumb' windows added.
08/12/2005 07:21:55 (InfL1)   WindowFactory for 'TaharezLook/VUMeter' windows added.
08/12/2005 07:21:55 (InfL1)   Attempting to create Font from the information specified in file 'Layouts/Commonwealth-10.font'.
08/12/2005 07:21:55 (InfL1)   Attempting to create Imageset 'Commonwealth-10_auto_glyph_images' with texture only.
08/12/2005 07:22:05 (InfL1)   ---- Successfully completed loading of GUI layout from 'Layouts/MainMenu.layout' ----

User avatar
Viper
Just popping in
Just popping in
Posts: 16
Joined: Mon Aug 29, 2005 01:27
Location: US
Contact:

Re: Problem in debug version, but not release

Postby Viper » Thu Dec 08, 2005 21:14

Okay, the problem may not have been with CEGUI. It is now fixed, but I can't explain exactly what I did. I had messed around with some libraries being included and changed some of the pre-compilation defines, and it now works.

Thanks, lindquist, for all of your help. It is appreciated.

User avatar
Pacome
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 02, 2005 11:54
Contact:

Re: Problem in debug version, but not release

Postby Pacome » Sat Jan 07, 2006 10:09

Yes, I have the same problem : the "subscribeEvent" crashs when CeGUI is compiled in Release mode and the executable is compiled in debug mode.

[EDIT] I use the last version of CeGUI, of course.
[EDIT] And obviously, I disabled CEGUI_LOAD_MODULE_APPEND_SUFFIX_FOR_DEBUG in CeGUIconfig.h


Do you have an idea ?

Thanks.

Pacôme

User avatar
Pacome
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 02, 2005 11:54
Contact:

Re: Problem in debug version, but not release

Postby Pacome » Sun Jan 08, 2006 17:31

I insist with this bug which is very penalizing for us.

I explain a little bit more : we give CeGUI in our SDK (http://www.ease-production.com) and we only give release-binaries. And then, if ALL the users must CeGUI in release-mode because we don't give the debug version, it means CeGUI won't be acceptable at all for game development.

The problem is:
- When CeGUI's DLLs are compiled in Release mode
- When an application which use these CeGUI Dlls is compiled in Debug mode
=> the application crash on the first "subscribeEvent" call.
It's exactly the same problem exposed by Viper.

You can test it by yourself:
1) Download EaseWrapperSDK on www.ease-production.com (you need to have DirectXSDK installed)
2) Try to compile Tutorial 23 : it works fine in debug and release modes, because it uses CeGUI via our interface, and it uses only LUA construction
3) Try to compile Tutorial 24 : it crash in Debug mode on the first "subscribeEvent" call. But it works in release mode.

I've tested it again this week-end, with several CeGUI configuratons, but the problem didn't disappear.

I'm really sorry, but I don't have the time to read all CeGUI source code to understand where the problem comes from, and it's a pity to not include CeGUI in the next release of our SDK just for this bug......

I hope someone will help us.

Best regards,

Pacôme

User avatar
Pacome
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 02, 2005 11:54
Contact:

Re: Problem in debug version, but not release

Postby Pacome » Sun Jan 08, 2006 17:33

I insist with this bug which is very penalizing for us.

I explain a little bit more : we give CeGUI in our SDK (http://www.ease-production.com) and we only give release-binaries. And then, if ALL the users must CeGUI in release-mode because we don't give the debug version, it means CeGUI won't be acceptable at all for game development.

The problem is:
- When CeGUI's DLLs are compiled in Release mode
- When an application which use these CeGUI Dlls is compiled in Debug mode
=> the application crash on the first "subscribeEvent" call.
It's exactly the same problem exposed by Viper.

You can test it by yourself:
1) Download EaseWrapperSDK on www.ease-production.com (you need to have DirectXSDK installed)
2) Try to compile Tutorial 23 : it works fine in debug and release modes, because it uses CeGUI via our interface, and it uses only LUA construction
3) Try to compile Tutorial 24 : it crash in Debug mode on the first "subscribeEvent" call. But it works in release mode.

I've tested it again this week-end, with several CeGUI configuratons, but the problem didn't disappear.

I'm really sorry, but I don't have the time to read all CeGUI source code to understand where the problem comes from, and it's a pity to not include CeGUI in the next release of our SDK just for this bug......

I hope someone will help us.

Best regards,

Pacôme

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Problem in debug version, but not release

Postby lindquist » Sun Jan 08, 2006 19:03

I do have access to a windows visual c++ development workstation. so it's very hard for me to say where this is coming from.

The event/callback system in CEGUI makes heavy use of c++ templates. You're not saying which VC++ version you have. There are stlport builds available for vc2002. I have no idea if it would help...

Also the downloadable cegui 0.4.1 sdk installer comes with both release and debug libraries. If you could post the call-stack at the point of the crash it would be useful to pinpoint the problem.

Also does it crash if you link the debug build to the debug library? (you said the other sample used only lua?)

HTH

User avatar
Pacome
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 02, 2005 11:54
Contact:

Re: Problem in debug version, but not release

Postby Pacome » Sun Jan 08, 2006 22:40

It doesn't depend on the version of Visual Studio : we've tested with VS2003 and VS2005, the result is the same.

The results are:
- EXE-Debug + DLL-Debug => OK
- EXE-Release + DLL-Release => OK
- EXE-Debug + DLL-Release => Crash on subscribeEvent.

We can't access the call stack because CeGUI is in release mode. And even if we produce a pdb file with debug information, it just crash on the "subscribeEvent" call. It's very strange.

If you have a starting point of idea, it would be great.

I will make a small example based on your dll.

Regards,

Pacôme

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Problem in debug version, but not release

Postby lindquist » Sun Jan 08, 2006 23:08

I meant to write that I do not have access to visual studio.
I dunno what it is. I think the templates are complaining. But I really dont know. You'll need to get some kind of information of where inside subscribeEvent it's going wrong. cant you make a program database even though you're in release mode?

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

Re: Problem in debug version, but not release

Postby CrazyEddie » Tue Jan 10, 2006 09:30

Pacome wrote:
It doesn't depend on the version of Visual Studio : we've tested with VS2003 and VS2005, the result is the same.

The results are:
- EXE-Debug + DLL-Debug => OK
- EXE-Release + DLL-Release => OK
- EXE-Debug + DLL-Release => Crash on subscribeEvent.


You can't mix release and debug mode DLLs. The reason for this involves use of new/delete operators across module boundaries. When all parts use the same debug/release mode they all share the same heap (that of the C++ runtime dll), when you mix and match, some parts will use the release C++ runtime and others will use the debug C++ runtime - if this results in memory allocated on one heap being released on another, then you will get the kind of trouble you are seeing.

So, in short, always make sure that all of your exe and dll modules are linked to the same runtime (most easily achieved by not mixing release and debug components)

CE.

User avatar
Pacome
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 02, 2005 11:54
Contact:

Re: Problem in debug version, but not release

Postby Pacome » Tue Jan 10, 2006 10:16

Then, it means the solution is quite easy to get : overriding new/delete/malloc/free operators in order to let all memory management being done in the same heap.

I had this problem long time ago, and it could be solved very easily.

In EaseCore (which is opensource and downloadable at www.ease-production.com), there is a class called "CAllocateable". The new/delete/malloc/free operators have been overriden for this class, and they're called inside EaseCore even if you create an instance of CAllocateable in another library.
All the classes used in EaseTools are derived from CAllocateable, and then you are sure that you can create or delete all your instances where you want.

The two files are:
- Allocator.h
- Allocator.cpp
in EaseCore (you can get in EaseWrapperSDK).

It could be a good idea to make it safe.

Best regards,

Pacôme


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 6 guests