More power to JointLibrary

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: More power to JointLibrary

Postby kallaspriit » Thu Jan 14, 2010 9:01 am

I am using memory leak detection on Windows and Ogre does not leak if used properly :wink:
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: More power to JointLibrary

Postby Julio Jerez » Thu Jan 14, 2010 10:54 am

just for the record Netwon does not leak either.
In teh SDK and the tutorial I too use Windows Leak Tracker and there are no leaks on exit, althoh GLUI is sus a crappy library tha leave leak behind.

I will add teh windwo Leak Traler to OgreNewt app and see if I can reolve those, we cannot have that.
Code: Select all
_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF|_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF));


also so you guys know what I am doing, I am completing the Collada interface, I have the importer and export completer and integrated in the Netwon SDK
I also conver all the sample file to .DAE format, Now I am doing the Physics Scene exporter, soon I will post beta 17 with this new addition and then add it to OgreNewt.
with this interface it will be verye easy to make complete game scenes using OgreNewt with Ogree.
Also there will be a Binary output the will same the same data base so final assets do not nessarilly have to have XML

what modeling package are the people using Ogre are use?
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: More power to JointLibrary

Postby PJani » Thu Jan 14, 2010 11:24 am

I use 3d Max and OgreMax exporter, i am trying to use Blender but i dont have nerves for that. :)

Anyway maybe i am forgeting to delete something in some manager i dont know. I need to try to turn on Ogre leak detector.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: More power to JointLibrary

Postby Julio Jerez » Thu Jan 14, 2010 11:49 am

I am tryin to add teh Memory leak traking to teh SDK bu fo rteh I nee to get dirty and for teh Memory leak in teh crappu GLUI
the never delete new control the just keep adding them to the list and never remove them
in it did never occur to thso emoron to remove a controll form the master windoe, you cna only add them and the never get destroyed,
void add_cb_to_glut_window(int window,int cb_type,void *cb);

GLUI is the worse library I have ever came across in my life.
I have to modify the destrutor from this
Code: Select all
GLUI_Master_Object::~GLUI_Master_Object()
{
}

to this

Code: Select all
GLUI_Master_Object::~GLUI_Master_Object()
{
   GLUI_Glut_Window* window;
   window = (GLUI_Glut_Window*) glut_windows.first_child();
   if (window) {
      delete window;
   }
}
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: More power to JointLibrary

Postby PJani » Thu Jan 14, 2010 12:42 pm

I cant stand to see GLUI. :)
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: More power to JointLibrary

Postby Julio Jerez » Thu Jan 14, 2010 1:19 pm

I had it with GLUI it is almost improsible to fix teh Bug,
I will be simples to just replace it, what do you guy use for light weight GUI with GLUT.
some one metion one before bu I forgot.

I am not spending one more minute in GLUI anymore. not only is GLUI bogus but it also malfution on the Mac and Linux
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: More power to JointLibrary

Postby PJani » Thu Jan 14, 2010 2:13 pm

Julio Jerez wrote:I had it with GLUI it is almost improsible to fix teh Bug,
I will be simples to just replace it, what do you guy use for light weight GUI with GLUT.
some one metion one before bu I forgot.

I am not spending one more minute in GLUI anymore. not only is GLUI bogus but it also malfution on the Mac and Linux


Hmm i dont use GLUT at all becouse of all creashes...In ogre i use CEGUI which is very heavy and big library, it works in GLUT too but im sure its too complicated for light use as yours.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: More power to JointLibrary

Postby Julio Jerez » Sun Jan 17, 2010 10:02 pm

Stucuk wrote:It is funny how stuff done by even the "Professionals" have memory leaks. There are quite a few of Borlands own components which leak memory and they invented Delphi...

You are going to love this then. About 4 years ago I was looking for a Format to save physics file and I when to the Collada public forum.
I did not have a really good experience there but nevertheless less I use the library to make the Netwon file viewer. Back then the API was full of Bugs and Memory leaks.

