Memory leak -> Hard crash (18.1.4)

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

NotJessePinkman

  • Posts: 4
  • Joined: Thu Mar 30, 2023 1:26 pm
  • Real Name: John Russell

Memory leak -> Hard crash (18.1.4)

PostThu Mar 30, 2023 1:41 pm

Hey everyone!

Been using Resolve for a few years already and I already had memory leaks on previous versions but a solution was never really found for it.

Yesterday I tried editing a project with 2-3 video files that are between 3 and 6 hours in length, and between 20 and 52GB in size.

It worked quite okay, I managed to render one of the smaller videos even.
However, the longer video (~6h in length) rendered to around 90% and then crashed DaVinci.
I didn't even notice until I was back at my PC.

Today I tried editing again and was just moving stuff around in the timeline for another video in the project.

I saw my RAM usage shoot up quite a bit and at some point Resolve crashed completely. Again.
Nothing in the event viewer either.

The log can be downloaded here, since I can't attach it as it's 1.5MB in size (and the limit is 1MB)
https://drive.google.com/file/d/1Q1ZRde ... share_link

Tried starting it again and checked my RAM usage - all of a sudden it was sitting at 98%.
However, on first observation, Resolve was only using about 16GB, which is like 25%.
Then I saw that there was a ghost process that didn't fully closed still lingering in the background.
Attachments
1680182940-54832.png
RAM usage 2
1680182940-54832.png (6.73 KiB) Viewed 1074 times
1680182915-54830.png
RAM usage 1
1680182915-54830.png (52.66 KiB) Viewed 1074 times
Last edited by NotJessePinkman on Fri Mar 31, 2023 3:02 pm, edited 1 time in total.
-- Resolve 18.1.4 Studio
-- Windows 11 Pro 22H2
-- AMD Ryzen 5950X
-- 64GB (2x32GB)
-- NVIDIA RTX 3090, 24GB VRAM, 531.41 Studio Driver
-- Cache: M.2 SSD
Offline

Peter Chamberlain

Blackmagic Design

  • Posts: 13944
  • Joined: Wed Aug 22, 2012 7:08 am

Re: Memory leak -> Hard crash (18.1.4)

PostFri Mar 31, 2023 7:45 am

6 hrs is long... try rendering in 1 hr chunks to an intermediate format and then stitch together for a final render.
DaVinci Resolve Product Manager
Offline

NotJessePinkman

  • Posts: 4
  • Joined: Thu Mar 30, 2023 1:26 pm
  • Real Name: John Russell

Re: Memory leak -> Hard crash (18.1.4)

PostFri Mar 31, 2023 10:21 am

Hey Peter! Thank you for the fast response

After a bit more testing it seems that I'm encountering 2 different issues instead of just one.

The rendering issue being the first, where it crashes around 90%.
I checked the log files and it threw some errors in regards to the NVIDIA decoder:

Code: Select all
[0x0000cc50] | IO                   | ERROR | 2023-03-30 19:48:26,824 | Nvidia codec fails to decode output after reaching maximum decode surfaces
[0x0000cc50] | IO                   | ERROR | 2023-03-30 19:48:26,824 | 3rd Party Decode Err(Failed to decode the video frame.)
[0x0000cc50] | IO                   | ERROR | 2023-03-30 19:48:26,824 | Failed to decode clip <E:\Videos\Stream\2023-03-26 18-58-08 - THPS1-4 Speedrun Race.mp4>, track 0, frame 1192625: Failed to decode the video frame.
[0x00009294] | IO                   | ERROR | 2023-03-30 19:48:26,825 | Nvidia codec fails to decode output after reaching maximum decode surfaces
[0x000024d0] | GsManager            | INFO  | 2023-03-30 19:48:27,326 | Recording cancelled after 1192645 frames.


And yeah, 6h is a bit long indeed. I've tried rendering only the first 3h into H265 with NVIDIA's hardware decoder enabled, and then the other 3:15h without it as a test, which worked. Combining the 2 files via. an ffmpeg command (concat) was giving an okay result, but there's a slight "jump" where the 2 files are combined, so I'd like to avoid this if possible.

The 2nd part used a fair bit more of my CPU, but that isn't too big of a deal since when I'm rendering I don't use the computer as much so my 16-core CPU can do the work with no issues :)

____________________________

As for the 2nd issue, the memory leaks (or what I presume to be):
I've noticed that my RAM goes up by a huge amount when seeking through some videos.

When sitting in the Project Manager screen:
~ 1.2GB

Loading the project into one of the timelines with a 3h video (H264 encoded):
~ 9.3GB

Another timeline with a different 3h video (H265 encoded):
~ 16.4GB

The 3rd timeline with another 3h video (H265 encoded):
~ 23GB

And the last timeline with the big 6:30h video (H264 encoded):
~ 36GB

I've tried pushing it further, towards the limit of my RAM (64GB total).
In "Preferences -> Memory and GPU" I've set "Limit Resolve memory usage to" to 48GB (slider to the right)

After dragging a few more files in it seems to kinda "level" at around 42.5GB, no matter what else I throw at it.
So ultimately, I think the crashes I got were because of that NVIDIA decoding issue up there as well when scrubbing through the timeline.

