Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » 07-06-23 Dev - MemoryDumpLeaks not member of UPP on Mac
07-06-23 Dev - MemoryDumpLeaks not member of UPP on Mac [message #10187] Sun, 24 June 2007 05:12 Go to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
In the latest development version as of 2007-06-23 (~18:00 CDT) on a Mac, I am getting errors related to MemoryDumpLeaks not being a member of UPP on line 478 of Core.h [in ~MemDiagCls()].

I am looking for the cause now, any ideas which might speed my search along?

Robert
Re: 07-06-23 Dev - MemoryDumpLeaks not member of UPP on Mac [message #10191 is a reply to message #10187] Sun, 24 June 2007 11:13 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kcabobert wrote on Sat, 23 June 2007 23:12

In the latest development version as of 2007-06-23 (~18:00 CDT) on a Mac, I am getting errors related to MemoryDumpLeaks not being a member of UPP on line 478 of Core.h [in ~MemDiagCls()].

I am looking for the cause now, any ideas which might speed my search along?

Robert


Yes, I think this is related to the fact that I had to disable U++ memory allocator on Mac - and seems like the part about memory leaks detector was not excluded, try this (Core.h 470):

#if (defined(TESTLEAKS) || defined(_DEBUG)) && defined(PLATFORM_POSIX) && !defined(PLATFORM_OSX11)


//Place it to the begining of each file to be the first function called in whole executable...

//$-
struct MemDiagCls {
	MemDiagCls()  { if(!UPP::sMemDiagInitCount++) UPP::MemoryInitDiagnostics(); }
	~MemDiagCls() { if(!--UPP::sMemDiagInitCount) UPP::MemoryDumpLeaks(); }
};
static const MemDiagCls sMemDiagHelper;
//$+


#endif


It is in fact quite interesting issue:

There is quite strong leak/boundary checking mechanism in U++.

Interestlingly, due to the fact that Carbon libraries are written in C++, overloading operator new (and delete) overloads it for Carbon too.

And now comes the fun: U++ allocator seems to have detected "write past the end of buffer" problems in Carbon... (also possible that I have misinterpreted the issue or there is something else, but this seems to be the case...)
Re: 07-06-23 Dev - MemoryDumpLeaks not member of UPP on Mac [message #10196 is a reply to message #10191] Sun, 24 June 2007 20:37 Go to previous message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
I had commented that section out, and it compiled. Uncommenting, and adding your patch worked as well.


Has anyone else had issues related to menus not working (not appearing at all, but no errors, exceptions, assertions, etc...)?
Previous Topic: Stupid X11 Xdnd problem...
Next Topic: Linux theide idle from vnc
Goto Forum:
  


Current Time: Sun May 05 17:28:40 CEST 2024

Total time taken to generate the page: 0.01937 seconds