4.12 Physx cook error (Kinematic / CCD)

I’ve been trying to package my game for 2 days and I keep getting “Unknown Cook Failure” errors.

I’ve Ctrl+F’d my way through the log and, while warnings abound, the only time the word “ERROR” ever actually appears is in a string of identical lines in sequence, multiple times in the log:

LogPhysics:Error: PHYSX: (d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\physx\src\NpRigidBodyTemplate.h 437) eINVALID_PARAMETER : RigidBody::setRigidBodyFlag: kinematic bodies with CCD enabled are not supported! CCD will be ignored.

Cook log attached:
[Cook Log.txt][1]

Now, I’ve gone through and checked everything I can think of. I can find no static meshes with CCD enabled by default, no Physics Assets with CCD on ANY of their bone bodies, no blueprints which use CCD whatsoever, no triggers or blocking volumes using it, etc.

I’ve also gone through just-about everything that’s changed since the LAST time I cooked looking for compile errors or warnings, and found nothing. Fixed up all redirectors, nothing.

SO, obviously, part one of this is to say “what else can I do to find out what object is throwing these errors so I can uncheck CCD on it?”

Part two is to ask, why on earth was this changed in 4.12? I’ve never run into this problem cooking before with respect to CCD being enabled on kinematic bodies. The log even SAYS “will be ignored”, which to me seems like the appropriate behavior, rather than killing the cook process with an unknown error. It seems like a pretty silly reason to throw a build-destroying error since it produces no problems when playing standalone.

Part three is to ask, why on earth doesn’t the log tell me which assets are causing this issue? Near as I can figure (by walking up dozens and dozens of lines) is that the problem occurs when cooking a level. That level has probably THOUSANDS of unique elements in terms of actors, meshes, volumes, etc. I’m sitting here stepping through each individual element of this level checking for CCD, opening blueprints and checking every element for CCD, checking construction scripts for dynamically created elements with CCD, etc., looking for this issue. The log is providing no help at all here, and I can’t think of why it should be that way. I would implore epic to look into that, because package-killing errors are among the hardest to track down (given that every time you want to check if the change you made FIXED it, you’re looking at another 15-20 minutes of attempted cooking) with guess-and-check.

97486-cook-2016.07.07-10.28.45.txt (3.66 MB)

Interesting followup:

