{"record":{"id":"ffdf91da1d9402cd","repo":"stride3d/stride","slug":"title-can-not-be-null","errorCode":null,"errorMessage":"Title can not be null","messagePattern":"Title can not be null","errorType":"validation","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Games/GameWindow.cs","lineNumber":182,"sourceCode":"        /// </summary>\n        /// <value><c>true</c> if this window has a border; otherwise, <c>false</c>.</value>\n        public abstract bool IsBorderLess { get; set; }\n\n        /// <summary>\n        /// Gets or sets the title of the window.\n        /// </summary>\n        public string Title\n        {\n            get\n            {\n                return title;\n            }\n\n            set\n            {\n                if (value == null)\n                {\n                    throw new ArgumentNullException(\"value\", $\"{nameof(Title)} can not be null\");\n                }\n\n                if (title != value)\n                {\n                    title = value;\n                    SetTitle(title);\n                }\n            }\n        }\n\n        /// <summary>\n        /// The size the window should have when switching from fullscreen to windowed mode,\n        /// in window coordinates (points; equals pixels on Windows).\n        /// To get the current actual size use <see cref=\"ClientBounds\"/>.\n        /// This gets overwritten when the user resizes the window.\n        /// </summary>\n        public Int2 PreferredWindowedSize { get; set; } = new Int2(768, 432);\n","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Games/GameWindow.cs#L164-L200","documentation":"Thrown by the GameWindow.Title setter when the assigned value is null. The window title must always be a valid string (empty is allowed, null is not), because it is passed to the underlying windowing system; assigning null raises ArgumentNullException with the message '<Title> can not be null'.","triggerScenarios":"Assigning null to game.Window.Title directly, or assigning a variable/property that resolves to null (e.g. from missing config, failed localization lookup, or a null return from a title factory).","commonSituations":"Loading the window title from settings/JSON where the key is missing; localization dictionary miss returning null; passing a nullable field to Title without a null check.","solutions":["Assign a non-null string, using string.Empty if no title is desired","Coalesce null values before assigning: title ?? string.Empty","Fix the settings/localization source so the title resolves to a real value"],"exampleFix":"// before\nwindow.Title = config.WindowTitle;\n// after\nwindow.Title = config.WindowTitle ?? \"My Game\";","handlingStrategy":"validation","validationCode":"if (title == null) title = string.Empty;\nwindow.Title = title;","typeGuard":"string SafeTitle(string? t) => t ?? string.Empty;","tryCatchPattern":"try { window.Title = value; } catch (ArgumentNullException ex) when (ex.ParamName == \"value\") { window.Title = string.Empty; }","preventionTips":["Coalesce nullable title sources before assignment","Validate settings/localization files supply a title","Use string.Empty instead of null for blank titles"],"tags":["window","null-argument","ui"],"backgroundTag":"null-argument","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}