Commit Graph

87 Commits

Author SHA1 Message Date
jason stasik
80c3874b45 Fix unbound delegate crash in directory watcher
#rb rex.hill
#preflight 62a3868b183031ae1a23263e

#ROBOMERGE-AUTHOR: jason.stasik
#ROBOMERGE-SOURCE: CL 20600916 via CL 20603516 via CL 20604367 via CL 20604526
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20605936 by jason stasik in ue5-main branch]
2022-06-10 20:32:16 -04:00
Brandon Schaefer
63ef18436c Split logic as previous change may likely introduce some bad issues
#jira none
#rb none
#fyi Michael.Sartain
#preflight none

[CL 19230678 by Brandon Schaefer in ue5-main branch]
2022-03-02 17:06:27 -05:00
Brandon Schaefer
867e4ae5d9 Fix EngineTest for Linux. IgnoreSub dir was not correctly adding files added for the root level item
#jira none
#rb none
#fyi Michael.Sartain
#preflight none

[CL 19229751 by Brandon Schaefer in ue5-main branch]
2022-03-02 16:30:32 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
michael sartain
e45c0dae31 Add subdirectory changes to list of changes in Linux directory watcher
Previously, we only added the new directory and not the contents. The new AssetDataGatherer has this assumption now though:

  // Note that we AddDiscovered but do not scan the directory
  // Any files and paths under it will be added by their own event from the directory watcher, so a scan is unnecessary.
  // The directory may also be scanned in the future because a parent directory is still yet pending to scan,
  // we do not try to prevent that wasteful rescan because this is a rare event and it does not cause a behavior problem

When we iterate the contents of a new directory we now add them to the FileChanges array to match the above.

[at]Brandon.Schaefer, [at]Will.Damon
#jira UE-131552

#ROBOMERGE-AUTHOR: michael.sartain
#ROBOMERGE-SOURCE: CL 17907948 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)

[CL 17907958 by michael sartain in ue5-release-engine-test branch]
2021-10-25 12:35:37 -04:00
michael sartain
c58e7a5d79 Clean up Linux inotify warnings and potential leaks
We still have some duplicate inotify watches, but this first pass will spew a lot more information when we hit inotify limits.

Adds a "DumpINotifyStats" command in non-release builds
  Spews global inotify & UE stats, along with physical count of directories, etc.

Canonicalize directory path in FDirectoryWatcherLinux::RegisterDirectoryChangedCallback_Handle
  Shootergame was adding 141 duplicate watches for Samples/Games/ShooterGame/Content w/o this. Was 1136, is now 995.

Change PathsToWatchDescriptors tmap to PathNameHashSet
  Don't need to store full paths for each watch directory twice

Fix bugs in TestPAL in addition to adding DumpStats() command, which looks ~ like this:

LogDirectoryWatcher: Warning: inotify limits
LogDirectoryWatcher: Warning:   max_queued_events: 16384
LogDirectoryWatcher: Warning:   max_user_instances: 128
LogDirectoryWatcher: Warning:   max_user_watches: 65536
LogDirectoryWatcher: Warning: inotify per-process stats
LogDirectoryWatcher: Warning:   systemd (pid 2239) watches:23 instances:3
...
LogDirectoryWatcher: Warning:   plugin_host-3.3 (pid 395041) watches:62 instances:1
LogDirectoryWatcher: Warning:   plugin_host-3.8 (pid 395044) watches:62 instances:1
LogDirectoryWatcher: Warning:   TestPAL (pid 396852) watches:2 instances:1
LogDirectoryWatcher: Warning: Total inotify Watches:392 Instances:28
LogDirectoryWatcher: Warning: Current watch requests
LogDirectoryWatcher: Warning:   /var/tmp/DirectoryWatcherTest396852: 2 watches
LogDirectoryWatcher: Warning:   Total count:2

The above is also dumped (once) when we fail to init or add a inotify watch.

Need to create better documentation and add a pointer to it, similar to what VSCode does: (hat tip Brandon)

    https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc

Related bugs:

; FPS BP Cooking Content - errno = 28, Out of inotify watches
https://jira.it.epicgames.com/browse/UE-125210

; inotify Warnings when Cooking Content for Linux
https://jira.it.epicgames.com/browse/UE-119696

; Time Niagara Sequencer failed to play | Error: Couldn't find file for package
https://jira.it.epicgames.com/browse/UE-89750

; inotify warnings from Linux command line builds
https://jira.it.epicgames.com/browse/UE-76562

[at]Brandon.Schaefer, [at]James.Singer
#jira UE-76562, UE-89750, UE-119696, UE-125210

#ROBOMERGE-AUTHOR: michael.sartain
#ROBOMERGE-SOURCE: CL 17498916 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17498920 by michael sartain in ue5-release-engine-test branch]
2021-09-13 19:05:02 -04:00
michael sartain
eaa206206c Fix FDirectoryWatchRequestLinux::ProcessChanges() to handle UTF8 filenames
ANSI_TO_TCHAR should be UTF8_TO_TCHAR for event name

[FYI] Brandon.Schaefer
#jira UE-50360
#rb none

#ROBOMERGE-AUTHOR: michael.sartain
#ROBOMERGE-SOURCE: CL 17452991 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17452999 by michael sartain in ue5-release-engine-test branch]
2021-09-07 22:23:47 -04:00
aurel cordonnier
50944fd712 Merge UE5/RES @ 16162155 to UE5/Main
This represents UE4/Main @ 16130047 and Dev-PerfTest @ 16126156

