Hi,
Unfortunately your problem does relate to the painted shader. It doesn't function correctly and can crash when the amount of data reaches a certain limit. The work around is really to use a number of painted shader nodes as opposed to one big one, if you see what I mean. I'm embarassed this hasn't been fixed yet and will try and it get it dealt with as a high priority bug.
Regards,
Jo