Error Code: -40 with PNGs

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

Nathan Shirley

  • Posts: 103
  • Joined: Fri Jan 12, 2018 6:43 am

Error Code: -40 with PNGs

PostWed Dec 08, 2021 2:49 am

I'm getting the following error message:

"The GPU failed to perform image processing because of an error."

"Error Code: -40."

I'm seeing this after adding a lot of very high resolution PNG files into the media pool, but most are not yet on the timeline. I can dismiss it and all seems to work, but it pops up fairly frequently.

Any ideas what the issue might be? Over half of my RAM is still available.

Running Resolve Studio 17.3.2 Build 8
Online
User avatar

Uli Plank

  • Posts: 21737
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: Error Code: -40 with PNGs

PostWed Dec 08, 2021 4:06 am

It's not about RAM, but VRAM. How much do you have and what's the resolution of your PNGs?
Now that the cat #19 is out of the bag, test it as much as you can and use the subforum.

Studio 18.6.6, MacOS 13.6.6, 2017 iMac, 32 GB, Radeon Pro 580
MacBook M1 Pro, 16 GPU cores, 32 GB RAM and iPhone 15 Pro
Speed Editor, UltraStudio Monitor 3G
Offline

Nathan Shirley

  • Posts: 103
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Error Code: -40 with PNGs

PostFri Dec 10, 2021 8:23 am

My GPU has 8GB and Task Manager shows its use fluctuating between 2 and 6GB being used. Although it does seem like that error code often pops up when it swings up towards 6GB, so perhaps it's actually hitting 8 and failing.

The PNGs range from about 1,000 to 2,200 pixels high, but they're extremely wide, anywhere from 12,000 to over 30,000 pixels. Although they're monochrome and all less than 1 MB in size. When I had only one of them in the media pool and only one in the timeline (via Fusion), I had no issues at all. Once I put about 60 in the media pool I started getting the errors, and trying to put a second one into the timeline (also via Fusion) either crashes Resolve, or just doesn't display the image (and everything suddenly runs extremely slowly).

So I suppose it's trying to load all 60 of these into the VRAM in some memory-intense sort of way? Is there a way to tell it not to do that, only loading the images actually in the timeline? I guess if I have to I can work on each one as its own project, though it wouldn't be very convenient.

(Now on 17.4.2. Same issue.)
Online
User avatar

Uli Plank

  • Posts: 21737
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: Error Code: -40 with PNGs

PostFri Dec 10, 2021 9:01 am

If that's an Nvidia GPU, it seems 'normal'.
Now that the cat #19 is out of the bag, test it as much as you can and use the subforum.

Studio 18.6.6, MacOS 13.6.6, 2017 iMac, 32 GB, Radeon Pro 580
MacBook M1 Pro, 16 GPU cores, 32 GB RAM and iPhone 15 Pro
Speed Editor, UltraStudio Monitor 3G
Offline

Nathan Shirley

  • Posts: 103
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Error Code: -40 with PNGs

PostFri Dec 10, 2021 5:33 pm

Actually it's an AMD RX 580 (and Ryzen 5600X CPU).

At this point I'm going to try removing all these files from the media pool and just add one at a time until I have an issue, then start a new project and continue the process.

Any ideas if there's a way to tell Resolve to not load (or whatever it's doing with these PNGs that aren't even in the timeline yet) specific files in the media pool?
Offline

Nathan Shirley

  • Posts: 103
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Error Code: -40 with PNGs

PostFri Dec 10, 2021 5:57 pm

Oh, it actually seems like I've hit Resolve's old 16k file limit. I thought that had been lifted, but apparently you still can't use files that exceed 15,360 pixels wide or 8,640 tall. But now they do display in the media pool (before their thumbnails wouldn't render at all).
Offline

MattSteeves

  • Posts: 60
  • Joined: Fri Oct 30, 2015 5:14 pm

Re: Error Code: -40 with PNGs

PostWed Dec 15, 2021 5:24 pm

Also, check that it's in RGB space and not CMYK
Offline
User avatar

TheBloke

  • Posts: 1905
  • Joined: Sat Nov 02, 2019 11:49 pm
  • Location: UK
  • Real Name: Tom Jobbins

Re: Error Code: -40 with PNGs

PostWed Dec 15, 2021 6:11 pm

Yeah, looks like you can't get any image bigger than 16384 wide or tall in a timeline. 16384x16384 works, but (for example) 16386 x 16384, or anything higher, just shows a black screen. At least those are the numbers I found when outputting from a Fusion composition; I didn't test with media files.

You could do it all in Fusion though, accessing the images via Loader nodes - which bypasses the Media Pool entirely, and also avoids still image caching problems caused by using MediaIn nodes for still images in Fusion. A secondary issue of using MediaIn is that it will bring the images in as float32 - even when they could be loaded as int8. A Loader will use the depth found in the file, and given your images are monochrome, int8 is probably fine. An int8 image uses four times less RAM and VRAM than a float32 one does, which could get pretty significant when your images are 2000 x 30000.

So, I'd suggest making a Fusion Composition that loads the image(s) via one or more Loader nodes, then scales / crops the images in whatever way desired down to timeline resolution, then outputs the result to the timeline via MediaOut. Eg maybe you have a UHD or HD timeline on which you want to display your supersized images, after scaling them to timeline res.
Resolve Studio 17.4.3 and Fusion Studio 17.4.3 on macOS 11.6.1

Hackintosh:: X299, Intel i9-10980XE, 128GB DDR4, AMD 6900XT 16GB
Monitors: 1 x 3840x2160 & 3 x 1920x1200
Disk: 2TB NVMe + 4TB RAID0 NVMe; NAS: 36TB RAID6
BMD Speed Editor
Offline
User avatar

Marc Wielage

  • Posts: 11044
  • Joined: Fri Oct 18, 2013 2:46 am
  • Location: Hollywood, USA

Re: Error Code: -40 with PNGs

PostThu Dec 16, 2021 9:17 am

I would suggest not using stills bigger than 8K x 8K. Any bigger and you're going to run out of steam. I don't know what the actual size limit is -- it's possible with a powerful enough system, 12K x 12K might work.

Be warned that TIFFs, PNGs, and JPGs are all a bit dodgy if you ever need to do Media Management. My guess is their lack of timecode doesn't help.
marc wielage, csi • VP/color & workflow • chroma | hollywood

Return to DaVinci Resolve

Who is online

Users browsing this forum: Geoff Treseder, Haryanto, oliwend, pperquin, Rick van den Berg, Shrinivas Ramani, Uli Plank, zareone and 162 guests