Files
UnrealEngineUWP/Engine/Source/Runtime/Linux/LinuxCommonStartup/Private/LinuxCommonStartup.cpp

263 lines
7.2 KiB
C++
Raw Normal View History

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#include "LinuxCommonStartup.h"
#include "ExceptionHandling.h"
#include "LinuxPlatformCrashContext.h"
#include "ModuleManager.h"
#include "EngineVersion.h"
#include <locale.h>
#include <sys/resource.h>
static FString GSavedCommandLine;
extern int32 GuardedMain( const TCHAR* CmdLine );
extern void LaunchStaticShutdownAfterError();
Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @ 2879808) ========================== MAJOR FEATURES + CHANGES ========================== #lockdown Nick.Penwarden Change 2879705 on 2016/02/24 by Nick.Darnell Editor - Tweaking some comments. #tests n/a #rb n/a Change 2879674 on 2016/02/24 by Nick.Darnell Editor - The editor now supports many new methods of opening new asset editors. You can choose where tabs open with a great deal more options in Editor Preferences > Appearance > Asset Editor Open Location. This will reset the 'always open asset editors in new windows' option, it completely replaces and enchances that option. #tests Ran the editor, tried each option and they all seem to do what I want. #rb matt.kuhlenschmidt Change 2879661 on 2016/02/24 by Jamie.Dale More general fixes for dialogue waves - The localization key now uses a hash of the speaker and target voice GUIDs to help keep them short. - The localization key can now be user customized, and contains a placeholder format specifier for the context hash. - The "Variations" meta-data is now called "Context". #rb James.Hopkin #tests Built for Windows, Linux, and PS4. Tested a loc gather and export had the correct info in it. Tested the new UI worked as expected. Change 2879436 on 2016/02/24 by Nicholas.Davies A few bug fixes for blocking PS4 > PC chat #jira OR-15467 Disable Paragon chat on PS4 for users outside of the game #RB Antony.Carter #codereview Sam.Zamani #TESTS PS4 whispers to and from none Paragon PC users is blocked. Change 2878929 on 2016/02/23 by Jason.Bestimt #ORION_DEV - Merge Main to reconcile 0.20 branch creation #RB:none #Tests:none Change 2878600 on 2016/02/23 by Dmitry.Rekman Linux: added code to identify CPU for FPSCharts (OR-14949). #rb none #tests Ran dedicated server on local VM and a few physical boxes. Change 2878443 on 2016/02/23 by Marcus.Wassmer Fix game not ticking when PS button is pressed. #rb andrew.grant #test golden path ps4 Change 2878361 on 2016/02/23 by Josh.Markiewicz #UE4 - fixed bad comment #rb none #tests none Change 2878205 on 2016/02/23 by Jason.Bestimt #ORION_DEV - Merge main (0.19) at CL# 2878162 #Tests:none #RB:none Change 2878095 on 2016/02/23 by Josh.Markiewicz #UE4 - added warnings to json mcp read/write failures - removed HostAddressOverride parameter (use -uselocalips and -multihome together instead) #rb none #tests matchmaking golden path Change 2878002 on 2016/02/23 by Josh.Markiewicz #UE4 - made two party framework functions virtual #rb none #tests none Change 2877998 on 2016/02/23 by Josh.Markiewicz #Ue4 - Party interface can optionally enable/disable creating a chat room alongside the party (defaults to enabled) #rb rob.cannaday #tests social/team parties golden path #codereview rob.cannaday Change 2877822 on 2016/02/23 by Olaf.Piesche speculative fix for OR-15710 #rb david.hill #tests PC game Change 2877804 on 2016/02/23 by Uriel.Doyon Fixed ULevel::AddReferencedObjects clearing all references to static texture streaming data #codereview robert.manuszewski #rb marcus.wassmer #tests played several games on PC, also doing rejoin #jira OR-15658 Change 2877692 on 2016/02/23 by Jamie.Dale Added commandlet to replace sound wave players in sound cues with dialogue wave players where appropriate #rb Saul.Abreu #tests Built for Windows, Linux, and PS4. Tested the commandlet. Change 2877691 on 2016/02/23 by Jamie.Dale Added commandlet to extract out the information from our character sheets and put it into the correct dialogue waves #rb Saul.Abreu #tests Built for Windows, Linux, and PS4. Tested the commandlet. Change 2877690 on 2016/02/23 by Jamie.Dale General dialogue wave fixes [CL 2881965 by Andrew Grant in Main branch]
2016-02-25 15:13:33 -05:00
#if WITH_ENGINE
// see comment in LaunchLinux.cpp for details why it is done this way
extern void LaunchLinux_FEngineLoop_AppExit();
#endif // WITH_ENGINE
/**
* Game-specific crash reporter
*/
void CommonLinuxCrashHandler(const FGenericCrashContext& GenericContext)
{
Copying //UE4/Orion-Staging to //UE4/Main (originated from //Orion/Dev-General @ 2831630) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2831624 on 2016/01/17 by Marcus.Wassmer Merge disable of FCachedReadPlatformData on PS4. Reduces memory spikes. 2830986 #rb none #test none #codereview Michael.Noland,James.Golding Change 2831402 on 2016/01/17 by Marcus.Wassmer HLOD priority and streamout changes. Give texture pool an extra 200MB which we can afford thanks to James/Michael #rb Chris.Gagnon #test run agora, notice nice textures. #lockdown Andrew.Grant Change 2831398 on 2016/01/17 by Marcus.Wassmer Fix 3 logic bugs with Relocate #rb chris.gagnon #test run game, look for corruption. #lockdown Andrew.Grant Change 2831372 on 2016/01/16 by Marcus.Wassmer Update param.sfo's and lockdown version in prep for good PS4 playtest build. #rb none #test build from last night... #lockdown Andrew.Grant Change 2831274 on 2016/01/16 by Graeme.Thornton Disable platform file cache wrapper on PS4 #codereview James.Golding #rb none #tests ran cooked ps4 build, timed loading (no real change), measured memory used for file handles (small) Change 2831237 on 2016/01/16 by Sammy.James Fix PS4 compile error #codereview Andrew.Grant #rb none #tests none Change 2831219 on 2016/01/16 by Matt.Kuhlenschmidt Fix possible invalid access to shared movie player resource across threads causing startup crash. #codereview marcus.wassmer #rb none, #tests initial load Change 2831218 on 2016/01/16 by Marcus.Wassmer Fix bad warning case. #codereview Martin.Mittring #rb none #test none Change 2831201 on 2016/01/16 by Andrew.Grant Added extra info about referencer to missing asset reference message #rb none #tests cooked, ran editor Change 2831183 on 2016/01/16 by David.Nikdel #OSS #PS4 #Purchasing #StoreV2 - Force failure if we have no receipts after a "successful" checkout. - Report consumed entitlements as well as unconsumed but leave ValidationInfo empty so we can tell the difference at the application level - Convert productIds to skuIds at checkout time - Added PS4 Implementation of IOnlineStoreV2 - Bugfix: set bSuccessfullyStartedUp=false when InitNPGameSettings() fails - Adjusted FOnlineStoreOffer to use FText::AsCurrencyBase #RB: Paul.Moore #TESTS: login, purchase redemption, store MTX purchasing on PS4 & PC Change 2831129 on 2016/01/16 by David.Nikdel #MCP - Added a ctor to make converting from FOnlineError to FMcpQueryResult easier (for stuff that was already using FMcpQueryResult). #RB: none #TESTS: frontend Change 2830986 on 2016/01/15 by Michael.Noland PS4: Disabling FCachedReadPlatformFile on PS4 to significantly reduce high watermark memory consumption during blocking loads #rb marcus.wassmer #tests Ran Paragon PS4 down a bad path that currently does a blocking map and hero load #lockdown andrew.grant Change 2830943 on 2016/01/15 by Max.Chen Sequencer: Fix bug introduced with preroll. It was also causing a crash in particle track instance. #tests Master sequence trailer plays without crashing #rb none Change 2830912 on 2016/01/15 by Michael.Noland Rendering: Exposed GRHIDeviceId (only filled in on D3D11 and D3D12 RHI's under the same circumstances as GRHIAdapterName, etc..., 0 otherwise) #rb mieszko.zielinski #tests Tested printing the value out #codereview martin.mittring Change 2830910 on 2016/01/15 by Michael.Noland Rendering: Improved GPU driver detection logic to handle more cases #codereview martin.mittring #rb mieszko.zielinski #tests Tested on my machine which was previous reporting Unknown for the values as some entries contained the key in the Settings subfolder Change 2830776 on 2016/01/15 by Martin.Mittring from Dev-Rendering added ensure to track down multiple issues like OR-11771 CRASH: User Crashed when pressing the Play button OR-12430 CRASH: OT2 user crashed with FRHIResource::AddRef() #rb:Gil.Gribb #code_review:Gil.Gribb,Mark.Satterthwaite,Marcus.Wassmer
2016-01-20 11:32:08 -05:00
// at this point we should already be using malloc crash handler (see PlatformCrashHandler)
const FLinuxCrashContext& Context = static_cast< const FLinuxCrashContext& >( GenericContext );
printf("CommonLinuxCrashHandler: Signal=%d\n", Context.Signal);
Copying //UE4/Orion-Staging to //UE4/Main (//Orion/Dev-General @ 2855324) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2855265 on 2016/02/03 by Max.Chen Sequencer: Release track editors when destroying sequencer #jira UE-26423 Change 2855247 on 2016/02/03 by Max.Chen PlacementMode: Null factory check in constructor to fix cooking. #codereview andrew.rodham #rb andrew.rodham #jira UE-26412 ChangeChange 2855116 on 2016/02/03 by Michael.Noland [AUTOMERGE] PS4: Added a log statement when the gap between SubmitDone calls exceeds 2 seconds and removed a duplicate call to set the LastSubmitDoneTime PS4: Fixed a bogus log statement when PS4_GNM_SLOW_FRAME_DEBUGGING=1 Merging CL# 2854751 and 2852176 by way of 2855100 #tests Tested on PS4 with PS4_GNM_SLOW_FRAME_DEBUGGING=1 #rb dave.ratti #lockdown andrew.grant -------- Integrated using branch //Orion/Main_to_//Orion/Dev-General of change#2855109 by Michael.Noland on 2016/02/03 20:59:51. Change 2855109 on 2016/02/03 by Michael.Noland PS4: Added a log statement when the gap between SubmitDone calls exceeds 2 seconds and removed a duplicate call to set the LastSubmitDoneTime PS4: Fixed a bogus log statement when PS4_GNM_SLOW_FRAME_DEBUGGING=1 Merging CL# 2854751 and 2852176 by way of 2855100 #tests Tested on PS4 with PS4_GNM_SLOW_FRAME_DEBUGGING=1 #rb dave.ratti #lockdown andrew.grant Change 2855100 on 2016/02/03 by Michael.Noland PS4: Added a log statement when the gap between SubmitDone calls exceeds 2 seconds and removed a duplicate call to set the LastSubmitDoneTime PS4: Fixed a bogus log statement when PS4_GNM_SLOW_FRAME_DEBUGGING=1 Merging CL# 2854751 and 2852176 using //Orion/Release-Next_to_//Orion/Release-Live #tests Tested on PS4 with PS4_GNM_SLOW_FRAME_DEBUGGING=1 #rb dave.ratti #lockdown andrew.grant ChangeChangeChangeChangeChange 2854825 on 2016/02/03 by Zabir.Hoque Harden MaterialParameterCollection from ending up with duplicate parameter names of GUIDs. #Tests: Ran debug editor, create materail param collection with >500 elements. Still only ~18ms. Used param in shader. #RB: Daniel.Wright #CodeReview: Daniel.Wright, Gil.Gribb, Rolando.Caloca, Marcus.Wassmer Change 2854788 on 2016/02/03 by Josh.Markiewicz #UE4 - JsonObjectConverter changes - added the ability for a UStruct to emit json as a string if type traits are setup with ExportTextItem / ImportTextItem - allows the UStruct to convert to json as something other than FJsonValueObject -- things like FColor, FDateTime but they are already handled differently - checked for possible change in existing behavior, no classes currently use type traits for this that aren't handled special already - FUniqueNetIdRepl can now convert to/from json as a string #rb david.nikdel #codereview ben.zeigler, sam.zamani, david.nikdel, paul.moore #tests various online tests connecting to servers, etc Change 2854751 on 2016/02/03 by Michael.Noland PS4: Fixed a bogus log statement when PS4_GNM_SLOW_FRAME_DEBUGGING=1 #rb dave.ratti #lockdown andrew.grant #tests Tested on PS4 with PS4_GNM_SLOW_FRAME_DEBUGGING=1 ChangeChange 2854712 on 2016/02/03 by Josh.Markiewicz #UE4 - added some json compatibility features to FUniqueNetIdRepl struct - ImportTextItem - To/FromJson #rb david.nikdel #codereview none #tests various online features, additional unit tests added to class Change 2854696 on 2016/02/03 by Dmitry.Rekman Making Memprofiler usable (by MichaelN). #rb Zak.Middleton (who I got the shelved CL # from) #codereview Michael.Noland, Zak.Middleton, Bob.Tellez #tests Used Memprofiler on a number of captures. ChangeChange 2854536 on 2016/02/03 by John.Pollard Add event groups as users to replay, so we can quickly find replays with certain events types in them #rb RyanG #tests Replays and events Merging using OrionDevGeneral->ReleaseCandidate Change 2854526 on 2016/02/03 by John.Pollard Add support for getting replay id #rb RyanG #tests Replays Merging using OrionDevGeneral->ReleaseCandidate Change 2854522 on 2016/02/03 by John.Pollard Support setting string values in perf counters through the perf counters helper class. #rb none #tests Client/Server match [CL 2856676 by Andrew Grant in Main branch]
2016-02-04 23:40:42 -05:00
// better than having mutable fields?
const_cast< FLinuxCrashContext& >(Context).CaptureStackTrace();
if (GLog)
{
GLog->Flush();
}
if (GWarn)
{
GWarn->Flush();
}
if (GError)
{
GError->Flush();
GError->HandleError();
}
Copying //UE4/Orion-Staging to //UE4/Main (//Orion/Dev-General @ 2855324) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2855265 on 2016/02/03 by Max.Chen Sequencer: Release track editors when destroying sequencer #jira UE-26423 Change 2855247 on 2016/02/03 by Max.Chen PlacementMode: Null factory check in constructor to fix cooking. #codereview andrew.rodham #rb andrew.rodham #jira UE-26412 ChangeChange 2855116 on 2016/02/03 by Michael.Noland [AUTOMERGE] PS4: Added a log statement when the gap between SubmitDone calls exceeds 2 seconds and removed a duplicate call to set the LastSubmitDoneTime PS4: Fixed a bogus log statement when PS4_GNM_SLOW_FRAME_DEBUGGING=1 Merging CL# 2854751 and 2852176 by way of 2855100 #tests Tested on PS4 with PS4_GNM_SLOW_FRAME_DEBUGGING=1 #rb dave.ratti #lockdown andrew.grant -------- Integrated using branch //Orion/Main_to_//Orion/Dev-General of change#2855109 by Michael.Noland on 2016/02/03 20:59:51. Change 2855109 on 2016/02/03 by Michael.Noland PS4: Added a log statement when the gap between SubmitDone calls exceeds 2 seconds and removed a duplicate call to set the LastSubmitDoneTime PS4: Fixed a bogus log statement when PS4_GNM_SLOW_FRAME_DEBUGGING=1 Merging CL# 2854751 and 2852176 by way of 2855100 #tests Tested on PS4 with PS4_GNM_SLOW_FRAME_DEBUGGING=1 #rb dave.ratti #lockdown andrew.grant Change 2855100 on 2016/02/03 by Michael.Noland PS4: Added a log statement when the gap between SubmitDone calls exceeds 2 seconds and removed a duplicate call to set the LastSubmitDoneTime PS4: Fixed a bogus log statement when PS4_GNM_SLOW_FRAME_DEBUGGING=1 Merging CL# 2854751 and 2852176 using //Orion/Release-Next_to_//Orion/Release-Live #tests Tested on PS4 with PS4_GNM_SLOW_FRAME_DEBUGGING=1 #rb dave.ratti #lockdown andrew.grant ChangeChangeChangeChangeChange 2854825 on 2016/02/03 by Zabir.Hoque Harden MaterialParameterCollection from ending up with duplicate parameter names of GUIDs. #Tests: Ran debug editor, create materail param collection with >500 elements. Still only ~18ms. Used param in shader. #RB: Daniel.Wright #CodeReview: Daniel.Wright, Gil.Gribb, Rolando.Caloca, Marcus.Wassmer Change 2854788 on 2016/02/03 by Josh.Markiewicz #UE4 - JsonObjectConverter changes - added the ability for a UStruct to emit json as a string if type traits are setup with ExportTextItem / ImportTextItem - allows the UStruct to convert to json as something other than FJsonValueObject -- things like FColor, FDateTime but they are already handled differently - checked for possible change in existing behavior, no classes currently use type traits for this that aren't handled special already - FUniqueNetIdRepl can now convert to/from json as a string #rb david.nikdel #codereview ben.zeigler, sam.zamani, david.nikdel, paul.moore #tests various online tests connecting to servers, etc Change 2854751 on 2016/02/03 by Michael.Noland PS4: Fixed a bogus log statement when PS4_GNM_SLOW_FRAME_DEBUGGING=1 #rb dave.ratti #lockdown andrew.grant #tests Tested on PS4 with PS4_GNM_SLOW_FRAME_DEBUGGING=1 ChangeChange 2854712 on 2016/02/03 by Josh.Markiewicz #UE4 - added some json compatibility features to FUniqueNetIdRepl struct - ImportTextItem - To/FromJson #rb david.nikdel #codereview none #tests various online features, additional unit tests added to class Change 2854696 on 2016/02/03 by Dmitry.Rekman Making Memprofiler usable (by MichaelN). #rb Zak.Middleton (who I got the shelved CL # from) #codereview Michael.Noland, Zak.Middleton, Bob.Tellez #tests Used Memprofiler on a number of captures. ChangeChange 2854536 on 2016/02/03 by John.Pollard Add event groups as users to replay, so we can quickly find replays with certain events types in them #rb RyanG #tests Replays and events Merging using OrionDevGeneral->ReleaseCandidate Change 2854526 on 2016/02/03 by John.Pollard Add support for getting replay id #rb RyanG #tests Replays Merging using OrionDevGeneral->ReleaseCandidate Change 2854522 on 2016/02/03 by John.Pollard Support setting string values in perf counters through the perf counters helper class. #rb none #tests Client/Server match [CL 2856676 by Andrew Grant in Main branch]
2016-02-04 23:40:42 -05:00
return Context.GenerateCrashInfoAndLaunchReporter();
}
/**
* Sets (soft) limit on a specific resource
*
* @param Resource - one of RLIMIT_* values
* @param DesiredLimit - desired value
* @param bIncreaseOnly - avoid changing the limit if current value is sufficient
*/
bool SetResourceLimit(int Resource, rlim_t DesiredLimit, bool bIncreaseOnly)
{
rlimit Limit;
if (getrlimit(Resource, &Limit) != 0)
{
fprintf(stderr, "getrlimit() failed with error %d (%s)\n", errno, strerror(errno));
return false;
}
if (bIncreaseOnly && (Limit.rlim_cur == RLIM_INFINITY || Limit.rlim_cur >= DesiredLimit))
{
if (!UE_BUILD_SHIPPING)
{
printf("- Existing per-process limit (soft=%lu, hard=%lu) is enough for us (need only %lu)\n", Limit.rlim_cur, Limit.rlim_max, DesiredLimit);
}
return true;
}
Limit.rlim_cur = DesiredLimit;
if (setrlimit(Resource, &Limit) != 0)
{
fprintf(stderr, "setrlimit() failed with error %d (%s)\n", errno, strerror(errno));
if (errno == EINVAL)
{
if (DesiredLimit == RLIM_INFINITY)
{
fprintf(stderr, "- Max per-process value allowed is %lu (we wanted infinity).\n", Limit.rlim_max);
}
else
{
fprintf(stderr, "- Max per-process value allowed is %lu (we wanted %lu).\n", Limit.rlim_max, DesiredLimit);
}
}
return false;
}
return true;
}
/**
* Expects GSavedCommandLine to be set up. Increases limit on
* - number of open files to be no less than desired (if specified on command line, otherwise left alone)
* - size of core file, so core gets dumped and we can debug crashed builds (unless overridden with -nocore)
*
*/
static bool IncreasePerProcessLimits()
{
// honor the parameter if given, but don't change limits if not
int32 FileHandlesToReserve = -1;
if (FParse::Value(*GSavedCommandLine, TEXT("numopenfiles="), FileHandlesToReserve) && FileHandlesToReserve > 0)
{
if (!UE_BUILD_SHIPPING)
{
printf("Increasing per-process limit of open file handles to %d\n", FileHandlesToReserve);
}
if (!SetResourceLimit(RLIMIT_NOFILE, FileHandlesToReserve, true))
{
fprintf(stderr, "Could not adjust number of file handles, consider changing \"nofile\" in /etc/security/limits.conf and relogin.\nerror(%d): %s\n", errno, strerror(errno));
return false;
}
}
// core dump policy:
// - Shipping and Test disable by default (unless -core is passed)
// - The rest set it to infinity unless -nocore is passed
// (in all scenarios user wish as expressed with -core or -nocore takes priority)
Merging //UE4/Release-4.11 to //UE4/Main (up to CL#2835147) ========================== MAJOR FEATURES + CHANGES ========================== Change 2817214 on 2016/01/06 by mason.seay Adjusted Walkable Slope Override for mesh #jira UE-24473 Change 2817384 on 2016/01/06 by Michael.Schoell Crash fix when selecting a variable node for a variable that is not owned by a Blueprint. #jira UE-24958 - Crash when getting the sequence player in level blueprint Change 2817438 on 2016/01/06 by Max.Chen Sequencer: Add option to specify position of material name from the movie scene capture interface. For example, MovieCapture_{material}_{width}x{height}.{frame} will create files like this: MovieCapture_FinalImage_1920x1080.0010.exr #rb Andrew.Rodham #jira UE-24926 Change 2817459 on 2016/01/06 by Marc.Audy PR #1679: Move MinRespawnDelay to virtual method AController::GetMinRespawnDelay() (Contributed by bozaro) #jira UE-22309 Change 2817472 on 2016/01/06 by Ben.Marsh Always run UHT in unattended mode from UBT; we don't want it opening any dialogs. Match3 is currently missing a plugin, and it's causing builds to time out. Change 2817473 on 2016/01/06 by Marc.Audy PR #1644: Improve "SpawnActor failed because the spawned actor IsPendingKill" error message (Contributed by slonopotamus) #jira UE-21911 Change 2817533 on 2016/01/06 by Lauren.Ridge Fixing Match3 not compiling in Debug (removed two checks on TileLibrary) #jira UE-25004 Change 2817625 on 2016/01/06 by Taizyd.Korambayil #jira UE-19659 Reimported Template Animations with Proper Skeletons Change 2817647 on 2016/01/06 by Lukasz.Furman replaced ensure during initialization of blackboard based behavior tree task with log warning #ue4 #jira UE-24448 #rb Mieszko.Zielinski Change 2817648 on 2016/01/06 by Lukasz.Furman fixed broken rendering component of navmesh actor after delete-undo operation #ue4 #jira UE-24446 #rb Mieszko.Zielinski Change 2817688 on 2016/01/06 by Taizyd.Korambayil #jira UE-22347 Fixed Message Warnings on Startup Change 2817815 on 2016/01/06 by Jamie.Dale Multiple fixes when editing right-to-left text - Text is now shaped over the entire line to allow rich-text and selected text to be shaped correctly across block boundaries. - Text layout highlights are now able to correctly handle bi-directional and right-to-left text. - Text picking can now handle bi-directional and right-to-left text. - Text picking can now pick the individual characters that make up a ligature glyph. - The caret now draws on the logical (rather than visual) side of the glyph (to handle right-to-left text). - Glyph clusters (multiple glyphs produced from a single character) are now treated as a single logical glyph. - Optimized some of the FShapedGlyphSequence to allow an early out once they've found and processed the start and end glyphs. #jira UE-25013 Change 2817828 on 2016/01/06 by Nick.Darnell Editor - Fixing the OpenLauncher call to be take a structure to allow us to customize it more, and to properly handle the silent command the way we're planning to handle it in the launcher. #jira UE-24563 Change 2818052 on 2016/01/06 by Nick.Darnell Editor - Adding another application check for the launcher to catch the current app name on mac. #jira UE-24563 Change 2818149 on 2016/01/06 by Taizyd.Korambayil #jira UE-19097 Adjusted FirstPerson Pawn, so that Camera doesnt clip the Arm Mesh Change 2818360 on 2016/01/06 by Chris.Babcock Fix reading from ini sections not cached after build system changes for 4.11 #jira UE-25027 #ue4 #android Change 2818369 on 2016/01/06 by Ryan.Vance #jira UE-24976 Adding tessellation support to instanced stereo Change 2818999 on 2016/01/07 by Robert.Manuszewski UHT will no longer try to load game-only plugins. #jira UE-25032 - Changed module type RuntimeNoProgram to RuntimeAndProgram so that bu default Runtime plugin modules won't be loaded by programs - Added better error message when UHT's PreInit fails Change 2819064 on 2016/01/07 by Richard.Hinckley #jira UE-24694 Fixing array usage in 4.11 stream. Change 2819067 on 2016/01/07 by Ori.Cohen When editor tries to spawn a physics asset we automatically load the needed skeletal mesh #rb Matt.K #JIRA UE-24165
2016-01-22 08:13:18 -05:00
bool bDisableCore = (UE_BUILD_SHIPPING != 0 || UE_BUILD_TEST != 0);
if (FParse::Param(*GSavedCommandLine, TEXT("nocore")))
{
bDisableCore = true;
}
if (FParse::Param(*GSavedCommandLine, TEXT("core")))
{
bDisableCore = false;
}
if (bDisableCore)
{
printf("Disabling core dumps.\n");
if (!SetResourceLimit(RLIMIT_CORE, 0, false))
{
fprintf(stderr, "Could not set core file size to 0, error(%d): %s\n", errno, strerror(errno));
return false;
}
}
else
{
printf("Increasing per-process limit of core file size to infinity.\n");
if (!SetResourceLimit(RLIMIT_CORE, RLIM_INFINITY, true))
{
fprintf(stderr, "Could not adjust core file size, consider changing \"core\" in /etc/security/limits.conf and relogin.\nerror(%d): %s\n", errno, strerror(errno));
fprintf(stderr, "Alternatively, pass -nocore if you are unable or unwilling to do that.\n");
return false;
}
}
return true;
}
int CommonLinuxMain(int argc, char *argv[], int (*RealMain)(const TCHAR * CommandLine))
{
FPlatformMisc::SetGracefulTerminationHandler();
if (UE_BUILD_SHIPPING)
{
// only printed in shipping
printf("%s %d %d %d %d\n", StringCast<ANSICHAR>(*FEngineVersion::Current().ToString()).Get(), GEngineMinNetVersion, GEngineNegotiationVersion, GPackageFileUE4Version, GPackageFileLicenseeUE4Version);
}
int ErrorLevel = 0;
if (setenv("LC_NUMERIC", "en_US", 1) != 0)
{
int ErrNo = errno;
fprintf(stderr, "Unable to setenv(LC_NUMERIC): errno=%d (%s)", ErrNo, strerror(ErrNo));
}
setlocale(LC_CTYPE, "");
for (int32 Option = 1; Option < argc; Option++)
{
GSavedCommandLine += TEXT(" ");
// we need to quote stuff that has spaces in it because something somewhere is removing quotation marks before they arrive here
FString Temp = UTF8_TO_TCHAR(argv[Option]);
if (Temp.Contains(TEXT(" ")))
{
if(Temp.StartsWith(TEXT("-")))
{
Temp = Temp.Replace(TEXT("="), TEXT("=\""));
}
else
{
Temp = TEXT("\"") + Temp;
}
Temp += TEXT("\"");
}
GSavedCommandLine += Temp; // note: technically it depends on locale
}
if (!UE_BUILD_SHIPPING)
{
GAlwaysReportCrash = true; // set by default and reverse the behavior
if ( FParse::Param( *GSavedCommandLine,TEXT("nocrashreports") ) || FParse::Param( *GSavedCommandLine,TEXT("no-crashreports") ) )
{
GAlwaysReportCrash = false;
}
}
if (!IncreasePerProcessLimits())
{
fprintf(stderr, "Could not set desired per-process limits, consider changing system limits.\n");
ErrorLevel = 1;
}
else
{
#if UE_BUILD_DEBUG
if( true && !GAlwaysReportCrash )
#else
if( FPlatformMisc::IsDebuggerPresent() && !GAlwaysReportCrash )
#endif
{
// Don't use exception handling when a debugger is attached to exactly trap the crash. This does NOT check
// whether we are the first instance or not!
ErrorLevel = RealMain( *GSavedCommandLine );
}
else
{
FPlatformMisc::SetCrashHandler(CommonLinuxCrashHandler);
GIsGuarded = 1;
// Run the guarded code.
ErrorLevel = RealMain( *GSavedCommandLine );
GIsGuarded = 0;
}
}
Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @ 2879808) ========================== MAJOR FEATURES + CHANGES ========================== #lockdown Nick.Penwarden Change 2879705 on 2016/02/24 by Nick.Darnell Editor - Tweaking some comments. #tests n/a #rb n/a Change 2879674 on 2016/02/24 by Nick.Darnell Editor - The editor now supports many new methods of opening new asset editors. You can choose where tabs open with a great deal more options in Editor Preferences > Appearance > Asset Editor Open Location. This will reset the 'always open asset editors in new windows' option, it completely replaces and enchances that option. #tests Ran the editor, tried each option and they all seem to do what I want. #rb matt.kuhlenschmidt Change 2879661 on 2016/02/24 by Jamie.Dale More general fixes for dialogue waves - The localization key now uses a hash of the speaker and target voice GUIDs to help keep them short. - The localization key can now be user customized, and contains a placeholder format specifier for the context hash. - The "Variations" meta-data is now called "Context". #rb James.Hopkin #tests Built for Windows, Linux, and PS4. Tested a loc gather and export had the correct info in it. Tested the new UI worked as expected. Change 2879436 on 2016/02/24 by Nicholas.Davies A few bug fixes for blocking PS4 > PC chat #jira OR-15467 Disable Paragon chat on PS4 for users outside of the game #RB Antony.Carter #codereview Sam.Zamani #TESTS PS4 whispers to and from none Paragon PC users is blocked. Change 2878929 on 2016/02/23 by Jason.Bestimt #ORION_DEV - Merge Main to reconcile 0.20 branch creation #RB:none #Tests:none Change 2878600 on 2016/02/23 by Dmitry.Rekman Linux: added code to identify CPU for FPSCharts (OR-14949). #rb none #tests Ran dedicated server on local VM and a few physical boxes. Change 2878443 on 2016/02/23 by Marcus.Wassmer Fix game not ticking when PS button is pressed. #rb andrew.grant #test golden path ps4 Change 2878361 on 2016/02/23 by Josh.Markiewicz #UE4 - fixed bad comment #rb none #tests none Change 2878205 on 2016/02/23 by Jason.Bestimt #ORION_DEV - Merge main (0.19) at CL# 2878162 #Tests:none #RB:none Change 2878095 on 2016/02/23 by Josh.Markiewicz #UE4 - added warnings to json mcp read/write failures - removed HostAddressOverride parameter (use -uselocalips and -multihome together instead) #rb none #tests matchmaking golden path Change 2878002 on 2016/02/23 by Josh.Markiewicz #UE4 - made two party framework functions virtual #rb none #tests none Change 2877998 on 2016/02/23 by Josh.Markiewicz #Ue4 - Party interface can optionally enable/disable creating a chat room alongside the party (defaults to enabled) #rb rob.cannaday #tests social/team parties golden path #codereview rob.cannaday Change 2877822 on 2016/02/23 by Olaf.Piesche speculative fix for OR-15710 #rb david.hill #tests PC game Change 2877804 on 2016/02/23 by Uriel.Doyon Fixed ULevel::AddReferencedObjects clearing all references to static texture streaming data #codereview robert.manuszewski #rb marcus.wassmer #tests played several games on PC, also doing rejoin #jira OR-15658 Change 2877692 on 2016/02/23 by Jamie.Dale Added commandlet to replace sound wave players in sound cues with dialogue wave players where appropriate #rb Saul.Abreu #tests Built for Windows, Linux, and PS4. Tested the commandlet. Change 2877691 on 2016/02/23 by Jamie.Dale Added commandlet to extract out the information from our character sheets and put it into the correct dialogue waves #rb Saul.Abreu #tests Built for Windows, Linux, and PS4. Tested the commandlet. Change 2877690 on 2016/02/23 by Jamie.Dale General dialogue wave fixes [CL 2881965 by Andrew Grant in Main branch]
2016-02-25 15:13:33 -05:00
// Final shut down.
#if WITH_ENGINE
LaunchLinux_FEngineLoop_AppExit();
#endif // WITH_ENGINE
Copying //UE4/Orion-Staging to //UE4/Main (Source: //Orion/Dev-General @ 2845681) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2845644 on 2016/01/27 by Martin.Wilson Clear marker sync flag after creating tick record, add more information to checks incase issue occurs again #Jira OR-13469 #rb Thomas.Sarkanen #tests in editor tests, bot match. Change 2845613 on 2016/01/27 by John.Pollard Latest network profiler binaries #rb none #tests run profiler Change 2845595 on 2016/01/27 by Mieszko.Zielinski Fixed pathfollowing's block detection using wrong distance when testing for blockage #UE4 #rb Lukasz.Furman #test golden path Change 2845593 on 2016/01/27 by Jeff.Farris Added support for setting and choosing filmbacks and lenses for cinematic cameras. - New CineCameraComponent and CineCameraActor classes - can define filmback and lens presets via ini file - details customizations for filmback and lens selection - added prototype set of filmbacks and lenses (primes and zooms) - Camera details customization now gracefully handles when CameraSettings category is hidden - example sequencer usage is content/developers/jeff.farris/CineCams/CineCamTestMap #rb none #tests editor Change 2845585 on 2016/01/27 by Marcus.Wassmer Don't fool with connected state if we're early outing from the OS intercepting controller events. This fixes some missing delegates. Fixes cert bug about controller disconnect screen staying up permanently #rb Cody.Haskell #test Turning off controller, turning on again. #lockdown Andrew.Grant Change 2845528 on 2016/01/27 by Max.Chen Sequencer: Fix new spawnables not immediately getting an object binding. This was resulted in a missing +Track->Animation when first creating a spawnable and duplicate transform keys. #jira UE-26084 #tests Add spawnable, +Track->Animation exists #rb none Change 2845483 on 2016/01/27 by Andrew.Rodham Sequencer: Fixed MaximizedViewport not getting cleared/restored correctly #jria UE-26016 #rb Max.Chen #tests Tested the viewports Change 2845421 on 2016/01/27 by Max.Preussner Sequencer: Implemented go-to feature #RB max.chen #TESTS Editor Change 2845407 on 2016/01/27 by Max.Preussner Sequencer: Moved SetViewRange() into ISequencer and made it public #RB max.chen #TESTS none Change 2845404 on 2016/01/27 by Andrew.Rodham Sequencer: Fixed cinematic viewport not updating when dragging transport range #jira UE-26003 #rb Max.Chen #tests Scrubbed the timeline Change 2845396 on 2016/01/27 by David.Nikdel #OSS #Purchase #Store #PS4 - Minor log cleanup #RB: none #TESTS: compiles Change 2845375 on 2016/01/27 by Max.Chen Sequencer: Implement cinematic shot track thumbnails. #jira UE-25125 #tests Rebuild the trailer with the cinematic shot track #rb none Change 2845359 on 2016/01/27 by Marcus.Wassmer Downgrade some checks to ensures. #rb none #test ps4 Change 2845347 on 2016/01/27 by Nicholas.Davies Remove unused EditorStyle dependency from Social. It is not being used, and causes issues for the engine team. #RB Antony.Carter #TESTS n/a #codereview Robert.Manuszewski Change 2845227 on 2016/01/27 by Robert.Manuszewski Adding flags to create callstack map files when building Arxan protection #rb none #tests Built arxan exe Change 2844871 on 2016/01/26 by Andrew.Grant Prevent enums from being regenerated while cooking (prevents false-positive warning about FText's being regenerated) #rb none #tests ran editor [CL 2847722 by Andrew Grant in Main branch]
2016-01-28 16:03:26 -05:00
// check if a specific return code has been set
uint8 OverriddenErrorLevel = 0;
if (FPlatformMisc::HasOverriddenReturnCode(&OverriddenErrorLevel))
{
ErrorLevel = OverriddenErrorLevel;
}
if (ErrorLevel)
{
printf("Exiting abnormally (error code: %d)\n", ErrorLevel);
}
return ErrorLevel;
}
class FLinuxCommonStartupModule : public IModuleInterface
{
/** IModuleInterface implementation */
virtual void StartupModule() override {};
virtual void ShutdownModule() override {};
};
IMPLEMENT_MODULE(FLinuxCommonStartupModule, LinuxCommonStartup);