Invalid BitmapData

So I’m prototyping a blitting engine and have to rotate and draw bitmaps, store in array and copy them later.
Most of the time it works great but when I’m doing larger images I get this:

[Fault] exception, information=ArgumentError: Error #2015: Invalid BitmapData.

At first I assumed the bitmaps were too big and failed to initialize due to hitting the size limit. After a little trial and error I put in a trace to see if any were being created at all.
Here’s the strange thing, it draws a whole bunch of bitmapDatas all the same size before suddenly deciding to throw this error half way through the array.
Sometimes it stops at 20, 60 or 100 but usually around the same number depending on the size of the bitmap.

Does openfl have different size limitations compared to flash?
Could this be due to memory limitations on Flashplayer, and if so how do I fix it?
I already looked into the settings panel but the slider to set memory isn’t there anymore :s

Hmm, it could be a Flash Player memory issue. Are you sure the size is small enough? Flash throws this error when a BitmapData is too large

Yeah, that’s what I thought.

I checked the width, height and total number of pixels, all checked out fine.
The problem only occurs when I make a whole bunch of them, and you get fewer valid bitmaps when they are larger which is why I think it’s a memory issue.
Have they changed how you set memory limits on the player? I can’t find the slider in the settings menu.

I haven’t seen any way to change it. Is it also different on the desktop in a standalone player, versus in the browser?