Ensure condition failed: CurrentNum == InitialNum

(*NOTE: THIS IS A GENERAL SOLUTION FOR MOST PACKAGE ISSUES)

What a nightmare this was:

So, the issue was not anything that I did. Deep within the metadata of one of my Blueprints, there was a corruption. Because this corruption was under the hood, I was not alerted until AFTER a full-project package.

Not only that, but because the corruption was not of my creation, the error message did not point me to any location.

Why?

Because Unreal would have to recognize that it is (itself) corrupted, and it’s almost certainly not going to do that on its own; there’s far too many unique instances of corruption for them to be documented sufficiently (for now…).

THE METHOD:

  1. (And this is VERY poorly documented) Use the “Validate Assets” function to run a validation pass on your assets.

BY FOLDER

BY ASSET

  1. (Again, VERY POOLY documented) When you run that pass, do NOT look at the MESSAGE LOG. You actually need to look at the OUTPUT LOG. They are NOT the same thing. (The MESSAGE LOG kept telling me that the Validation was a “success”, but then I’d see the bug again. The OUTPUT LOG is the KEY.)

  1. Go FOLDER BY FOLDER, until this error pops up.

  2. When it finally does pop up, you MUST restart Unreal Engine, because Validate Assets does not UPDATE. (Again, none of this is DOCUMENTED!!! So, you’ll think the error disappeared when you attempt to rescan.)

  3. After restarting Unreal, narrow your search in those folders for the asset, making sure to restart Unreal every time the error comes up.

  4. When you finally find the corrupt asset, you MUST quarantine it. If it contains code, you CANNOT DUPLICATE it. You must create a completely new Asset/Blueprint, and in SMALL BATCHES, copy the code over, making sure to run a validation pass on your new asset every time you add something.

  5. Once you have an exact REPLICA (NOT COPY!), make sure to DELETE that asset and REPLACE its references with the pop-up prompt.

  1. I CANNOT WAIT until AI takes over documentation, because if I did not have ChatGPT leading me in the right direction, I don’t know how long this would have taken.

PS: You can UPLOAD your ENTIRE LOG to ChatGPT, and it will scan it for you. Amazing stuff! But, in my case, because it was a bug with the Engine, it had no idea what was happening.