Packaged game error on start

Hello everybody here.
My demo packaged succesfull, but when i try to start the packaged game i only get this error message:
Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectArray.cpp] [Line: 103]
Max UObject count is invalid. It must be a number that is greater than 0.

Does anybody know what to so ?

Hi Stucki,

I’d recommend you package your game choosing DebugGame as configuration and checking the option to include debug symbols and unreal crash reporter. At least you’ll get a callstack with your crash and from there you can point to what caused your error.

f

Found Pak file …/…/…/opaks_Demo_V_0_70/Content/Paks/opaks_Demo_V_0_70-WindowsNoEditor.pak attempting to mount.
Mounting pak file …/…/…/opaks_Demo_V_0_70/Content/Paks/opaks_Demo_V_0_70-WindowsNoEditor.pak.
PakFile PrimaryIndexSize=189782
PakFile PathHashIndexSize=199918
PakFile FullDirectoryIndexSize=535947
OnPakFileMounted2Time == 0.000006
Not using cached read wrapper
Started task graph with 5 named threads and 47 total threads with 3 sets of task threads.
Stats thread started at 0.082333
Loaded GFSDK_Aftermath_Lib.x64.dll
ICU TimeZone Detection - Raw Offset: +1:00, Platform Override: ‘’
Mounting plugin PTMTool
Mounting plugin DialoguePlugin
Mounting plugin EasyActionPlugin
Mounting plugin NodeGraphAssistant
Mounting plugin PathFollow
Mounting plugin Prefabricator
Mounting plugin RigLogic
Mounting plugin ControlRig
Mounting plugin LevelSequenceEditor
Mounting plugin RopeCutting
Mounting plugin Substance
Mounting plugin VictoryBPLibrary
Mounting plugin ApexDestruction
Mounting plugin SafeDelete
Mounting plugin CleanProject
Mounting plugin AssetManagerEditor
Mounting plugin Paper2D
Mounting plugin AISupport
Mounting plugin EnvironmentQueryEditor
Mounting plugin LightPropagationVolume
Mounting plugin AnimationSharing
Mounting plugin SignificanceManager
Mounting plugin PluginUtils
Mounting plugin PropertyAccessEditor
Mounting plugin UObjectPlugin
Mounting plugin FacialAnimation
Mounting plugin GeometryMode
Mounting plugin SpeedTreeImporter
Mounting plugin DatasmithContent
Mounting plugin VariantManagerContent
Mounting plugin AlembicImporter
Mounting plugin GeometryCache
Mounting plugin AutomationUtils
Mounting plugin ScreenshotTools
Mounting plugin BackChannel
Mounting plugin ChaosClothEditor
Mounting plugin ChaosCloth
Mounting plugin ChaosEditor
Mounting plugin PlanarCut
Mounting plugin GeometryProcessing
Mounting plugin EditableMesh
Mounting plugin GeometryCollectionPlugin
Mounting plugin ProceduralMeshComponent
Mounting plugin ChaosSolverPlugin
Mounting plugin ChaosNiagara
Mounting plugin Niagara
Mounting plugin CharacterAI
Mounting plugin MotoSynth
Mounting plugin PlatformCrypto
Mounting plugin MagicLeapPassableWorld
Mounting plugin MagicLeap
Mounting plugin MLSDK
Mounting plugin MagicLeapLightEstimation
Mounting plugin AvfMedia
Mounting plugin ImgMedia
Mounting plugin MediaCompositing
Mounting plugin WmfMedia
Mounting plugin MegascansPlugin
Mounting plugin PythonScriptPlugin
Mounting plugin EditorScriptingUtilities
Mounting plugin SQLiteSupport
Mounting plugin DatabaseSupport
Mounting plugin SQLiteCore
Mounting plugin MeshPainting
Mounting plugin TcpMessaging
Mounting plugin UdpMessaging
Mounting plugin ActorSequence
Mounting plugin MatineeToLevelSequence
Mounting plugin TemplateSequence
Mounting plugin OnlineSubsystemNull
Mounting plugin OnlineSubsystem
Mounting plugin OnlineSubsystemUtils
Mounting plugin LauncherChunkInstaller
Mounting plugin ActorLayerUtilities
Mounting plugin AndroidPermission
Mounting plugin AppleImageUtils
Mounting plugin ArchVisCharacter
Mounting plugin AssetTags
Mounting plugin AudioCapture
Mounting plugin CableComponent
Mounting plugin ChunkDownloader
Mounting plugin CustomMeshComponent
Mounting plugin ExampleDeviceProfileSelector
Mounting plugin GooglePAD
Mounting plugin LocationServicesBPLibrary
Mounting plugin MobilePatchingUtils
Mounting plugin OculusVR
Mounting plugin PhysXVehicles
Mounting plugin RuntimePhysXCooking
Mounting plugin SoundFields
Mounting plugin SteamVR
Mounting plugin Synthesis
Mounting plugin AudioSynesthesia
Mounting plugin WebMMoviePlayer
Mounting plugin WebMMedia
Mounting plugin WindowsMoviePlayer
MLSDK not found. This likely means the MLSDK environment variable is not set.
Using libcurl 7.55.1-DEV
- built for x86_64-pc-win32
- supports SSL with OpenSSL/1.1.1
- supports HTTP deflate (compression) using libz 1.2.8
- other features:
CURL_VERSION_SSL
CURL_VERSION_LIBZ
CURL_VERSION_IPV6
CURL_VERSION_ASYNCHDNS
CURL_VERSION_LARGEFILE
CURL_VERSION_IDN
CurlRequestOptions (configurable via config and command line):
- bVerifyPeer = true - Libcurl will verify peer certificate
- bUseHttpProxy = false - Libcurl will NOT use HTTP proxy
- bDontReuseConnections = false - Libcurl will reuse connections
- MaxHostConnections = 16 - Libcurl will limit the number of connections to a host
- LocalHostAddr = Default
- BufferSize = 65536
OSS: Creating online subsystem instance for: NULL
WinSock: version 1.1 (2.2), MaxSocks=32767, MaxUdp=65467
OSS: TryLoadSubsystemAndSetDefault: Loaded subsystem for module [NULL]
Build: ++UE4+Release-4.26-CL-15228867
Engine Version: 4.26.1-15228867+++UE4+Release-4.26
Compatible Engine Version: 4.26.0-14830424+++UE4+Release-4.26
Net CL: 14830424
OS: Windows 10 (Release 2009) (), CPU: Intel(R) Core™ i9-9900K CPU @ 3.60GHz, GPU: NVIDIA GeForce RTX 2080
Compiled (64-bit): Jan 28 2021 07:45:06
Compiled with Visual C++: 19.16.27032.01
Build Configuration: Development
Branch Name: ++UE4+Release-4.26
Command Line:
Base Directory: F:/opaks_Demo_0_7_1/WindowsNoEditor/opaks_Demo_V_0_70/Binaries/Win64/
Allocator: binned2
Installed Engine Build: 0
Number of dev versions registered: 30
Dev-ControlRig (A7820CFB-20A7-4359-8C54-2C149623CF50): 6
Dev-Blueprints (B0D832E4-1F89-4F0D-ACCF-7EB736FD4AA2): 10
Dev-Build (E1C64328-A22C-4D53-A36C-8E866417BD8C): 0
Dev-Core (375EC13C-06E4-48FB-B500-84F0262A717E): 4
Dev-Editor (E4B068ED-F494-42E9-A231-DA0B2E46BB41): 40
Dev-Framework (CFFC743F-43B0-4480-9391-14DF171D2073): 37
Dev-Mobile (B02B49B5-BB20-44E9-A304-32B752E40360): 3
Dev-Networking (A4E4105C-59A1-49B5-A7C5-40C4547EDFEE): 0
Dev-Online (39C831C9-5AE6-47DC-9A44-9C173E1C8E7C): 0
Dev-Physics (78F01B33-EBEA-4F98-B9B4-84EACCB95AA2): 4
Dev-Platform (6631380F-2D4D-43E0-8009-CF276956A95A): 0
Dev-Rendering (12F88B9F-8875-4AFC-A67C-D90C383ABD29): 44
Dev-Sequencer (7B5AE74C-D270-4C10-A958-57980B212A5A): 12
Dev-VR (D7296918-1DD6-4BDD-9DE2-64A83CC13884): 3
Dev-LoadTimes (C2A15278-BFE7-4AFE-6C17-90FF531DF755): 1
Private-Geometry (6EACA3D4-40EC-4CC1-B786-8BED09428FC5): 3
Dev-AnimPhys (29E575DD-E0A3-4627-9D10-D276232CDCEA): 17
Dev-Anim (AF43A65D-7FD3-4947-9873-3E8ED9C1BB05): 15
Dev-ReflectionCapture (6B266CEC-1EC7-4B8F-A30B-E4D90942FC07): 1
Dev-Automation (0DF73D61-A23F-47EA-B727-89E90C41499A): 1
FortniteMain (601D1886-AC64-4F84-AA16-D3DE0DEAC7D6): 43
FortniteRelease (E7086368-6B23-4C58-8439-1B7016265E91): 1
Dev-Enterprise (9DFFBCD6-494F-0158-E221-12823C92A888): 10
Dev-Niagara (F2AED0AC-9AFE-416F-8664-AA7FFA26D6FC): 1
Dev-Destruction (174F1F0B-B4C6-45A5-B13F-2EE8D0FB917D): 10
Dev-Physics-Ext (35F94A83-E258-406C-A318-09F59610247C): 40
Dev-PhysicsMaterial-Chaos (B68FC16E-8B1B-42E2-B453-215C058844FE): 1
Dev-CineCamera (B2E18506-4273-CFC2-A54E-F4BB758BBA07): 1
Dev-VirtualProduction (64F58936-FD1B-42BA-BA96-7289D5D0FA4E): 1
Dev-MediaFramework (6F0ED827-A609-4895-9C91-998D90180EA4): 2
Presizing for max 0 objects, including 1 objects not considered by GC, pre-allocating 0 bytes for permanent pool.
Windows GetLastError: Der Vorgang wurde erfolgreich beendet. (0)

