{"action":"created","issue":{"url":"https://api.github.com/repos/danthorpe/Operations/issues/387","repository_url":"https://api.github.com/repos/danthorpe/Operations","labels_url":"https://api.github.com/repos/danthorpe/Operations/issues/387/labels{/name}","comments_url":"https://api.github.com/repos/danthorpe/Operations/issues/387/comments","events_url":"https://api.github.com/repos/danthorpe/Operations/issues/387/events","html_url":"https://github.com/danthorpe/Operations/issues/387","id":168426106,"number":387,"title":"AlertOperation doesn't fire in 3.0.0","user":{"login":"ryanjm","id":90015,"avatar_url":"https://avatars.githubusercontent.com/u/90015?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanjm","html_url":"https://github.com/ryanjm","followers_url":"https://api.github.com/users/ryanjm/followers","following_url":"https://api.github.com/users/ryanjm/following{/other_user}","gists_url":"https://api.github.com/users/ryanjm/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanjm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanjm/subscriptions","organizations_url":"https://api.github.com/users/ryanjm/orgs","repos_url":"https://api.github.com/users/ryanjm/repos","events_url":"https://api.github.com/users/ryanjm/events{/privacy}","received_events_url":"https://api.github.com/users/ryanjm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/danthorpe/Operations/labels/waiting%20for%20response","name":"waiting for response","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-29T22:22:14Z","updated_at":"2016-08-01T16:54:43Z","closed_at":null,"body":"Were there any major changes to the way AlertOperation works in 3.0.0? Code which was working before doesn't anymore and my queue ends up with two operations which never complete:\r\n\r\n```\r\n(lldb) po [[mainOperationQueue] operations]\r\n<__NSArrayM 0x7f96623bbf90>(\r\n<_TtGC10Operations14AlertOperationCSo16UIViewController_: 0x7f96611a3ce0>{name = 'Error'},\r\n<_TtGC10Operations11UIOperationCSo17UIAlertControllerCSo16UIViewController_: 0x7f965ee640c0>{name = 'UIOperation<UIAlertController>'}\r\n)\r\n```\r\n\r\nFrom what I can tell, `execute` is never called on `UIOperation`. But I don't see any changes between 2.10 and 3.0.0 with that class. I've tried adding break statements into the Operation code base but it doesn't let me access the variables there:\r\n\r\n```\r\n(lldb) po self\r\nerror: <EXPR>:10:9: warning: initialization of variable '$__lldb_error_result' was never used; consider replacing with assignment to '_' or removing it\r\n    var $__lldb_error_result = __lldb_tmp_error\r\n    ~~~~^~~~~~~~~~~~~~~~~~~~\r\n    _\r\n<EXPR>:16:5: error: use of unresolved identifier '$__lldb_injected_self'\r\n    $__lldb_injected_self.$__lldb_wrapped_expr_43(  \r\n```\r\n\r\nI'm creating my alert in a pretty standard way:\r\n\r\n```swift\r\nlet alert = AlertOperation(presentAlertFrom: presentationContext)\r\nalert.title = \"Error\"\r\nalert.message = msg\r\nqueue.addOperation(alert)\r\n```\r\n\r\nWhat can I do to check why those operations aren't being run?"},"comment":{"url":"https://api.github.com/repos/danthorpe/Operations/issues/comments/236639695","html_url":"https://github.com/danthorpe/Operations/issues/387#issuecomment-236639695","issue_url":"https://api.github.com/repos/danthorpe/Operations/issues/387","id":236639695,"user":{"login":"ryanjm","id":90015,"avatar_url":"https://avatars.githubusercontent.com/u/90015?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanjm","html_url":"https://github.com/ryanjm","followers_url":"https://api.github.com/users/ryanjm/followers","following_url":"https://api.github.com/users/ryanjm/following{/other_user}","gists_url":"https://api.github.com/users/ryanjm/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanjm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanjm/subscriptions","organizations_url":"https://api.github.com/users/ryanjm/orgs","repos_url":"https://api.github.com/users/ryanjm/repos","events_url":"https://api.github.com/users/ryanjm/events{/privacy}","received_events_url":"https://api.github.com/users/ryanjm/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T16:54:43Z","updated_at":"2016-08-01T16:54:43Z","body":"I've downloaded and run the example project you reference. The only difference I see in my code is where my operation is being generated. \r\n\r\nI'm creating mine from an observer and then adding it to my global queue. This also means that I'm having to \"find\" the `UIViewController` to present the alert from, but when I put a break point into my code, the view controller is the one I'm expecting to see.\r\n\r\nI've even tested the presentation method directly in that view controller and it works as expected (no surprise there):\r\n\r\n```\r\nUIAlertController *alert = [UIAlertController alertControllerWithTitle:@\"Test message\" message:@\"msg\" preferredStyle:UIAlertActionStyleDefault];\r\n[alert addAction:[UIAlertAction actionWithTitle:@\"OK\" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {\r\n    NSLog(@\"Done\");\r\n}]];\r\n[self presentViewController:alert animated:true completion:nil];\r\n```\r\n\r\nI've even tried changing which queue the alert operation is put on, but that didn't change anything:\r\n\r\n```\r\nOperationQueue.mainQueue().addOperation(alert)\r\n```\r\n\r\nThose two operations just remain stuck on that queue instead.\r\n\r\nVery strange."}}
{"actor":{"display_login":"ryanjm"}}