Commit Graph

72 Commits

Author SHA1 Message Date
Devin Doucette
e5ec6f8b53 Logging: Reduced stack usage of assertions, crashes, ensures, and fatal logs
- Stack required by failed assertions, fatal logs, and low-level fatal errors decreased by 24,832 bytes.
- Stack required by failed ensures decreased by 18,688 bytes.
- Stack required by non-fatal logs decreased by 8,192 bytes.

#preflight 62d87941bc175ec68c27963e
#rb Zousar.Shaker

[CL 21200368 by Devin Doucette in ue5-main branch]
2022-07-21 09:59:53 -04:00
ronald koppers
12979e53c2 FMessageLog::CriticalError has been deprecated.
FMessageLog::CriticalError has a delay before throwing an assert to allow compositing of the message. As a result the assert isn't thrown at the location of the problem, but somewhere in the surrounding area, which makes the problem harder to debug and generates misleading log entries. Due to these problems FMessageLog::CriticalError and EMessageSeverity::CriticalError have been deprecated. It's recommended to use checkf instead.

When FMessageLog goes out of scope or is destroyed explicitly it will flush its messages to the log, which in turn means the log may immediately use the messages. In a few places a reference to the message was kept that outlived the lifetime of the owning FMessageLog in order to add arguments later on. The found cases have been updated to make sure FMessageLog doesn't outlive the addition of the arguments so the arguments are correctly passed to the log.

#jira: UE-155605
#rb brooke.hubert francis.hurteau jerome.delattre
#preflight 62cc4fca9922f7e5129e4e0a

[CL 21042765 by ronald koppers in ue5-main branch]
2022-07-11 12:58:26 -04:00
bryan sefcik
a9cc65bca4 Updated Core code to not use CoreMinimal.h when possible.
Core public headers still will contain CoreMinimal.h if any included it before my IWYU changes.
#preflight 62c73594756222ced4e48707

[CL 20991367 by bryan sefcik in ue5-main branch]
2022-07-07 16:02:19 -04:00
bryan sefcik
9905eb52bb Pass 2 on running IWYU on Core.
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.
#preflight 62c703bbd13fac04f11da948

[CL 20985655 by bryan sefcik in ue5-main branch]
2022-07-07 12:30:11 -04:00
bryan sefcik
62489fe2b3 Ran a pass of IWYU on Core.
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.

#rb Devin Doucette and Marc Audy
#preflight 62c62086756222ced497ff95
#preflight 62c626d12f2d04691814d331
#preflight 62c630107e606620fdd64e31
#preflight 62c635c6756222ced49a13cf

[CL 20979027 by bryan sefcik in ue5-main branch]
2022-07-06 21:44:18 -04:00
ionut matasaru
29e7e89d3b LogTrace: Workaround for crash in TRACE_LOG_MESSAGE when encounters string arguments not null-terminated (Added and enabled LOGTRACE_RUNTIME_FORMATTING_ENABLED which traces the log messages already preformatted).
#rb Johan.Berg
#preflight 62a34bb7b0150a87f9f04641

[CL 20598673 by ionut matasaru in ue5-main branch]
2022-06-10 13:04:33 -04:00
jorgenpt
af8a301d4a PR #8891: TokenizedMessage: Move exported symbols to .cpp (Contributed by jorgenpt)
Also used the opportunity to convert from MakeShareable to MakeShared.

#jira UE-142104
#preflight 627ec6b70f72dc21c7e13a93
#rb Steve.Robb

[CL 20223845 by jorgenpt in ue5-main branch]
2022-05-16 10:21:43 -04:00
steve robb
87fb605867 TCHAR array init fixes for UTF-8 mode.
#rb devin.doucette
#preflight 6231e536e2541b4ff3af6cd2

#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 19405353 via CL 19408955 via CL 19419621 via CL 19419706
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19420584 by steve robb in ue5-main branch]
2022-03-17 10:29:53 -04:00
steve robb
288f3de432 Fixes for the implicit conversion of ints and chars to TCHARs in UTF-8 mode.
#rb trivial
#preflight 621ed0b4e15c51d8c5e5d081

#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 19219816 via CL 19220283 via CL 19220288 via CL 19223679
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19227684 by steve robb in ue5-main branch]
2022-03-02 15:30:50 -05:00
evgenii babinets
2a96b5126a Small tweak to use ToString instead of manual enum-string conversion for better future-proofing.
#rb jordan.cristiano

#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 19126799 via CL 19129037 via CL 19130002 via CL 19130281 via CL 19133595
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19155550 by evgenii babinets in ue5-main branch]
2022-02-25 15:44:32 -05:00
evgenii babinets
10cf588017 Added logging to indicate when log levels have been raised to verbose levels to help track down log spam.
#rb jordan.cristiano

#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 19125012 via CL 19128515 via CL 19129183 via CL 19129756 via CL 19133572
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19155523 by evgenii babinets in ue5-main branch]
2022-02-25 15:43:28 -05:00
vincent gauthier
8b51660453 Localization: Resolving conflicting Ids in LOC macros
#jira UE-136397
#rb none
#preflight 61eebe505e0414e6ec1e5a19

#ROBOMERGE-AUTHOR: vincent.gauthier
#ROBOMERGE-SOURCE: CL 18708506 in //UE5/Release-5.0/... via CL 18708530 via CL 18708683
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18708694 by vincent gauthier in ue5-main branch]
2022-01-24 10:13:12 -05:00
patrick enfedaque
819bde9b19 New FActorToken for message logs that contains information to select loaded or unloaded actors
original code contributed by: The Coalition

