{"action":"created","issue":{"url":"https://api.github.com/repos/Parker147/Legends-Viewer/issues/18","labels_url":"https://api.github.com/repos/Parker147/Legends-Viewer/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/Parker147/Legends-Viewer/issues/18/comments","events_url":"https://api.github.com/repos/Parker147/Legends-Viewer/issues/18/events","html_url":"https://github.com/Parker147/Legends-Viewer/issues/18","id":56021829,"number":18,"title":"Crash in \"hf learns secret\"-type events when the teacher ID is not set","user":{"login":"MatthiasValvekens","id":6440095,"avatar_url":"https://avatars.githubusercontent.com/u/6440095?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthiasValvekens","html_url":"https://github.com/MatthiasValvekens","followers_url":"https://api.github.com/users/MatthiasValvekens/followers","following_url":"https://api.github.com/users/MatthiasValvekens/following{/other_user}","gists_url":"https://api.github.com/users/MatthiasValvekens/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthiasValvekens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthiasValvekens/subscriptions","organizations_url":"https://api.github.com/users/MatthiasValvekens/orgs","repos_url":"https://api.github.com/users/MatthiasValvekens/repos","events_url":"https://api.github.com/users/MatthiasValvekens/events{/privacy}","received_events_url":"https://api.github.com/users/MatthiasValvekens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-30T11:16:16Z","updated_at":"2015-01-30T12:24:33Z","closed_at":null,"body":"This was the event that caused the problem:\r\n```\r\n\t<historical_event>\r\n\t\t<id>26699</id>\r\n\t\t<year>125</year>\r\n\t\t<seconds72>22995</seconds72>\r\n\t\t<type>hf learns secret</type>\r\n\t\t<student_hfid>4018</student_hfid>\r\n\t\t<teacher_hfid>-1</teacher_hfid>\r\n\t\t<artifact_id>54</artifact_id>\r\n\t\t<interaction>SECRET_1</interaction>\r\n\t</historical_event>\r\n```\r\nThe HF in question is my adventurer, who learned the secrets of life and death by reading a tome. Hence, there's no teacher involved as such. I got a NullReferenceException on the LegendsViewer.Legends.HFLearnsSecret.Print call when I tried to view my adventurer's summary page in LegendsViewer.\r\n\r\nChanging the teacher_hfid to match the student's fixed the issue, though, but there's probably some code assuming that a teacher id is always set to some sensible value.\r\n\r\nI don't have a working C# build environment at hand right now, but I'll try and track down the piece of code responsible for the crash."},"comment":{"url":"https://api.github.com/repos/Parker147/Legends-Viewer/issues/comments/72193565","html_url":"https://github.com/Parker147/Legends-Viewer/issues/18#issuecomment-72193565","issue_url":"https://api.github.com/repos/Parker147/Legends-Viewer/issues/18","id":72193565,"user":{"login":"yukihyou","id":5215014,"avatar_url":"https://avatars.githubusercontent.com/u/5215014?v=3","gravatar_id":"","url":"https://api.github.com/users/yukihyou","html_url":"https://github.com/yukihyou","followers_url":"https://api.github.com/users/yukihyou/followers","following_url":"https://api.github.com/users/yukihyou/following{/other_user}","gists_url":"https://api.github.com/users/yukihyou/gists{/gist_id}","starred_url":"https://api.github.com/users/yukihyou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukihyou/subscriptions","organizations_url":"https://api.github.com/users/yukihyou/orgs","repos_url":"https://api.github.com/users/yukihyou/repos","events_url":"https://api.github.com/users/yukihyou/events{/privacy}","received_events_url":"https://api.github.com/users/yukihyou/received_events","type":"User","site_admin":false},"created_at":"2015-01-30T12:24:33Z","updated_at":"2015-01-30T12:24:33Z","body":"> Artifact ID 54 refers to a book that doesn't exist in the legends XML\r\n\r\nThat'd do it."}}