26

Consider this question:

Why does my app crash when I tap the background?

The question at first glance seems to be a perfectly acceptable question for Stack Overflow. An experienced Objective-C/iOS developer, however, will take one glance at it and know that there are not quite enough details in the question to give a specific answer to the actual problem.

And the first comment to the question perfectly illustrates the problem:

The code you have shown is unrelated to the crash you have received. The exception tells you that a resignFirstResponder message was sent to an instance of NSCFString - my guess is that you have assigned a string to your background image instead of a UIImage from the string or something like that. You should show the code where you set the background

The question can be answered with very general advice, but at this point, the question is now basically just a duplicate of any other unrecognized selector sent to instance question in Objective-C (especially when we don't have in the question the exact section of code that is actually causing the error and can't give specific advice).

And after a string of comments, the discussion regarding the question eventually moves to a chat room. Two comments after the chat invite, we see this comment:

@Zhang gave me a solution in the chat. I'm going to let him post that so he can get some points.

So, they rubber-ducked it out in the chatroom, and that's fine. But is the rest fine? "I'm going to let him post that so he can get some points."

The question is posted in such a way that no one else can possibly answer it with specific detail. The posted and accepted answer points to an unposted method in the user's code which needs to be changed.

So either the question is...

  • a duplicate of any other unrecognized selector questions and the answer is to follow the general sorts of troubleshooting you do when encountering this exception
  • unclear what you're asking, because there is NO WAY there's enough detail in the question itself to be able to get to the solution in the accepted answer.

So either the question needs to be closed, or the user needs to add more details into the question (the details that were hashed out in chat/comments) so that the question and answer make more sense to someone else browsing Stack Overflow looking for a solution to a similar problem.

12
  • 9
    Having a chat background info, doesn't improve the quality of a question. What's written in the post counts, simply like that. So down/close vote it for the usual reasons. Commented Apr 4, 2015 at 15:51
  • 33
    Perhaps they should improve the question by editing in the relevant parts they discussed in chat. Then I see no problem with the question/answer.
    – Sacho
    Commented Apr 4, 2015 at 15:57
  • 3
    Exactly -- comment left to that effect. Commented Apr 4, 2015 at 15:58
  • 7
    This is one of the several reasons why moving extended discussions to chat is wrong.
    – zwol
    Commented Apr 4, 2015 at 19:43
  • 10
    @zwol In the end, the details should still be in the question itself. Not in chat, and not in comments, but in the actual question.
    – nhgrif
    Commented Apr 4, 2015 at 20:21
  • 1
    @nhgrif I agree in principle but have encountered numerous cases where rewriting the question (or answer) to the point where the attached comments became superfluous was way more work than it was worth.
    – zwol
    Commented Apr 4, 2015 at 21:06
  • 1
    @zwol In that case, it wasn't chat that was the problem, but the comments. Commented Apr 5, 2015 at 0:03
  • 2
    @NathanTuggy No. The comments were, in fact, excellent, and the dialogue format precisely suited the material added to the question. The only problem was the system treating them as secondary.
    – zwol
    Commented Apr 5, 2015 at 0:34
  • 1
    @zwol: My point is, you take issue either with the general policy of putting everything relevant in the post itself, or else you take issue with comments as much as with chat. Singling out move-to-chat as the greatest problem is not explained by your stated reasoning. Commented Apr 5, 2015 at 0:37
  • 3
    @NathanTuggy My fundamental objection is to the treatment of comments as second-class and ephemeral rather than first-class and permanent. Thus I object to both the policy of folding material back into the question or answer even when that doesn't make sense, and the policy of taking "long" discussions away from the question or answer (which I believe never makes sense).
    – zwol
    Commented Apr 5, 2015 at 0:44
  • 2
    if chat is invoked on a post and then an answer posted by somebody involved in that chat, then would it be plausible to ask when that answer is accepted if the chat helped produce this answer and if so automatically append the chat transcript to the foot of the post? Commented Apr 5, 2015 at 0:57
  • 1
    Like a way to solve it - SO have to concentrate people attention on "do not forget about edit your post with added important marks from comments " sry for bad eng
    – Legendary
    Commented Apr 6, 2015 at 14:18

2 Answers 2

11

We have a perfect close reason for this:

Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example.

If the code isn't there and what we have is insufficient to reproduce or understand the problem, it isn't on-topic. Burn it with fire.

4

"Unrecognized selector sent to instance" questions should all be closed IMHO. Because these kind of questions bothered me, I once added a paragraph to the iOS tag wiki:

Please follow the article My App crashed. Now what? by Ray Wenderlich, before posting any questions relating to app crashes. It explains how to properly debug an iOS-App. It's pointless to ask questions relating to crashes when you don't have a proper backtrace and exception message.

I don't say that everyone should read this article, but I think that everyone who demonstrates by their question that they haven't read it, should have their question closed ;)

At first, this may seem rude, but when you think about it: how can anyone who lacks basic debugging abilities in iOS, work as an iOS developer?

I would vote for "unclear what you are asking", probably accompanied by a link to this meta post. E.g.:

I have flagged this post as "unclear what you are asking", because it is just another duplicate of the "unrecognized selector sent to instance" problem and it lacks specific information to solve the issue. A discussion on how to solve these kinds of issues can be found in this article. See this meta post for discussions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .