Go to Post Mind you... if your ball kicker has as much energy stored up as a trackball launcher, you ought to be able to kick balls up into the stands. - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-02-2013, 17:06
crs501 crs501 is offline
Registered User
FRC #3157
 
Join Date: Feb 2013
Location: Rochester
Posts: 1
crs501 is an unknown quantity at this point
Memory Leak in Camera Code

After we are done processing an image from the camera, we use the .free() method. However, on the driver station, under the charts tab, the available RAM for the cRIO always decreases with each picture, but never increases to it's previous level. This leads to us running out of memory and unable to take anymore pictures until we reboot the cRIO. We have moved the variables from the method to the class. We believe we are not saving any references to the image. We have released the underlying pointers. However, the problem remains. Has anyone else encountered this problem and if so, how have you resolved the issue?
Reply With Quote
  #2   Spotlight this post!  
Unread 12-02-2013, 20:21
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Memory Leak in Camera Code

For efficiency, all the images in Java are stored as opaque C data structures and have to be explicitly freed. I know you said that you are calling free() in your code, can you make sure that all the intermediate images are also freed?

If it turns out that you are doing that, maybe you could start cutting out some of the vision primitives to see which one is leaking the memory. You could do this by just commenting the code and rechecking. It won't work since the program is getting chopped up, but you can test for the leak.

It's possible that there is a bug in one of the methods and the library is leaking somewhere. This would help isolate that, and we can patch it for you.

Thanks,
Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:10.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi