Memory allocation failure

Hi, I’ve just had this error in an app:

AddressSanitizer: Out of memory. The process has exhausted 65536MB for size class 208.

My app is using about 1.2g of memory

Error occurred:

void CoreGraphicsContext::createPath (const Path& path, const AffineTransform& transform) const
{
    CGContextBeginPath (context.get());

    for (Path::Iterator i (path); i.next();)
    {
        switch (i.elementType)
        {
        case Path::Iterator::startNewSubPath:
            transform.transformPoint (i.x1, i.y1);
            CGContextMoveToPoint (context.get(), i.x1, flipHeight - i.y1);
```
Any thoughts? cheers

Does it always happen? And if so, at the same point? If yes, comment out the drawing code that creates the path and see what happens. Then figure out what’s special about the path that makes it go into an endless memory allocation loop.

It was about 4 hours runtime, not managed to reproduce again.

I wonder if this is actually AddressSanitizer logging so much stuff that it’s running out of memory. :wink:

Anyway it might be useful to load your plug-in into a DAW like REAPER or AudioPluginHost and attach Xcode’s Instruments and see if there are any memory leaks.

1 Like

there’s no memory leaks in the code - without adress sanitizer on, it holds a steady 1.2 through hours of runtime. i’ve turned the sanitizer off again now to see how long it runs for.