Different builds completely different output or crash

Different builds have completely different results…

The major problems: For Version:
4.6.1

  1. A build is 1.3GB while almost no content is visible in a minimal level
  2. Editor->DevelopmentBuild == Incorrect fullscreen + incorrect active view camera
  3. Editor->ShippingBuild == incorrect active view camera
  4. VS->DevelopmentBuild == Fatal error on startup (tried copying files from binary folder to WindowsNoEditor, no luck)
  5. VS->ShippingBuild == Fatal error on startup (tried copying files from binary folder to WindowsNoEditor, no luck)

The wrong active camera on a build may have to do with that I have NO default pawn in my GameMode. This works fine in the editor, I have set ‘bFindCameraComponentWhenViewTarget=true’ set on some actor that contains a camera component. But in a build this fails miserably apparently…?

When running these builds, no log is created or the log does not contain ‘errors’. The output and game-logic is wrong but not recognized as such…

For Version 4.7.0 p6/p7
I did try to do a Standalone run from Editor (No build) but this results in a freeze lockup see other thread.

I cannot continue as there seems no path or workaround anymore to fix my issues.
Output is either a Fatal crash, a Render lockup or no error occurs but the output is wrong and no ‘issues’ are
presented in the log output…

I have the wrong Active camera fixed when a build is made.
To produce:

  • Have multiple SceneCapture2D’s.
  • Have a ‘normal’ Camera. Create custom C++ class of this camera and set in in constructor: ‘bFindCameraComponentWhenViewTarget = true’
  • Call this every tick or in BeginPlay from within the custom C++ camera class: GetWorld()->GetFirstPlayerController()->SetViewTarget(this);
  • Test game in editor to see if targetview is set correct.
  • Create custom game mode and make sure default pawn is set to None
  • Make a shipping or development build of the game
  • Startup with shortcut with command arguments: -winx aaa -winy bbbb
    -fullscreen and see that the viewtarget is wrong and will not get fixed, even when SetViewTarget is called every tick.

The fix is to not start with shortcut but set correct rendering options in DefaultGameUserSettings.ini. This way, the viewtarget is correctly maintained.

Hey simmania-

There are a few questions I have to help me investigate the behavior you’re seeing.

  1. How are you setting up the multiple SceneCapture2D?

  2. Are you creating a custom C++ class based on CameraActor or based on a specific camera?

  3. Do you see the same behavior if the default pawn is not set to None?

  4. When creating the shipping/development build are you doing so through VS or are you creating a packaged version of the game through the editor?

If you could elaborate on the steps to reproduce what you’re seeing it will help in determining exactly what is happening and what the cause is.

Cheers

Doug Wilson

  1. Custom C++ class based o AActor → Custom blueprint based on custom C++ class → Add SceneCapture2D components from within Unreal Editor to custom blueprint based on custom C++ actor.
  2. No. Just a custom C++ actor on which a custom blueprint is based.
  3. Yes.
  4. Packaged, because through VS only binaries are updated and always throw a Fatal Error on startup.

I’m still unclear on how to follow your setup. I created the new C++ class based on actor and created a BP based on this class. What do you mean by “have a ‘normal’ Camera”? Are you referring to adding a camera component to the same blueprint? Are you creating a C++ class based on CameraActor or CameraComponent? Please list out the steps you take when recreating this error in a new project.

I managed to reproduce the bug.

  • Create project with minimal content.
  • Create blueprint based on GameMode
  • Set the new GameMode in worldSettings and set DefaultPawn to None
  • Remove player start location
  • Add a SceneCapturer2D
  • Create new C++ class based on AActor
  • Add constructor to C++ with the const FObjectInitializer& …
  • Add lines in constructor: bFindCameraComponentWhenViewTarget = true;
    PrimaryActorTick.bCanEverTick = true;
    AutoReceiveInput = EAutoReceiveInput::Player0;
  • Add function Tick(float dt), in that function add:
  • GetWorld()->GetFirstPlayerController()->SetViewTarget(this);
  • Compile in VS and start editor from VS.
  • Create blueprint based on this new actor.
  • Add camera component in the just created blueprint.
  • Press play and see you see the correct output of the just added Camera.
  • Make a development (packaged) build.
  • Create shortcut of executable (On windows: WindowsNoEditor) add in arguments: -winx 1920 -winy 1080 -fullscreen
  • Play and if done ‘correct’ you will see not correct output i guess from center of world.

I don know if the SceneCapturer2D, the custom GameMode and all other steps are required to reproduce. I think it has primarily to do with the -fullscreen tag. Removing that shows correct output.

Hey simmania-

I was able to follow your steps however when I opened the shortcut for the game the screen was black (both with and without -fullscreen in the properties). Is this what you were referring by not seeing the correct output?

I think it depends on what you have at the center of the world. If it is a blank black floor, then your output might be black. I have seen the problem coming and going with and without -fullscreen. That is, in one of my projects it only happens when -fullscreen added, in the other it occurs also without.

Hey simmania-

I’ve entered a bug report to our internal tracking database (UE-10164) for further investigation of the difference between PIE and packaged versions of the camera behavior. Thank you for your help in identifying and reproducing this issue.

Cheers

Doug Wilson