Closed Splorpy closed 2 years ago
I got the same thing. I bypassed it by starting the stream only with the start(); method and as soon as the first frame is processed the pipeline, I shut down the camera and stop the stream. Though yes @Windwoes pls help :)
Hehe. So, your pipeline has a memory leak, because you are cloning the input mat on every frame and not calling .release()
on the cloned mat. EOCV has a memory leak detector which will trigger global warning message if it thinks there is a reasonable chance that your pipeline is leaking memory.
v1.5.0 of EOCV was compiled against SDK v6.2.1. SDK v7.0 has a minor ABI breaking change because it now requires implementations of the GlobalWarningSource
interface to implement the public boolean shouldTriggerWarningSound()
function. Which means that when the SDK tries to call shouldTriggerWarningSound()
on the EOCV camera object, the JavaVM cries because it's being asked to invoke a function that hasn't been defined in the EOCV bytecode...
This issue escaped my notice because I never tested the memory leak detector when running EOCV on SDK v7.0.
So that being said, you have three options:
Add the following to your pipeline (not recommended!)
@Override
public void init(Mat firstFrame)
{
MEMLEAK_DETECTION_ENABLED = false;
}
I've pushed a v1.5.1 release candidate with a fix to a staging repo, you can access it by adding
maven { url 'https://oss.sonatype.org/content/repositories/orgopenftc-1025/'}
to your gradle repositories block and then changing the EOCV implementation line to 1.5.1
I'm too used to Python haha. .release()
worked perfectly. Thank you both for the help!
I'm re-opening this until I release the fixed version officially
Fixed in 1.5.1
RC has begun to crash consistently a few seconds after init an op mode. Code for the op mode and pipeline are below, followed by the error message. We have a competition in a few days, so any help is appreciated.