[ODE] Drawstuff memory problem on OS X
Robin Harper
rharper2 at bigpond.net.au
Sun Nov 6 18:04:57 MST 2005
I have the same problem with the memory leak. Traced it to dsDrawCylinder()
and then just hacked in a work around similar to the one Bryan suggested.
The leak only appeared when I upgraded to 10.4 it wasn't present in earlier
versions of OSX.
Robin
On 1/11/05 9:01 PM, "Bill Sellers" <wis at mac.com> wrote:
> Hi Bryan,
>
> I use it quite extensively on MacOSX and can't say I've noticed any
> problems. There's certainly nothing in the code that allocates memory
> in the routine as far as I can see. Mind you I have hacked around
> with drawstuff a fair bit - I don't use the library but include the
> source directly. That way I can compile it as C++ and get rid of all
> the single/double precision duplicates and let function overloading
> handle all that for me. I don't use textures or shadows though...
>
> Cheers
> Bill
>
> On 31 Oct 2005, at 21:41, thibodea at cs.umass.edu wrote:
>
>> Hi -
>>
>> drawCylinder() in drawstuff.cpp is creating a memory leak on my OS
>> X machine
>> (10.4.2). It seems that any program that calls dsDrawCylinder(),
>> including the
>> test programs built by ode (though I didn't exhaustively check them
>> all) will
>> take up more and more memory as it runs. My simulation takes about
>> 90M of VM if
>> I don't draw cylinders, but will climb to over 400M of VM in a
>> minute or so if I
>> am drawing 2 cylinders per time step. I tested both the CVS
>> version and the 0.5
>> release and found the same problems. I was able to work around the
>> problem
>> using gluCylinder() and gluDisk() inside of dsDrawCylinder()
>> instead of
>> drawCylinder().
>>
>> I don't know enough about OpenGL to figure out why the the original
>> drawCylinder
>> () is causing problems on OS X. Also, I couldn't reproduce the
>> problem on a
>> linux machine. I don't know how many people actually use the
>> drawstuff
>> libraries, but this problem does keep some of the example programs
>> from running
>> smoothly on OS X for any length of time.
>>
>> If anyone can suggest a potential fix, or suggest why the original
>> function is
>> problematic on OS X, I'll try to debug the original function if I
>> get a chance.
>> It is also possible that other functions in drawstuff also cause
>> the same
>> problem, but I haven't gone through and tested them all. The
>> dsDrawBox()
>> function seems to work OK.
>>
>> Bryan
>>
>> -------------------------------------------------
>> This mail sent through IMP: http://horde.org/imp/
>> _______________________________________________
>> ODE mailing list
>> ODE at q12.org
>> http://q12.org/mailman/listinfo/ode
>>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
More information about the ODE
mailing list