Is there anything else I could provide to further help you guys look into that issue in that case?
Last edited by NotJessePinkman on Fri Mar 31, 2023 8:31 pm, edited 2 times in total.
-- Resolve 18.1.4 Studio
-- Windows 11 Pro 22H2
-- AMD Ryzen 5950X
-- 64GB (2x32GB)
-- NVIDIA RTX 3090, 24GB VRAM, 531.41 Studio Driver
-- Cache: M.2 SSD
Offline

Steve Alexander

  • Posts: 4576
  • Joined: Mon Mar 23, 2015 2:15 am

Re: Memory leak -> Hard crash (18.1.4)

PostFri Mar 31, 2023 1:24 pm

What's going on with that second instance of Resolve.EXE, Peter? That shouldn't be possible, should it?
Time Traveller
Resolve Studio 19.0b1 | Fusion Studio 19.0b1 | Win 11 Pro (22H2) | i9-7940x, P4000 (536.96, 8GB VRAM), 64GB RAM, M.2 boot, SSD scratch, RAID10 data | (laptop) 16" MacBook Pro M1 MAX, 32 GPU cores, 64 GB RAM, 2 TB SSD, Sonoma 14.4.1
Offline

NotJessePinkman

  • Posts: 4
  • Joined: Thu Mar 30, 2023 1:26 pm
  • Real Name: John Russell

Re: Memory leak -> Hard crash (18.1.4)

PostFri Mar 31, 2023 1:38 pm

Steve Alexander wrote:What's going on with that second instance of Resolve.EXE, Peter? That shouldn't be possible, should it?

This actually happens every time I close Resolve normally.

It takes FOREVER for it to actually close and I can observe it dumping, or rather using less and less RAM until it reaches a point where the process closes
-- Resolve 18.1.4 Studio
-- Windows 11 Pro 22H2
-- AMD Ryzen 5950X
-- 64GB (2x32GB)
-- NVIDIA RTX 3090, 24GB VRAM, 531.41 Studio Driver
-- Cache: M.2 SSD
Offline

Steve Alexander

  • Posts: 4576
  • Joined: Mon Mar 23, 2015 2:15 am

Re: Memory leak -> Hard crash (18.1.4)

PostFri Mar 31, 2023 3:09 pm

That I've seen, but you shouldn't be able to launch an new instance of Resolve until the first has fully closed, IIRC.
Time Traveller
Resolve Studio 19.0b1 | Fusion Studio 19.0b1 | Win 11 Pro (22H2) | i9-7940x, P4000 (536.96, 8GB VRAM), 64GB RAM, M.2 boot, SSD scratch, RAID10 data | (laptop) 16" MacBook Pro M1 MAX, 32 GPU cores, 64 GB RAM, 2 TB SSD, Sonoma 14.4.1
Offline

NotJessePinkman

  • Posts: 4
  • Joined: Thu Mar 30, 2023 1:26 pm
  • Real Name: John Russell

Re: Memory leak -> Hard crash (18.1.4)

PostSun Apr 02, 2023 1:10 pm

Status update on this:

I had to edit an even longer video, ~7:30h, and then render it to a single file for a YouTube upload again.

This time I had NVIDIA's hardware decoder enabled.

It rendered perfectly fine, no error came up.

I only cut the video in 5 parts (2 of which I had to edit some audio out of), so effectively I had 5 sections of the same clip in the timeline.

Going back to the other project where I had to cut way more which caused the NVIDIA decoder issue, I noticed I didn't cut the video at all, only the audio.

However, I also added a Text+ effect every time where I had to cut the audio.
A total of 21 times, to be precise.

Maybe it was because of those?
I'll disable them and try to re-render that project / video again in full with the NVIDIA decoder, then edit this post.

I should additionally mention that during the 7:30h H265 render (which had a source video that was also in H265) the VRAM of my GPU was not reaching it's limit at any point. It was at a steady 5GB usage (I think I saw it at like 4.5GB before starting the render)

This applies to the H264 source video right now during rendering as well. However, the Video Decode of my GPU (RTX 3090) is at around 73%, while it was only at around 34% for the H265 source video. Perhaps NVIDIA's H265 decoder just performs better / more efficiently than the H264 one?

Edit:
I've successfully managed to render the other project again without the Text+ effects / elements.

Gonna put them back in and try to render again.

Edit 2:
The video rendered perfectly fine even with the Text+ effects / elements.

I... have no idea why this works all of a sudden. I didn't open any of the other timelines in this project, and I didn't change anything else.

I also don't want to call this whole thread / issue a "fluke", seeing as Mads has gotten that same NVIDIA error in his thread here as well: viewtopic.php?f=21&t=178561

Additionally, here are 2 more logs archives that are around 250MB each in size. No idea why the .dmp was filled this much, but that sure caught be my surprise:

https://drive.google.com/file/d/1pn7fH0 ... share_link
https://drive.google.com/file/d/1ecww_h ... share_link
-- Resolve 18.1.4 Studio
-- Windows 11 Pro 22H2
-- AMD Ryzen 5950X
-- 64GB (2x32GB)
-- NVIDIA RTX 3090, 24GB VRAM, 531.41 Studio Driver
-- Cache: M.2 SSD

Return to DaVinci Resolve

Who is online

Users browsing this forum: OnThePath, Rick van den Berg and 205 guests