Does this mean anything to you ? thx for helping !!

Not really, looks like now you can’t package anymore? Comparing with my latest successful package, the two differences are that I can “mount” plugin MLSDK whereas you get this error:

MLSDK not found.  This likely means the MLSDK environment variable is not set.

Although that shouldn’t be relevant unless you’re using MagicLeap.

Also striking that you presize for 0 objects (penultimate log line), in my case looks more like :

LogInit: Presizing for max 25165824 objects, including 0 objects not considered by GC, pre-allocating 0 bytes for permanent pool.

If you could package yesterday, but you can’t today, and haven’t changed your project, maybe try to uninstall and reinstall the editor. Sometimes black magic work. Sometimes.

So once again, have a look at the callstack in the Crash Reporter (not the log from the packaging). Check what’s before [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectArray.cpp] [Line: 103] Max UObject count is invalid.] That should point you to the culprit.

i can still package the game. many warnings, no errors.
but when i start the packaged game …

i want to submit to a contest and have to deliver to february the eights …
and no idea what to do.

I know this is late, but this is the only topic on google related to this crash, so I’m leaving the answer here.

ERROR Message:

“Max UObject count is invalid. It must be a number that is greater than 0.” when launching packaged game.

SOLUTION:

The crash is caused by the setting “Maximum number of UObjects that can exist in cooked game”. The setting is found in Project Setting > Engine > Garbage Collection. By default, this was set to ZERO for me. Obviously shouldn’t be zero.

No idea what is the best number to use here, so I copied used the number 25165824 (This is the default for “Maximum number of UObjects that can exist in THE EDITOR”).

This resolves the crash when launching the packaged game.