{"action":"created","issue":{"url":"https://api.github.com/repos/OpenMods/OpenPeripheral/issues/258","labels_url":"https://api.github.com/repos/OpenMods/OpenPeripheral/issues/258/labels{/name}","comments_url":"https://api.github.com/repos/OpenMods/OpenPeripheral/issues/258/comments","events_url":"https://api.github.com/repos/OpenMods/OpenPeripheral/issues/258/events","html_url":"https://github.com/OpenMods/OpenPeripheral/issues/258","id":105921517,"number":258,"title":"\"You are not attached to this Computer\" Bug","user":{"login":"thebrightspark","id":11932411,"avatar_url":"https://avatars.githubusercontent.com/u/11932411?v=3","gravatar_id":"","url":"https://api.github.com/users/thebrightspark","html_url":"https://github.com/thebrightspark","followers_url":"https://api.github.com/users/thebrightspark/followers","following_url":"https://api.github.com/users/thebrightspark/following{/other_user}","gists_url":"https://api.github.com/users/thebrightspark/gists{/gist_id}","starred_url":"https://api.github.com/users/thebrightspark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thebrightspark/subscriptions","organizations_url":"https://api.github.com/users/thebrightspark/orgs","repos_url":"https://api.github.com/users/thebrightspark/repos","events_url":"https://api.github.com/users/thebrightspark/events{/privacy}","received_events_url":"https://api.github.com/users/thebrightspark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-09-11T00:00:10Z","updated_at":"2015-12-26T20:22:21Z","closed_at":null,"body":"EDIT: Using following versions of mods:\r\n  OpenModsLib 1.7.10-0.8\r\n  OpenPeripheralCore 1.7.10-1.2\r\n  OpenPeripheralAddons 1.7.10-0.4\r\n  OpenPeripheralIntegration 1.7.10-0.3\r\n  ComputerCraft 1.74\r\n\r\nThis seems to happen randomly, but when it happens, the program I'm trying to run crashes with the following error:\r\n\"Java Exception Thrown: java.lang.RuntimeException: You are not attached to this Computer\"\r\n\r\nSo far this has happened with two programs I have written. One on a gold turtle, and one on a normal computer. Both use blocks wrapped as peripherals - gold turtle has a vanilla chest and a Blood Magic Blood Altar, and the computer has an EnderIO Fluid Tank.\r\n\r\nHere are the respective programs, for your reference:\r\nGold Turtle -> http://pastebin.com/0wm0B5gB\r\nNormal Computer -> http://pastebin.com/k8KmTZNL\r\n\r\nIt's quite annoying as a bug, and happens much more frequently for the turtle program than the computer,\r\n\r\nHere's also screenshots of the two computers with the crash shown:\r\n![bug](https://cloud.githubusercontent.com/assets/11932411/9803973/6025ae9e-5820-11e5-8683-20c5759887c9.PNG)\r\n![bug2](https://cloud.githubusercontent.com/assets/11932411/9803974/602ce3d0-5820-11e5-94dc-a62e08b694bf.PNG)\r\n"},"comment":{"url":"https://api.github.com/repos/OpenMods/OpenPeripheral/issues/comments/167358269","html_url":"https://github.com/OpenMods/OpenPeripheral/issues/258#issuecomment-167358269","issue_url":"https://api.github.com/repos/OpenMods/OpenPeripheral/issues/258","id":167358269,"user":{"login":"boq","id":754542,"avatar_url":"https://avatars.githubusercontent.com/u/754542?v=3","gravatar_id":"","url":"https://api.github.com/users/boq","html_url":"https://github.com/boq","followers_url":"https://api.github.com/users/boq/followers","following_url":"https://api.github.com/users/boq/following{/other_user}","gists_url":"https://api.github.com/users/boq/gists{/gist_id}","starred_url":"https://api.github.com/users/boq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boq/subscriptions","organizations_url":"https://api.github.com/users/boq/orgs","repos_url":"https://api.github.com/users/boq/repos","events_url":"https://api.github.com/users/boq/events{/privacy}","received_events_url":"https://api.github.com/users/boq/received_events","type":"User","site_admin":false},"created_at":"2015-12-26T20:22:21Z","updated_at":"2015-12-26T20:22:21Z","body":"`isPresent` checks, if there is any peripheral under given name, not if it's in valid state. I think that `pcall` is only option. It should be fairly easy to implement - exceptions propagate, so just wrap whole problematic part of code in function and call with `pcall`."}}