[CL 16163576 by aurel cordonnier in ue5-main branch]
2021-04-29 19:32:06 -04:00
Brandon Schaefer
3cc8ed091b Previous change was to go to Display not Warning
#jira none
#rb none

[CL 16076624 by Brandon Schaefer in ue5-main branch]
2021-04-21 13:21:22 -04:00
Brandon Schaefer
259be63b02 Move error to warning
#jira UE-113997
#rb none

[CL 16076204 by Brandon Schaefer in ue5-main branch]
2021-04-21 12:58:48 -04:00
mark lintott
3ff6f8e1fc #jira UE-111654
#rb trivial
Fixed missing UE4 comment in DirectoryWatcher

#ROBOMERGE-SOURCE: CL 15862517 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15862527 by mark lintott in ue5-main branch]
2021-03-30 11:01:19 -04:00
mark lintott
8ed24f82c6 #jira UE-111654
#rb trivial
Removed references to UE4 in comments

#ROBOMERGE-SOURCE: CL 15796780 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269)

[CL 15797094 by mark lintott in ue5-main branch]
2021-03-24 08:14:12 -04:00
Steve Robb
4fa411c84e Removal of dependencies to Windows Vista or earlier.
#jira UE-110555
#rb josh.adams

[CL 15746365 by Steve Robb in ue5-main branch]
2021-03-19 08:05:49 -04:00
Marc Audy
0cbbc781ca Merge UE5/Release-Engine-Staging @ 15740152 to UE5/Main
This represents UE4/Main @ 15709114

[CL 15740605 by Marc Audy in ue5-main branch]
2021-03-18 15:20:03 -04:00
Matt Kuhlenschmidt
603a4119c5 Fix HAL/PlatformFileManager.h non-portable casing CIS issues
#rb none

[CL 13214257 by Matt Kuhlenschmidt in ue5-main branch]
2020-05-06 17:58:18 -04:00
graeme thornton
a1877a6a7f Linux directory watcher optimizations and fixes for cases where we're running with "virtual" layers in the platform file (i.e. pak files)
#rb arciel.rekman


#ROBOMERGE-SOURCE: CL 12096923 via CL 12096925 via CL 12096927
#ROBOMERGE-BOT: (v657-12064184)

[CL 12096928 by graeme thornton in Main branch]
2020-03-09 19:21:35 -04:00
ryan durand
471d972e62 Updating copyright for Engine Developer.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870584 by ryan durand in Main branch]
2019-12-26 15:32:37 -05:00
brandon schaefer
a715ea4f14 Deprecate GIsRequestingExit
Get GIsRequestingExit now by IsEngineRequestingExit()

Set GIsRequestingExit now by RequestEngineExit(const TCHAR* Reason) or RequestEngineExit(const FString& Reason)
NOTE If Reason is 4 or less chars it will generate an ensure to force a reason to exit

The reason behind this change is right now setting GIsRequestingExit to true can cause many things to break mainly early on and with out any sort of log warning we have entered this state. We should wrap this behind a function to allow for proper handling

#rb Chris.Babcock, Michael.Trepka, Michael.Noland
#jira UE-79933
[FYI] Michael.Noland


#ROBOMERGE-SOURCE: CL 8649683 via CL 8653683
#ROBOMERGE-BOT: (v417-8656536)

[CL 8658680 by brandon schaefer in Main branch]
2019-09-12 14:21:26 -04:00
JeanMichel Dignard
0f9ad96858 Copying //UE4/Dev-Enterprise @ cl 6890376 to Dev-Main (//UE4/Dev-Main)
#lockdown nick.penwarden
#rb none

[CL 6890764 by JeanMichel Dignard in Main branch]
2019-06-07 11:22:52 -04:00
arciel rekman
0751771fd5 Linux: don't let inotify failure break cooks.
- Errors cause Cook commandlet to exit with 1, while this error is arguably benign.

#rb none
[FYI] Brandon.Schaefer
#jira none

#ROBOMERGE-SOURCE: CL 5159901 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 5207560 by arciel rekman in Main branch]
2019-02-26 16:38:44 -05:00
Chris Gagnon
1dd3e0189f Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor)
#rb none

[CL 4730305 by Chris Gagnon in Dev-Editor branch]
2019-01-15 18:47:22 -05:00
Jason Stasik
b89eacb0d6 Remove deleted variable for linux builds
#jira none
#rb none

[CL 4688359 by Jason Stasik in Dev-Editor branch]
2019-01-08 10:12:04 -05:00
Jason Stasik
ff534b0548 Watch directories in AssetRegistry and allow watches on the same directory with different flags
Improve check to determine correct folder hierarchy
#jira UE-67235
#rb jamie.dale

[CL 4688317 by Jason Stasik in Dev-Editor branch]
2019-01-08 09:58:31 -05:00
Chris Gagnon
8fc25ea18e Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor)
#rb none

[CL 4676797 by Chris Gagnon in Dev-Editor branch]
2019-01-02 14:54:39 -05:00
Michael Trepka
04cf14b21d Modified Mac DirectoryWatcher to use the same method of converting CFStringRef to FString that ApplePlatformFile uses to make sure unicode representation of paths is identical.
#jira UE-19801
#rb none

[CL 4561728 by Michael Trepka in Dev-Editor branch]
2018-11-13 10:15:15 -05:00