people say there are no stupid questions, well, this one was.
There was a clear typo in my code which led to a memory error