{"action":"opened","issue":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/3365","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/3365/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/3365/comments","events_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/3365/events","html_url":"https://github.com/lionheart/openradar-mirror/issues/3365","id":100288143,"number":3365,"title":"17958880: During rule evaluation, if the attributedString of the message content returns nil, rule always fails","user":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/classification:crash/hang/data%20loss","name":"classification:crash/hang/data loss","color":"e11d21"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/reproducible:always","name":"reproducible:always","color":"5319e7"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/status:open","name":"status:open","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/10","html_url":"https://github.com/lionheart/openradar-mirror/milestones/Mail","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/10/labels","id":1237424,"number":10,"title":"Mail","description":null,"creator":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"open_issues":34,"closed_issues":0,"state":"open","created_at":"2015-08-03T02:08:35Z","updated_at":"2015-08-11T11:01:36Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-08-11T11:01:36Z","updated_at":"2015-08-11T11:01:36Z","closed_at":null,"body":"#### Description\n\nSummary:\nOccasionally there are HTML messages that are not able to be properly interpreted into an attributedString (see radar# 17958771) during the call to -[MFMessageRule _performAutoResponseActionOnMessage:encrypt:includeOrignalMessageText:]. That method does not deal with the nil return value gracefully, an exception is thrown and the rule always evaluates to nil, even if that content is not really relevant to the rule.\n\nSteps to Reproduce:\n1. Download the attached email message.\n2. Open it in Mail (be careful not to click any links it is spam, though I don’t think it is malware, but I could be wrong)\n3. Move the message into a folder (to run a rule against later)\n4. Create an Inbox rule that redirects all messages (or messages from “onyx_consumer_goods@invitationsonly.club”) to some other email address (other actions can be applied to see the result, such as change the color) (see screenshot below for example rule).\n5. Make sure all other rules are not active to avoid any conflicts.\n6. Run that rule against the downloaded message in the folder you moved it to.\n7. After a delay (with the beach ball) of 60 seconds the action (again see radar: 17958771 about that issue) the actions of the rule are not applied.\n\nExpected Results:\nRule should be applied and message should be moved.\n\nActual Results:\nRule is ignored. An exception is thrown\n“exception raised in routeMessages: -[__NSCFString replaceCharactersInRange:withString:]: nil argument”\n\nRegression:\n\n\nNotes:\n\nThe example email can be downloaded from:\n\nhttp://media.littleknownsoftware.com/bugs/BadContent.eml\n\nHere is a screenshot of the rule that I used.\n\nhttp://media.littleknownsoftware.com/bugs/RuleExample.png\n\nI can reproduce this without plugins installed.\n\n-\nProduct Version: 7.3 (1878.6)\nCreated: 2014-08-08T13:49:11.951064\nOriginated: 2014-08-08T15:47:00\nOpen Radar Link: http://www.openradar.me/17958880"}}