Nobody can tel lyou anything without any actual info about your project, effects used, footage types, render settings and so on.
do you want me to send the after effects project or just a list of the effects used?
List of the effects used would be a good place to start.
Exact version of AE would be useful too.
Just so you know, 12 GB isn't a lot. 16 GB is the amount of RAM I would suggest to start with for AE. I wouldn't want any less!
Anyway, that error message seems to indicate you've got some effect applied somewhere that is making AE see at least one of your layers as absolutely HUGE and is running out of memory trying to handle it.
I have the same issue; I'am working on a 4 layers file with Stretch&Slide effect applied on two layers, the whole thing is 8 seconds long; I have 64 GB RAM installed on a MacPro 8 Core, SSD.
I forgot to tell you that RAM preview runs nice and smooth.
Is your ram preview at half resolution?
What kind of layers do you have that Stetch & Slide animation preset applied to? If they are video or still images, what size are they?
Are you still facing this issue? Please let us know so that we can assist you further.