Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Error in PakTool when generate chunks enabled

When I try to package my project in the 4.16 preview I get an error stating that it can't write to the UnrealPak log file, I've attached the log with the full exception printed in it. I've found that it will succeed if I delete the log folder (AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.16) before starting the package process or if I just turn off GenerateChunks in the packaging settings.

I tried packaging ShooterGame with generate chunks because I know that is set up to actually partition its content into different chunks (and is what I based my game's chunking on) but that worked fine. I'm packaging for Windows 32-bit and have tried both Development and Shipping builds with Full Rebuild turned on.

Product Version: UE 4.16 Preview
more ▼

asked May 02 '17 at 06:15 PM in Bug Reports

avatar image

919 40 61 206

avatar image Matthew J May 02 '17 at 08:09 PM

Hello kgamble,

Had you previously been able to package this way successfully in 4.15 or is this the first time you've tried this? As mentioned in the error message in the log, the reason the file is not writable is due to being used by another process. Can you ensure that all other instances of UE4 are closed and that no other compilation processes are running? It may be best to use Task Manager's process tab to check this.

avatar image kgamble May 03 '17 at 04:29 PM

I thought it had worked in 4.15 but when I double checked yesterday I did run into the same issue. It also still happened after deleting my log folder, so that bit of info is wrong as well. I checked task manager while it was packaging and didn't see any extra unreal processes running.

I went back to ShooterGame to see if I could repro it there and I was successful. The steps I took:

  1. Create ShooterGame for 4.15

  2. Duplicate every content item 3 times (so there should be 4 copies of each file)

  3. Modify AssignStreamingChunk in ShooterGameDelegates to the following:

    static void AssignStreamingChunk(const FString& PackageToAdd, const FString& LastLoadedMapName, const TArray& AssetRegistryChunkIDs, const TArray& ExistingChunkIds, TArray& OutChunkIndex) { const int32 BasePak = 0;

      // Add assets to map paks unless they're engine packages or have already been added to the base (engine) pak.
         if (!PackageToAdd.StartsWith("/Engine/"))
             if ((LastLoadedMapName.Find(TEXT("_2")) >= 0 || PackageToAdd.Find(TEXT("_2")) >= 0) &&
             if ((LastLoadedMapName.Find(TEXT("_3")) >= 0 || PackageToAdd.Find(TEXT("_3")) >= 0) &&
             if ((LastLoadedMapName.Find(TEXT("_4")) >= 0 || PackageToAdd.Find(TEXT("_4")) >= 0) &&
         if (OutChunkIndex.Num() == 0)
  4. Package the game with the following settings Settings

Hopefully that will work for you.

avatar image Matthew J May 03 '17 at 08:59 PM

Thank you for the information, unfortunately I'm still not seeing any sort of failure. I did have to edit one thing from your reproduction as the code provided didn't compile successfully. I had to replace the "TArray&" parts of the function signature with "TArray&". Did you receive the same error when reproducing the issue this way or was the error message different this time?

avatar image kgamble May 03 '17 at 10:38 PM

Looks to be the same error; attaching the log from attempting to package ShooterGame with all the duplicated content.

Just to confirm, your build ends up with 4 different pak files? If I have either ShooterGame or my project generate less than that then it succeeds without the "file in use" exception.

avatar image Matthew J May 04 '17 at 03:01 PM

That's correct, I receive 4 different pak files. I did just notice that you're using a source build though, which could have an effect on this. I'll try using source instead of a binary build and see if I can get the same results.

avatar image kgamble May 04 '17 at 03:11 PM

No, I'm using the binary build of 4.15. I do have a source build on my computer but both my project and ShooterGame that I'm using use the binary build.

avatar image Matthew J May 04 '17 at 06:15 PM

Ah, my mistake. I was able to reproduce the issue however, it seems like it requires packaging a second time, as the first creates the file that the error mentions being open in another process. I'm doing further testing at the moment as it could be related to one of the other settings, such as Blueprint Nativization.

avatar image kgamble May 04 '17 at 08:01 PM

I just tried packaging with nativization turned off and it worked multiple times in a row. Not sure why I didn't think to do that.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I was able to reproduce this in a smaller project (makes it easier to use for a reproduction case) and have entered a bug report for it. You can find the bug report here: UE-44709. In the meantime, until this gets fixed, I suggest disabling Nativization since that seems like the simplest workaround.

more ▼

answered May 04 '17 at 09:36 PM

avatar image BioXide Jul 24 '17 at 08:32 AM

I can confirm this bug is still around, it's not letting me do a packaged build with pak chunks enabled. Any work arounds? I have nativization disabled and it still doesn't work :(

avatar image Pewbot Jul 24 '17 at 06:31 PM

Can confirm with BioXide, we too have nativization disabled and it started happening last night with 4.16.2

avatar image Matthew J Aug 04 '17 at 05:21 PM

Hello BioXide and Pewbot,

I followed the same reproduction that we originally used for this in Shooter Game in 4.16 and I'm not seeing these issues. Is your setup different in any way? If possible, could you provide a project that can reproduce this issue?

avatar image Sven Lohse Oct 12 '17 at 12:57 PM

Hi folks,

we have the same issue on our build server (4.16.3 Prebuilt), but it does not happen every time. As far as I can see, it does not necessarily need a different setup for the issue to show up or not show up. Sometimes just restarting the same job is enough to fix it. Rebooting the machine usually fixes the issue for a day or two until it comes back. We also use Pak chunks, nativization is off and the server always wipes its workspace before checking out and building the project (the prebuilt engine creates some intermediate files outside of the workspace (like the logfiles) which are not cleaned up).

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question