Bad Allocation during export

krimsonviperkrimsonviper Website User Posts: 4
edited February 2018 in HitFilm

I’m trying to export a short film that’s about 2 minutes long and every time I do so, at about 43% it produces an error that says “bad allocation.” Now this is my second video and the first one was twice as long and I had no issues. I’ve tried lowering bit rates and raising bit rates, cleared cache and now I’m about to clear my laptop into traffic. I’m exporting into the YouTube preset, which I did before with no problems. I even just exported one composite part of the video and no problems there. Specifically the section of video that’s is being cut off in export because I can see the partial exported video. What is causing this bad allocation? Could it be the massive windows update that just recently happened? I’ve noticed that after the bad allocation error message arrives, the laptop is extremely slow and to the point of being unresponsive sometimes and when it’s close to the error the laptop shows signs of issues like being slow and HitFilms flickering. All of my ram is put into the program and barely any CPU is used just before the error  and the entire time HitFilms is on, my disc drive is 100% 

 

My laptop is an ASUS Q505 that’s not modified.

1.8ghz Intel i5 8th gen quad core

12 gig RAM

Intel 620 GPU

 

I forgot to mention that I am exporting in 1080p

Comments

  • Triem23Triem23 Moderator Moderator, Website User, Ambassador, Imerge Beta Tester, HitFilm Beta Tester Posts: 18,303 Ambassador

    You might want to contact support. 

    https://hitfilm.com/questions/submit

    What type of effects and compositing are you doing? Often an allocation error is related to overflowing the GPU. By default anti-aliasing is off in the viewer and always on when rendering so a render uses more GPU resources than editing. 

    During a render the CPU pulls frames from the drive, decompresses, then passes to the GPU for rendering, then passes back to the CPU to encode and write to drive. Repeat for each frame. As your CPU is basically idle at the crash point this also points to the GPU. 

    First basic thing to try is just making sure your GPU drivers are current. Windows 10 updates have been known to roll back GPU drivers. With luck you just have an old driver and an update will fix the problem. 

  • Triem23Triem23 Moderator Moderator, Website User, Ambassador, Imerge Beta Tester, HitFilm Beta Tester Posts: 18,303 Ambassador

    Just to note @DannyDev confirms in this thread: http://hitfilm.com/forum/discussion/43271/render-export-not-working#latest that "Bad Allocation" is your GPU running out of memory.

    So a driver update probably doesn't help you.

    So, the question comes back to what kinds of effects and compositing you're doing--finding what's causing the overload and attempting to simplify things. Without seeing the project file I can only guess blindly, but, for example, do you have a lot of nested composite shot? Try proxying them--this basically pre-renders the shot so at the final render it's just a video file. Proxying can reduce GPU load. You can check the Anti-Aliasing settings in the Project Tab. If it's higher than 4xMSAA then lower it back to 4xMSAA. Maybe you have a shot with "invisible" elements--layers that are active with things that aren't actually in frame. Trimming those layers and discarding the parts where they aren't seen will reduce GPU load. You could lower project resolution to free up GPU resources.

     

  • krimsonviperkrimsonviper Website User Posts: 4

    I checked antialiasing and it’s at 4xMSAA. Looking at that thread you posted, I don’t have the ability to drop bit resolution because I’m using Express. Unless that’s in a newer version now?

     

    Ive never proxies before, so I’ll try that and see what happens. As for GPU, I’m staring at that and it’s barely doing work while exporting. The only thing that’s working really is CPU and RAM, which is basically all 12 gigs

  • Aladdin4dAladdin4d Moderator Website User, Imerge Beta Tester, HitFilm Beta Tester Posts: 2,509 Enthusiast

    For whatever reason, you're running out of memory. When you run out of memory, the hard drive usage spikes because Windows is paging memory, writing and reading memory content from the page file on the hard drive, in an effort to free up actual RAM.

    Your 620 GPU is an integrated GPU that shares memory from the main system RAM. The amount of memory available to the GPU is dynamically allocated by Windows. In theory, the 620 can use half of the available system RAM but you can't actually dedicate or force how much memory is reserved for the GPU. So, what is happening is, you start rendering the project and early on, (i.e. no effects etc). you don't need a large amount of video RAM so Windows only allocates a small amount of memory. While the rendering continues, something starts using a massive amount of system RAM. In your case all of the available RAM and then some because Windows is also paging memory to the hard drive. Then your render gets to a point where more video memory is required to complete the operation because it's at a point where you've an applied an effect or two, but you're already out of memory so Windows can't increase the amount allocated to the GPU and you get the "bad allocation" error.

    I have no idea what's taking up all your system RAM. It could be a bug with HitFilm, your drivers, a conflict between HitFilm and something else running in the background, or even as you already mentioned, a problem with a Windows update. I would try contacting support using the link @Triem23 already posted. Support may ask for your project to see if they can recreate the problem.

  • CedricBonnierCedricBonnier Staff Administrator, HitFilm Beta Tester Posts: 1,190 Staff
    edited February 2018

    @krimsonviper Bad alloc is more likely that you are running out of system ram. Usually when this happens your entire system get really slow as the RAM is swapping to disk and then the application eventually falls over, freeing the memory.

    We will need your project to investigate it is a bug or if it is just your project that is too complicated for your machine. Since you are running Express I would be inclined to say that it is the former but I cannot say for sure without seeing the project and potentially also the source media it's using.

    Edit: ah, I just saw @Aladdin4d 's response which is a lot more detailed than mine. Thanks for posting this!

  • krimsonviperkrimsonviper Website User Posts: 4
    edited February 2018

    I will get the file out to you guys when I can. I was able to export in 720, but still nothing in 1080, which is what I want.

     

    The only layers I added were color corrections, songs (not stacked), and a plane that gives me the widescreen movie feel. There are no special affects other than a small image size change to stills, but where it crashes isn’t where the size events occur.

     

    Thank you for the inputs. You guys are great. 

  • CedricBonnierCedricBonnier Staff Administrator, HitFilm Beta Tester Posts: 1,190 Staff

    @krimsonviper one thing you can try is to export your project to an image sequence (.png would be a good candidate) and see if you can export the whole thing this way. Can you manually scrub through all the frames in the Viewer panel? If so you can always do Options > Export frame and save the frame to a png image. You may be able to manually reconstruct your video from a list of images and a separate export for sound only. This is far from ideal I know but if it works at least you won't be blocked whilst we investigate your project to see if there is a bug in HitFilm or not.

  • krimsonviperkrimsonviper Website User Posts: 4

    Aaaaand I have no idea what happened. Fired up the computer. Decided to give 1080 a try again and the system ran exactly how you guys said it should and it exported correctly.

     

    I did end up changing some things like switching the song from a copyrighted one to one I can use and added some stills and shortened the area the render kept failing at. There hasn’t been a new update.

This discussion has been closed.