Frequent "Internal Error" in VS2017 with TinCLR 0.5.0 on BrainPad

Roughly 45% of the time that I build and deploy a TinyCLR application (known working) through VS2017 for my BrainPad (running TinyCLR 0.5.0), I get the following sequence in the VS2017 output window:

Failed allocation for 1026 blocks, 16416 bytes

The thread ‘’ (0x2) has exited with code 0 (0x0).
The program ‘[2] TinyCLR application: Managed’ has exited with code 0 (0x0).
Internal error: call to memory allocation during garbage collection!!!

The last line is what I’m concerned about. I can’t try the build/deploy again until I physically reset the BrainPad board.

This is not a showstopper, because trying again works (most of the time). But I’m curious what might be going wrong.

Any ideas where this is coming from, and if there’s something I can do to avoid it?


1 Like

Known issue. This is really bugging me so I am complaining to the team about this daily.


Thanks for the follow-up.

I have seen this message issued in the constructor of the
Display class(Brainpad assembly) , reflector shows a new byte[0x4000] in there
so I suspect that’s the culprit.

no sorry, it is a new byte[0x401] .
not sure if that is the problem, but I still get the allocation failure in the constructor of Display

Correct, we are working on this.