Bug #405
Crash on startup: System.NullReferenceException
Status: | Closed | Start: | 07/23/2010 | |
Priority: | Immediate | Due date: | ||
Assigned to: | Mirco Bauer | % Done: | 100% |
|
Category: | Engine | |||
Target version: | 0.7.2.1 | |||
Complexity: | Found in Version: | |||
Votes: | 0 |
Description
Smuxi crashes directly on startup with this exception:
2010-07-23 18:59:54,123 [Main] FATAL Smuxi.Frontend.Gnome.MainClass - System.NullReferenceException: Object reference not set to an instance of an object at Smuxi.Engine.FrontendConfig.Load () [0x001d3] in /home/mirco.bauer/projects/smuxi/src/Engine/Config/FrontendConfig.cs:91 at (wrapper remoting-invoke-with-check) Smuxi.Engine.FrontendConfig:Load () at Smuxi.Frontend.Gnome.Frontend.Init (System.String[] args) [0x00161] in /home/mirco.bauer/projects/smuxi/src/Frontend-GNOME/Frontend.cs:209 at Smuxi.Frontend.Gnome.MainClass.Main (System.String[] args) [0x000db] in /home/mirco.bauer/projects/smuxi/src/Frontend-GNOME/Main.cs:75
It gets triggered for new installs and existing installs without remote engines.
Associated revisions
Revision 3da4265a860808d04d51b2c011fceb9850306e0d
Added check to only use default(T) for value types, fixing the startup crash. (closes: #405)
The config backend returned null values for empty strings when using the
Get<T>() method which GetList() does. That happened because value types like
bool and int need extra handling in case the value is empty using the
default(T) construct. This extra handling was also applied for regular string
values and default(string) returned null.
History
Updated by Mirco Bauer 5237 days ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset 3da4265a860808d04d51b2c011fceb9850306e0d.