#rb richard.malo, jeanfrancois.dube
#preflight 61e6f268b56c33b8ecef210e

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 18642284 in //UE5/Release-5.0/... via CL 18642299 via CL 18642303
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18642316 by patrick enfedaque in ue5-main branch]
2022-01-18 12:54:01 -05:00
aurel cordonnier
34f55d3a4a Merge from Release-Engine-Test @ 17946149 to UE5/Main
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17949667 by aurel cordonnier in ue5-main branch]
2021-10-27 15:14:40 -04:00
sara schvartzman
8f8de89f24 Fix clear page not clearing the currently viewed page in MessageLog
#jira UE-129593
#rb halfdan.ingvarsson
#preflight 615458864751730001f8eb86
#robomerge 5.0

[CL 17674725 by sara schvartzman in ue5-main branch]
2021-09-30 05:08:32 -04:00
aurel cordonnier
e3f7878676 Merge from Release-Engine-Test @ 17462327 to UE5/Main
This represents UE4/Main @17430120 and Dev-PerfTest @17437669

[CL 17463546 by aurel cordonnier in ue5-main branch]
2021-09-08 16:42:26 -04:00
Martin Ridgers
06a279c40f Updated UE_LOG()-traced events to emit the format arguments in an array-type field instead of as an attachment.
#rb cm
#rnx

[CL 16981278 by Martin Ridgers in ue5-main branch]
2021-07-28 08:25:03 -04:00
sara schvartzman
2901e7ccbd Control Rig: Python commands output to different message log pages depending on the blueprint
#jira UE-119792
#rb helge.mathee

[CL 16968244 by sara schvartzman in ue5-main branch]
2021-07-27 09:58:53 -04:00
aditya ravichandran
fad168c6e5 Updated Message Log to the new style guidelines and added a console command for testing Message Log
#okfforgithub public

#jira UETOOL-2468

#rb lauren.barnes

#preflight 60f9b6d3d3905c0001c644ff

[CL 16930439 by aditya ravichandran in ue5-main branch]
2021-07-22 16:16:57 -04:00
Michael Noland
6284d812b4 Fixing non-unity issue with missing include/forward decl for FString in LogVerbosity
(horde# 85342)
#rnx

[CL 16834580 by Michael Noland in ue5-main branch]
2021-07-12 22:43:15 -04:00
Michael Noland
12c4b10e37 Core: Made the verbosity of the unintialized reflected property check configurable via ini
- Issues with UObject* properties are upgraded from Warning to Error
- Other types remain the same for both engine and project modules (Display), but engine will soon change to Error as well

Settings can be overridden for either project or engine modules in DefaultEngine.ini (engine defaults are in BaseEngine.ini), e.g.,

[CoreUObject.UninitializedScriptStructMembersCheck]
EngineModuleReflectedUninitializedPropertyVerbosity=Error
ProjectModuleReflectedUninitializedPropertyVerbosity=Warning

#rb marc.audy

[CL 16826159 by Michael Noland in ue5-main branch]
2021-07-12 11:49:03 -04:00
Martin Ridgers
823c1858bd Don't trace log messages unless the Log trace channel is enabled. This was incorrectly marking specs as sent even though they weren't causing some log trace events to arrive analysis side without a format string (aka spec).
#rb jb
#rnx
#jira UE-109242

[CL 16755895 by Martin Ridgers in ue5-main branch]
2021-06-23 08:49:05 -04:00
aurel cordonnier
e0ad4e25df Merge from Release-Engine-Test @ 16624776 to UE5/Main
This represents UE4/Main @ 16579691 and Dev-PerfTest @ 16579576

[CL 16625248 by aurel cordonnier in ue5-main branch]
2021-06-10 13:13:24 -04:00
Jamie Dale
4afb7ce6bb Made EName an enum class to prevent implicit conversion to int
The following code would call the int overload rather than the name overload when passed an EName constant, which could easily lead to confusion and bugs:
    using FMyId = uint8;
    void DoThing(FName);
    void DoThing(FMyId);
    DoThing(NAME_Actor);

The change to use enum class requires that any code that actually deals with EName as an int (mostly internal name code and serialisation) be updated to explicitly cast, but prevents the implicit conversion that causes the issue above.

In order to preserve the NAME_X aliases that the old-style enum added to the global scope, new aliases have been added that point to the EName scoped versions. Unfortunately these can cause shadowing warnings if NAME_X is defined in the local scope, as the old-style enum used to allow that without shadowing, however there is no way to prevent this so we'll just need to fix any warnings that occur.

#rb Johan.Torp
#preflight 6087e06349a9840001414708

[CL 16126708 by Jamie Dale in ue5-main branch]
2021-04-27 10:11:18 -04:00
Martin Ridgers
b8ed8ba3d4 When capturing and reporting callstacks, use the return address of a failure instead of a count of stack frames to trim. The count approach was spread about in many places and fragile to maintain as code changed. This resulted in "noisy" callstacks with distracting boilerplate present like assert dispatch functions.
#rb brandon.schaefer,will.damon,johan.berg
#rnx

#ushell-cherrypick of 15568119 by Martin.Ridgers

[CL 15568152 by Martin Ridgers in ue5-main branch]
2021-03-02 07:48:13 -04:00