Can't package on 4.14

I just updated a project from 4.13 to 4.14, but it will no longer package. The output log is full of this:
LogPhysics:Error: PHYSX: (D:\Build++UE4+Release-4.14+PhysX_Compile\Sync\Engine\Source\ThirdParty\PhysX\PhysX_3.4\Source\PhysXCooking\src\Cooking.cpp 198) eINVALID_PARAMETER : Cooking::cookConvexMesh: user-provided convex mesh descriptor is invalid!

Unfortunately, that does not give me much information to work with. Perhaps an asset needs to be saved? The error would be much more useful if it specified what asset triggered it.

Hey BlackRang666,

Do you have a way for me to reproduce this issue on my end?

Is this a C++ or Blueprint based project? If C++ perhaps try recompiling the Cooking.cpp.

Can you provide to me the Packaging Settings you are using as well as the target platform?

Let me know if you have additional questions.

Cheers,

Hi Andrew,

Im receiving the same error using a blueprint only project and packaging for windows 64 bit.

These are my packaging settings.

It was working before I migrated my project to 4.14 if that helps.

Thanks

Unfortunately, I need more than just the packaging settings as this is not reproducing in a new blank project with the setting you have provided.

Can you provide me with steps to reproduce the issue in a new blank project?

Thank you,

Unfortunately not as I have no idea what the issue causing it is in order to reproduce it.

The output log just repeats the same error about PhysX 3.4, but I can’t locate the directory it is giving.

LogPhysics:Error: PHYSX: (D:\Build++UE4+Release-4.14+PhysX_Compile\Sync\Engine\Source\ThirdParty\PhysX\PhysX_3.4\Source\PhysXCooking\src\Cooking.cpp 198) eINVALID_PARAMETER : Cooking::cookConvexMesh: user-provided convex mesh descriptor is invalid!

Thanks

I have the same packaging settings but my project is c++ and blueprint.

I don’t get it in all projects, and I have no idea what causes it to reproduce it. The error message doesn’t really give any helpful information.

What type of project is this, and was it upgraded from a previous engine version?

If so, go into your Unreal Projects folder and delete your Saved, Intermediate, and Config files/folders. New ones will be created when you re-open the project. I would make a copy of those files/folders first though.

Unless we have a way to reproduce this issue, there is not much in the way of reporting this as a bug. Let me know if you have additional questions.

Thanks,

As I have stated above, this was with a project updated from 4.13 to 4.14. Can you please have someone from the engine team look into where this error message is programmed and give some more information on it so I have some starting point in trying to find repro steps?

user-provided convex mesh descriptor is invalid!

File descriptors indicate loading files to int variables. Thus your problem is either the mesh file is corrupted (and the cooker cant understand it or parse it), you are using a non mesh file descriptor for input in a function that takes in a file descriptor of a mesh file or this file does not exist and reference is broken. As far as i can understand from the error.

Thanks, KALALEX. That is a big help. If only the error message also output what asset caused the error.

1 Like

Well it says cookConvexMesh function so i think you should look for a mesh that simulates physics and it is a convex mesh. If you don’t know about convex meshes take a look here Convex Mesh Link

Ok so i did a little research inside unreal source and i found this. Which means that Ps::getFoundation().error(PxErrorCode::eINVALID_PARAMETER, __FILE__, __LINE__, "Cooking::cookConvexMesh: user-provided convex mesh descriptor is invalid!");
Should print the FILE which is the name of the file that the error accoutered and the LINE where the error is. But in your error between that there is no description after the eINVALID_PARAMETER.Which is really strange.

LogPhysics:Error: PHYSX: (D:\Build++UE4+Release-4.14+PhysX_Compile\Sync\Engine\Source\ThirdParty\PhysX\PhysX_3.4\Source\PhysXCooking\src\Cooking.cpp 198) eINVALID_PARAMETER : Cooking::cookConvexMesh: user-provided convex mesh descriptor is invalid!

bool Cooking::cookConvexMeshInternal(const PxConvexMeshDesc& desc_, ConvexMeshBuilder& meshBuilder, ConvexHullLib* hullLib,
	PxConvexMeshCookingResult::Enum* condition)
{
	if (condition)
		*condition = PxConvexMeshCookingResult::eFAILURE;

	if (!desc_.isValid())
	{
		Ps::getFoundation().error(PxErrorCode::eINVALID_PARAMETER, __FILE__, __LINE__, "Cooking::cookConvexMesh: user-provided convex mesh descriptor is invalid!");
		return false;
	}

	if (mParams.areaTestEpsilon <= 0.0f)
	{
		Ps::getFoundation().error(PxErrorCode::eINVALID_PARAMETER, __FILE__, __LINE__, "Cooking::cookConvexMesh: user-provided convex mesh areaTestEpsilon is invalid!");
		return false;
	}

	PxConvexMeshDesc desc = desc_;	
	bool polygonsLimitReached = false;

	// the convex will be cooked from provided points
	if (desc_.flags & PxConvexFlag::eCOMPUTE_CONVEX)
	{
		PX_ASSERT(hullLib);

		PxConvexMeshCookingResult::Enum res = hullLib->createConvexHull();
		if (res == PxConvexMeshCookingResult::eSUCCESS || res == PxConvexMeshCookingResult::ePOLYGONS_LIMIT_REACHED)
		{
			if (res == PxConvexMeshCookingResult::ePOLYGONS_LIMIT_REACHED)
				polygonsLimitReached = true;

			hullLib->fillConvexMeshDesc(desc);
		}
		else
		{
			if (res == PxConvexMeshCookingResult::eZERO_AREA_TEST_FAILED)
			{
				*condition = PxConvexMeshCookingResult::eZERO_AREA_TEST_FAILED;
			}
			
			return false;
		}
	}

	if (desc.points.count >= 256)
	{		
		Ps::getFoundation().error(PxErrorCode::eINTERNAL_ERROR, __FILE__, __LINE__, "Cooking::cookConvexMesh: user-provided hull must have less than 256 vertices!");
		return false;
	}
		
	if (!meshBuilder.build(desc, mParams.gaussMapLimit, false, hullLib ? false : true))
	{	
		return false;
	}

	if (condition)
	{
		*condition = polygonsLimitReached ? PxConvexMeshCookingResult::ePOLYGONS_LIMIT_REACHED : PxConvexMeshCookingResult::eSUCCESS;
	}

	return true;
}

Why was this marked as resolved? Progress, yes. Resolved, no.

1 Like

I’m using 4.22 and I have encountered the same issue today. It is a mesh issue and it is resolved by recreated the collision for the mesh. Hope this would help.

2 Likes