Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get "LLVL Error: out of memory" with large number of blocks #15

Open
fovea1959 opened this issue Feb 28, 2021 · 1 comment
Open

Get "LLVL Error: out of memory" with large number of blocks #15

fovea1959 opened this issue Feb 28, 2021 · 1 comment

Comments

@fovea1959
Copy link

Using 1.4 (can't use 1.4.1, not on WPILIB 2021), we get "LLVL Error: out of memory" when we get a result with a large number (>10) of blocks.

We are SPI connected.

Working around it right now (better Pixy tuning!), will dig into it after March with a test case.

@PseudoResonance
Copy link
Owner

That sounds like a crash caused by the underlying C libraries, so it's probably out of the scope of this project. I think it's probably due to the internal data buffer filling up? The Pixy2 can send a lot of data at once, and I vaguely remember having this error in the past with a lot of blocks.

I don't really know a ton about the inner workings of WPILib, but I'd guess it's somewhere around here in SPIJNI.cpp, perhaps with the resizing of the buffers. Pixy2JavaAPI works by receiving a header for the packet that gives a size, which will eventually result in JNI calling this spiReadB method, and resizing the buffers to match the size requested by my API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants