Path consistency issues with imported files

I’ve found a rather fascinating path issue with asset system. It seems to incorrectly process paths for asset’s Source File Path field. My best repro steps, plus explanation, follows:

Make sure UE4 is installed on C: in its normal location in Program Files. This may not work with a built copy. Create a project at c:/work/uproj, with a .fbx file at c:/work/uproj/art/model.fbx. Import file into project. Modify file in a very obvious way. Now right-click file and choose “re-import”. You’ll note a message saying it has re-imported successfully, but no actual re-import takes place.

Opening output log gives better information:

LogEditorFactories: Performing atomic reimport of [C:/../../work/uproj/art/model.fbx]
LogFbx:Error: Call to KFbxImporter::Initialize() failed.
LogFbx:Warning: Error returned: Corrupted or invalid file.
LogEditorFactories:Warning: -- import failed

And if you look in model info, you’ll see Source File Path is set to ../../../../../../work/uproj/art/model.fbx.

Removing first two sets of …/, leaving ../../../../work/uproj/art/model.fbx, will actually make it work - for exactly one re-import, at which point it’s set back to broken value.

It seems there’s a few bugs here:

  • UE4 is incorrectly processing file paths for project. Instead of giving a path relative to a sensible location - either relative to .uproject file, for example, or asset, or even arguably to binary’s working directory - it’s doing something relative to binary’s working directory, but adding a pair of extra …/'s to front. This leaves file with an invalid path.

  • engine does check to see if file exists before attempting to read it. On failure, it’s supposed to pop up a dialog you for a new file. However, this check is broken - it ignores extra …/'s prepended to beginning of filename, and FBX loader does not, meaning that it does not serve as a functioning check of whether file will be read properly.

  • While engine recognizes that FBX hasn’t loaded properly - see output log - it does not propagate this error code up to UI, and UI then assumes file was loaded properly, resulting in a very misleading status message.

I can attempt to track this down further if needed for fixing, but hopefully this is enough to fix those bugs.

Hi ZorbaTHut,

Thank you for detailed information. As you state, I have reproduced this behavior when project is created immediately off of C drive. I do not experience issue when project is in its default location in My Documents.

I have reported this issue.

Thanks

I believe I’m having same issue (which is kind of troubling almost 1 year after OP).

LogEditorFactories: Performing atomic reimport of [G:/../../../Eternal/Media/Maya/FBX/MetalFloor.fbx]
LogFbx:Error: Call to FbxImporter::Initialize() failed.
LogFbx:Warning: Error returned: Unexpected file type

FBX file is from MayLT and doesn’t have any issues when originally importing. actual file is:

G:/Eternal/Media/Maya/FBX/MetalFloor.fbx

I have no idea where all those extra …/'s come from. Please help.

Hi cybereality,

Please open a new post in Bug Reports section with this information. A lot has changed in editor since April 2014, and we want to make sure we address this with as much current information as possible. Please feel free to link back to this post in your new post. Thanks!