if I go into project settings > physics, and select “Disable CCD” (which should cause PhysX to “internally ignore it”

I STILL get the same ori cohen CCD errors on cooking.

EDIT: a couple more observations on my end, but I’m giving up until I get a response at this point because I swear I have systematically checked every single BP, mesh, volume, trigger, and PHaT rig in the entire game’s content folder and all of its levels and nothing has CCD enabled:

  1. d:\ori cohen isn’t a valid path on my machine. I don’t even have a d: . I don’t know if that’s relevant.

  2. I get these errors just running a Geometry Build on the level in question; I don’t know if that narrows anything down.

  3. It’s always exactly 21 of these errors that appear, in a set of 7 and then a set of 14. Just to be sure, I’ve gone into every single asset that I have 21 of in the level in question and deleted a couple and rebuilt Geometry, just to see if I could get it down to 19 checks (to ID what blueprint or mesh is causing the issue), but no dice.

  4. On cook fail, I see “21 errors and [x] warnings” so I know it’s this PhysX error that is causing cook/package failure.

Moved this to Bug Reports as I’m now convinced this is a bug. I can find no AnswerHub results about it before 4.12 and it always presents in the exact same way, which involves some asset that’s cooked right for every version before suddenly throwing an error.

Version 4.12.2 is incompatible with Visual Studio 2015 sp3 then I upgraded to 4.12.3 and I totally stucked with this err. I’m unable to cook my projects, I need a quick help for this…
dogu

Have this problem too. Im using a custom build of the ue4 source 4.12.5.
Need to know to fix it I have to ship asap.

Cheers,
Bander

How can you find the assets that have ccd bodies? What is it skeleton rigs that cause this?
Cheers

The only way to “fix” it is to remove every object that has CCD on it, but even then it doesn’t seem to always work (I’ve seen reports that sometimes PhAT rigs can trigger this, even if no bodies actually have CCD on them)

Which isn’t much of a fix.

Basically, wait for a hotfix…?

When you cook, you can sometimes see where the error is, ish (it might be a blueprint if you’re lucky but odds are just as good it’s some object in a map like a trigger volume).

So basically, check everything. EVERYTHING. But then, I did that, and I still didn’t fix it, so just understand that there’s a decent you just won’t catch it. :frowning:

So basicly we have to wait for an hotfix? :open_mouth:

oh man… That sounds really bad… Ill try to find something and report it here if I found something.
Those bugs are really annoying … You know finished everything to be ready to cook and got those bad bugs. Good to know that there are only a few bp’s and just a few triggerboxes I don’t need. Bad to know that in my c++ code are some more capsules and triggerboxes that can cause this error.

So lets find a bug in the next 3 days :smiley:

Welcome to my headache lol.

My big concern is just that someone at Epic actually SEES this and logs the bugfix, this has been reported since May but I don’t think a report is logged so nobody on the dev team will notice…

Maybe I try to remove the error message out of the .h and try to recompile it.
Maybe it gives me the solution to cook my project Ill try it out.

CLBander,

Did you fix the issue you were running in to?

Even if he did, I sure didn’t, I think this needs a proper Bug Report to be fixed.

In order to submit a bug report, I will need detailed reproduction steps to provide to our Developers. If you have those available, please reply back.

Thanks! :slight_smile:

EDIT: Well, after systematically deleting every single asset from the level and re-cooking until something changed, I believe I have it narrowed down to Procedural Mesh Components misbehaving.

I’ll play around with this and hopefully have a set of repro steps up… or I could just upload the asset in question.

EDIT: Well, after systematically deleting every single asset from the level and re-cooking until something changed, I believe I have it narrowed down to Procedural Mesh Components misbehaving.

I’ll play around with this and hopefully have a set of repro steps up… or I could just upload the asset in question.

EDIT 2: Create a Procedural Mesh Component at runtime. Set it to generate collision. Set the asset to have CCD.

This is what generated a cook failure for ME.

But the thing is, other users have mentioned that this has happened with stuff like trigger volumes instead, that never threw CCD errors until 4.12 (much as my Proc Mesh Comps cooked fine in 4.11)… the issue is that something LARGER is going on with the way the CCD “warning” flag is actually being interpreted as an error flag. Even if you can repro it through my steps, I feel like the actual BUG is something a bit more on the back-end with how that “warning” is being handled.

Well I remove a map that was build with BSP Brushes and I was able to successfully cook the game.
Cheers,
Bander

RhythmScript,

I went through all the steps you provided and tried to reproduce this. Unfortunately, I wasn’t able to. But what I did find was a bug report already in for this exact issue UE-33463.

Please feel free to reply back in a few weeks to check on the status.

I get the same error twice in my log and each time I load the game, and I don’t have any procedural mesh components anywhere at all, guaranteed :slight_smile:

Again the error we are discussing is:

LogPhysics:Error: PHYSX: (d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\physx\src\NpRigidBodyTemplate.h 437) eINVALID_PARAMETER : RigidBody::setRigidBodyFlag: kinematic bodies with CCD enabled are not supported! CCD will be ignored.

My thoughts:

Sounds to me like somewhere something thinks it is kinematic when it is actually really physics, perhaps a ragdoll / PHAT asset somewhere?! It’s like something is physics but is not in physics-simulating mode during packaging, or falsely thinks it is kinematic, and so we get this error

For anyone who is new to this error, Kinematic is like how a character capsule moves, it is not truly simulating physics, and CCD = Continuous Collision Detection which only makes sense on a physics-simulating object.

Somewhere something thinks it is kinematic when it really is simulating physics, or does sometimes, and packaging system is not recognizing this and why CCD is correctly set to true,

or, something actually is kinematic (like character capsule), and has CCD set to true somewhere, but since everyone is saying they are rigorously checking their projects, my guess is that packaging system thinks something is kinematic when it really isnt, and this error gets thrown.