View Single Post
  #12   Spotlight this post!  
Unread 18-03-2016, 10:32
adamzg adamzg is offline
Mentor
AKA: Adam
FRC #3932 (Dirty Mechanics)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2008
Location: Boynton Beach, FL
Posts: 16
adamzg is an unknown quantity at this point
Re: WPILIB Camera Code Crashing JVM

Quote:
Originally Posted by Joe Ross View Post
What happens if you make image a class variable? Allocating and deallocating it are expensive.

It also looks like you are using last years JRE.
We originally had Image as a class variable, but after looking at how it was used we made it local. Image is used to allocate memory for the native call way down the line so having it as a member variable leads to concerns about not being able to release the memory, thus the finally block. Having it as a member variable could potentially result in a memory leak which would first hurt performance and could ultimately crash the program with an out of memory exception.

We flashed all our roboRIOs this year, what makes you think it's last years Java version? I'll check on our end to make sure the RIOs are all running build 1.8.0_06-b23, I don't think they would work at all if we hadn't flashed them. Can you post a link or provide info. on why you think the JVM version is wrong and where/how we'd get the right one?

Thanks for your help!
Reply With Quote