{"action":"created","issue":{"url":"https://api.github.com/repos/tgstation/-tg-station/issues/13162","labels_url":"https://api.github.com/repos/tgstation/-tg-station/issues/13162/labels{/name}","comments_url":"https://api.github.com/repos/tgstation/-tg-station/issues/13162/comments","events_url":"https://api.github.com/repos/tgstation/-tg-station/issues/13162/events","html_url":"https://github.com/tgstation/-tg-station/issues/13162","id":118289657,"number":13162,"title":"Runtime when calling mob/new_player/Login()","user":{"login":"phil235","id":3476142,"avatar_url":"https://avatars.githubusercontent.com/u/3476142?v=3","gravatar_id":"","url":"https://api.github.com/users/phil235","html_url":"https://github.com/phil235","followers_url":"https://api.github.com/users/phil235/followers","following_url":"https://api.github.com/users/phil235/following{/other_user}","gists_url":"https://api.github.com/users/phil235/gists{/gist_id}","starred_url":"https://api.github.com/users/phil235/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil235/subscriptions","organizations_url":"https://api.github.com/users/phil235/orgs","repos_url":"https://api.github.com/users/phil235/repos","events_url":"https://api.github.com/users/phil235/events{/privacy}","received_events_url":"https://api.github.com/users/phil235/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tgstation/-tg-station/labels/Bug","name":"Bug","color":"d7e102"},{"url":"https://api.github.com/repos/tgstation/-tg-station/labels/Runtime","name":"Runtime","color":"FFD000"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-22T21:30:54Z","updated_at":"2015-11-22T23:11:03Z","closed_at":null,"body":"runtime error: Cannot modify null.active.\r\nproc name: sync mind (/mob/proc/sync_mind)\r\n  source file: mind.dm,1693\r\n  usr: (src)\r\n  src: Anthony Catleay (/mob/dead/observer)\r\n  src.loc: the floor (41,145,1) (/turf/simulated/floor/plasteel/shuttle)\r\n  call stack:\r\nAnthony Catleay (/mob/dead/observer): sync mind()\r\nAnthony Catleay (/mob/dead/observer): Login()\r\nAnthony Catleay (/mob/dead/observer): Login()\r\nMrMicrowave (/mob/new_player): Topic(\"src=\\[mob_118];observe=1\", /list (/list))\r\nMrMicrowave (/client): Topic(\"src=\\[mob_118];observe=1\", /list (/list), MrMicrowave (/mob/new_player))\r\n\r\nCaused by https://github.com/tgstation/-tg-station/pull/12869/files#diff-c3d8d983e2c6ebdd2156952858c6907bR2 @Menshin \r\nThis calls mob/Login() which calls sync_mind() which then calls /mob/dead/observer/mind_initialize() which does nothing (and do not create a mind) then mind.active is called when mind is still null.\r\n\r\nThe runtime happens hundreds of times (each time someone logs in)."},"comment":{"url":"https://api.github.com/repos/tgstation/-tg-station/issues/comments/158817290","html_url":"https://github.com/tgstation/-tg-station/issues/13162#issuecomment-158817290","issue_url":"https://api.github.com/repos/tgstation/-tg-station/issues/13162","id":158817290,"user":{"login":"Menshin","id":7117411,"avatar_url":"https://avatars.githubusercontent.com/u/7117411?v=3","gravatar_id":"","url":"https://api.github.com/users/Menshin","html_url":"https://github.com/Menshin","followers_url":"https://api.github.com/users/Menshin/followers","following_url":"https://api.github.com/users/Menshin/following{/other_user}","gists_url":"https://api.github.com/users/Menshin/gists{/gist_id}","starred_url":"https://api.github.com/users/Menshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Menshin/subscriptions","organizations_url":"https://api.github.com/users/Menshin/orgs","repos_url":"https://api.github.com/users/Menshin/repos","events_url":"https://api.github.com/users/Menshin/events{/privacy}","received_events_url":"https://api.github.com/users/Menshin/received_events","type":"User","site_admin":false},"created_at":"2015-11-22T23:11:03Z","updated_at":"2015-11-22T23:11:03Z","body":"I didn't caused this, whoever put _sync_mind()_ at the end of the _Login()_ proc did (merged from here https://github.com/tgstation/-tg-station/commit/8fce742d0a064d46203c3d2815b2ede311c65677).\r\n\r\nThe runtime would still be present even if i didn't tweaked the new_player _Login()_, since the culprit is choosing to observe at round start delete the new_player mind, yet _sync_mind()_ is still called on the newly created observer anyway.\r\n\r\nAlso, _sync_mind_ is still called for some /camera/mobs and  /livings _Logins()_ despite being called at root  level_ Login()_ now."}}