Have you tried a Google search on this error code?
Although clearly what it means for your particular project can have to do with the version of the program you're using and on what operating system. (Most of the Google hits refer to Windows 8. Is that what you're running?) It may also be related to what processor you have and how much RAM as well as how much free, clean, defragmented space is on your hard drive.
And, as you suggest, it can also be related to the format of video you are editing and the length of your project -- and certainly unnecessarily large photos can be a problem. In my books I recommend trying to keep your photos no larger than 2500x1875 pixels in size -- although, since you are working in 4K, those numbers may have to be upped a bit. The program does have a maximum threshold for photo size. What height and width are your photos, measured in pixels?
And are you using any media other than photos in your project?
Version 14 on Windows 10. Pixel size is 5716 x 3215 and the project contains photos, short videos and c copy of YouTube video. The error message seems to be a registry error but does not occur all the time.
Do I therefore need to clean the registry, perhaps?
I'd say it's more likely that your photos are way too large. 4K video is 3840x2160 -- which, despite being ultra high resolution, is less than half the resolution of your photos.
I'd say resizing your photos to 3840x2160 would go a long way toward avoiding rendering errors. Although other factors include your processor, RAM, hard drive free space and the length of your movie. But resizing those photos is definitely a start!
To test this theory, try creating 3840x2160 versions of half a dozen of your photos. Load them into a new 4K project and see if you are able to output a video from this project.