{"action":"closed","issue":{"number":160,"created_at":"2011-10-11T22:38:19Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"```\r\n[Debug] [Server]: ReceiveCallback - [Exception] System.InvalidOperationException: Nullable object must have a value.\r\n   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)\r\n   at System.Nullable`1.get_Value()\r\n   at Mooege.Core.GS.Player.Stash.AddItem(Item item) in D:\\mooege\\src\\Mooege\\Core\\GS\\Player\\Stash.cs:line 139\r\n   at Mooege.Core.GS.Player.Inventory.IsValidEquipmentRequest(Item item, Int32 equipmentSlot) in D:\\mooege\\src\\Mooege\\Core\\GS\\Player\\Inventory.cs:line 238\r\n   at Mooege.Core.GS.Player.Inventory.HandleInventoryRequestMoveMessage(InventoryRequestMoveMessage request) in D:\\mooege\\src\\Mooege\\Core\\GS\\Player\\Inventory.cs:line 150\r\n   at Mooege.Core.GS.Player.Inventory.Consume(GameClient client, GameMessage message) in D:\\mooege\\src\\Mooege\\Core\\GS\\Player\\Inventory.cs:line 316\r\n   at Mooege.Core.GS.Game.Game.Route(GameClient client, GameMessage message) in D:\\mooege\\src\\Mooege\\Core\\GS\\Game\\Game.cs:line 79\r\n   at Mooege.Net.GS.GameClient.Parse(ConnectionDataEventArgs e) in D:\\mooege\\src\\Mooege\\Net\\GS\\GameClient.cs:line 76\r\n   at Mooege.Net.GS.GameServer.GameServer_DataReceived(Object sender, ConnectionDataEventArgs e) in D:\\mooege\\src\\Mooege\\Net\\GS\\GameServer.cs:line 41\r\n   at Mooege.Net.Server.OnDataReceived(ConnectionDataEventArgs e) in D:\\mooege\\src\\Mooege\\Net\\Server.cs:line 216\r\n   at Mooege.Net.Server.ReceiveCallback(IAsyncResult result) in D:\\mooege\\src\\Mooege\\Net\\Server.cs:line 127\r\n```\r\n\r\nOrigin of the issue :\r\n\r\n```csharp\r\nnamespace Mooege.Core.GS.Player\r\n{\r\n    /// <summary>\r\n    /// This class handels the gridlayout of an stash. Possible usecases are the inventory backpack, shared stash, traders stash,...\r\n    /// Stash is organized by adding an item to EVERY slot it fills\r\n    /// </summary>    \r\n    public class Stash\r\n    {\r\n        /// <summary>\r\n        /// Adds an Item at a free spot to the backpack \r\n        /// </summary>\r\n        /// <param name=\"item\"></param>\r\n        public void AddItem(Item item)\r\n        {\r\n            InventorySlot? slot = FindSlotForItem(item);      <-------------- INIT ISSUE CONDITION\r\n            AddItem(item, slot.Value.Row, slot.Value.Column); <-------------- RAISE ISSUE EXCEPTION\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nIn certain condition (i got this issue doing the followin : equip 1H with shield, removed shield, try to fit 2H with inventory full), null value assigned to slot then slot.XXX raise NullReferencePointerException-like\r\n\r\nMain thread killed down so nothing respond anymore clientside (no disconnection) after this excep raise serverside.","comments":4,"title":"Inventory : System.InvalidOperationException : Nullable object must have a value","updated_at":"2011-10-14T11:35:25Z","url":"https://api.github.com/repos/mooege/mooege/issues/160","id":1881850,"assignee":null,"milestone":null,"closed_at":"2011-10-14T11:35:25Z","user":{"gravatar_id":"7b5c8783c0aa57f298a78912e2b05616","avatar_url":"https://secure.gravatar.com/avatar/7b5c8783c0aa57f298a78912e2b05616?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/PeteGet27","id":1099046,"login":"PeteGet27"},"html_url":"https://github.com/mooege/mooege/issues/160","labels":[],"state":"closed"},"legacy":{"number":160,"action":"closed","issue":1881850}}