4 years later and the API still have the same bugs plus not only have the same bug is have I has grouw exponentially in size. Downloading that Behemoth takes almost 3 hour and occupies about 100 gigabyte of space in my drive.
I just water a week of my time cleaning up the collada 1.4.1 and 1.5 and both of then a full of bug and leak. the code in Collada leave ton of leaks, because it does not release the meta data and there is no point of fixing it since the * is automatically generated

To give you an Idea the kind of mediocrity I am talking about here is an example of what leav lot fo Leack behind

Code: Select all
   DAE* dae;
   daeInt error;
   daeURI* uriName;
   daeDatabase* database;
   daeDocument* document;

   // create a new collada object
   dae = CreateDAE ();
   _ASSERTE (dae);

   daeInt error;
   daeDatabase* database;
   daeDocument *document;

   database = m_collada->getDatabase();
   error = database->insertDocument ("mainDoc", &document);

   delete dae;
   DAE::cleanup();

thta is how the docs say it should be and how they say is should be in the forum.
After spending a day trying to figure out I decide to read the forum, and guess what everyone have the same issue.
https://collada.org/public_forum/viewtopic.php?t=325&

There is no way I can release some wit h the king of problems, I will try FCollada maybe I have a better luck there.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: More power to JointLibrary

Postby Julio Jerez » Sun Jan 17, 2010 10:15 pm

The kicker is that it appear the the peopel whow make FCollada, desided it taht ther no longer wnat to give away for free, now it look liek yo unee to pay for it.
It looks like the Collada project is a futile effort since Collada appear to be dead in the waters.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: More power to JointLibrary

Postby Julio Jerez » Mon Jan 18, 2010 10:49 am

well since I coudl no find any alernative to Collada Dom, teh Newt Collada is umbearble, as if it was complex enoght teh now added about 5 tiem as meny dependencies, it is almos liek teh do o want peoel to use teh *.
and I can not find the the FCollada alternative, I have no choice bo to get dirty and fix version 1.4.1 that I have

hophuly teh added a memory manager, all i have to do was raplace it with one teh kepp trakc of teh Leak and relete whine teh last collada element is restroyes.
here is the new memory manage.

Code: Select all
static std::set<void*> memoryLeakTracker;
daeRawRef
daeMemorySystem::malloc(daeString pool, size_t n)
{
   (void)pool;
//   void *mem = ::malloc(n);
   char* mem = new char [n];
   memoryLeakTracker.insert(mem);
   return (daeRawRef)mem;
}

void
daeMemorySystem::free(daeString pool, daeRawRef mem)
{
   (void)pool;
//   printf("free[%s] - 0x%x\n",pool,mem);
//   ::free(mem);

   char* memPtr = (char*) mem;
   memoryLeakTracker.erase(memPtr);
   delete[] memPtr;
}

void daeMemorySystem::cleanup()
{
   while (memoryLeakTracker.size()) {
      daeMemorySystem::free("any", *(memoryLeakTracker.begin()));
   }
}


this Collada library is very bad, we need a better solution, maybe one day I take Bison of Yacc and write a replacement to write one from the Schema
anyway it seem to work now and I can continue with this. I do no wnat to stopp it afte I put so much time on it, but man teh perosn how mention it si hard to find good sofwaere was wrong,
teh right statement is, "It is hard to find open source free software" 99 ou of 1 hundre open source SDK is plin and simpel bugus.
form Linux and you name it it is bugus.
I once have a Linux version that literatly damage a brand new latop drive and I have to take to the retailer to replace the disk. and this was Madrake whsi is suppist to be very good.
GLUI, is a joke crashe randomtly in wondoe 64 running in 32 bt mode, lus it leaf ton of leaks,

so far the only two good open source library if found that meet profetional stanadar that are: WxWidgets, and Ubuntoo Linux.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 490 guests