Announcement

Collapse
No announcement yet.

UE4 4.6 C++ Project: Package Project Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    UE4 4.6 C++ Project: Package Project Error

    A team member and I have been trying to package our project all afternoon. We were getting a few errors, but we have fixed all but 1 error.

    Code:
    [2015.01.21-21.43.32:492][  0]LogUnrealMath:Error: FMatrix::Inverse(), trying to invert a NIL matrix, this results in NaNs! Use Inverse() instead.
    We have tried the following.
    1. Restarted PC
    2. Tried to package the game as Shipping and Development
    3. Under Package Settings we checked/unchecked the Full Rebuild option
    4. Removed all uses of FRotator in our CPP code.

    Based on our research, we're not the only ones with this problem, but no one seems to have found/shared a solution yet.

    Here is a link to the full log of the failed package.
    Logitech Wheel Plugin

    #2
    I doubt there's a silver bullet solution to this. I'd roll up my sleeves, run the cooker with a debugger attached, inspect the asset that's causing it to happen, see if it's a content problem or an engine problem.

    Comment


      #3
      Have any ideas on how I would go about doing that?
      Logitech Wheel Plugin

      Comment


        #4
        Behind the scenes, all the cook/package frontend does is issue commandlets. It's pretty hard to figure out what's being done and what arguments are being passed just browsing through code, due to the large number of tools interacting with each other. What I generally do is run whatever I want to debug from the frontend, then look at the beginning of the resulting log files for command line arguments. In your case:

        LogInit: Command line: F:\Perforce\dbeaty_Daniel-PC_1004\PandagonStudios\Projects\LevelTesting\LevelTesting.uproject -run=Cook -MapIniSection=AllMaps -I18NPreset= -TargetPlatform=WindowsNoEditor -buildmachine -Unversioned -fileopenlog -abslog="C:\Users\Daniel\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Unreal+Engine+4.6\Cook.txt" -stdout -FORCELOGFLUSH -CrashForUAT -unattended -AllowStdOutLogVerbosity
        Grab the important arguments from that command line and then provide them to UE4 when starting debug. A lot of these arguments are just for controlling output, which doesn't really matter, so boiled down to the bare essentials:

        LevelTesting -run=Cook -TargetPlatform=WindowsNoEditor
        Set these by right-clicking the UE4 project in your solution and choosing "Properties". In the Debugging section of the property sheet is the Command Arguments section where you can paste these arguments. If all goes well, this should start the Cook commandlet with the debugger attached and whenever that assert gets hit, you can go up the call stack a bit to have a look at asset data.

        Note that it's entirely possible that the data you want to consult will be optimized out if you're running in Development. To work around that, you can compile the editor in Debug or, to avoid a full engine recompile, just surround the section of code you want to debug with a #pragma optimize("", off) + #pragma optimize("", on) pair:

        Code:
        #pragma optimize("", off)
        
        void SomeCookingFunction()
        {
        	Stuff();
        }
        
        #pragma optimize("", on)
        Then it all depends on what asset is throwing the assert. I'm venturing from the list of animation assets being cooked in the log that the last one ("Character/Player_Arms/armsBoundAnimated.uasset") might be the anim blueprint for that skeleton? I haven't nosed around the internals of anim blueprints much, but hopefully the assert should tell you where the bogus matrix is and that should give you a lead on whether or how it can be fixed.

        Comment


          #5
          Originally posted by cmartel View Post
          Behind the scenes, all the cook/package frontend does is issue commandlets. It's pretty hard to figure out what's being done and what arguments are being passed just browsing through code, due to the large number of tools interacting with each other. What I generally do is run whatever I want to debug from the frontend, then look at the beginning of the resulting log files for command line arguments. In your case:



          Grab the important arguments from that command line and then provide them to UE4 when starting debug. A lot of these arguments are just for controlling output, which doesn't really matter, so boiled down to the bare essentials:



          Set these by right-clicking the UE4 project in your solution and choosing "Properties". In the Debugging section of the property sheet is the Command Arguments section where you can paste these arguments. If all goes well, this should start the Cook commandlet with the debugger attached and whenever that assert gets hit, you can go up the call stack a bit to have a look at asset data.

          Note that it's entirely possible that the data you want to consult will be optimized out if you're running in Development. To work around that, you can compile the editor in Debug or, to avoid a full engine recompile, just surround the section of code you want to debug with a #pragma optimize("", off) + #pragma optimize("", on) pair:

          Code:
          #pragma optimize("", off)
          
          void SomeCookingFunction()
          {
          	Stuff();
          }
          
          #pragma optimize("", on)
          Then it all depends on what asset is throwing the assert. I'm venturing from the list of animation assets being cooked in the log that the last one ("Character/Player_Arms/armsBoundAnimated.uasset") might be the anim blueprint for that skeleton? I haven't nosed around the internals of anim blueprints much, but hopefully the assert should tell you where the bogus matrix is and that should give you a lead on whether or how it can be fixed.
          Thanks a lot. It turned out it was an issue with that animation asset.
          Logitech Wheel Plugin

          Comment

          Working...
          X