Go to Post We can't turn off inspiration and recognition, development and learning with a switch. It is an on-going process. If it were not, there would be no need for CD except for 6 weeks out of the year. - JaneYoung [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-24-2015, 10:55 PM
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
No robot code after running for a while (Java VM ran out of memory)

During practice, our drivers complained that after running the robot for a while, the robot would disconnect and said "No Robot Code" until we reboot the RoboRIO, couldn't even "Restart Code", must do a RoboRIO reboot. I finally looked into the problem and found out the Java VM ran out of memory.
This is the first year our team switched over to Java. We used C++ in previous years. We have a C++ library that we ported over to Java. One of the modules is Vision Targeting. I suspect this module is "leaking memory". In our C++ implementation, we allocated memory for processing the video frame and freed it when we are done with the frame. But in Java, there is no "free memory" because Java relies on the garbage collector to reclaim memory. I suspect the reclaim process is not immediate and depends on if the Java VM can detect the memory is no longer in use. So if we are processing video frames at some frame rate, we are losing memory on the video frame at frame rate. That could be substantiate after a while. How would one deal with this kind of issues? Sorry if this is a naïve question, we are new to Java.
__________________
Reply With Quote
 


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 08:04 AM.

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