26

How should I answer questions that are of the form "look at this exception I saw"?

Background: I hit a (recent) bug in Python / Cython, manifesting itself in NumPy and in Pandas. I searched, and found two (1, 2) "questions" where people just reported "I got this exception". They were using three pieces of code affected. One question had a useful comment pointing to one of the bug reports I had found. The other question had comments where people assumed the problem was with the user or their code, because they assumed that NumPy / Python couldn't have this kind of bug — a bug they, in fact, have.

Neither question had answers.

My answer of the form "there is a bug, here it is [so you'd better work around it]" was deleted (presumably for not answering the question — I don't know). I provided exactly the information I would have needed to save significant searching to confirm this is a bug (it's a weird one, and leads one to question the underlying libraries, etc., because one doesn't usually expect stable, mature software like NumPy to have problems mutating its most fundamental numerical functions only when running the debugger).

My recent answer is exactly the kind of help I think people come to Stack Overflow for.

Should these questions have no answers? They represent real problems and seem exactly part of Stack Overflow's mission. Or should I improve my answer somehow for it to be undeleted? The only other meta.stackoverflow.com question applicable seems to say "yes, it's OK to tell people 'it can't be done'", so I have edited my (deleted) answer in case it helps people more now. If I had seen my "it's a real bug" answer myself, I would have thought "wow, that's great, I can move on now".

19
  • 1
    It'd be useful to see a screenshot of the answer. I can think of two things, both of which may be irrelevant based on what is and is not in the deleted answer. 1) it was not a self-sustaining answer, link only. You should quote the relevant bits from the bug report. 2) If there is a workaround, it should be part of the answer.
    – Gimby
    Apr 15, 2022 at 13:06
  • 2
    @Gimby This is the version of the answer which was deleted: i.imgur.com/y2spA2r.png. It has been edited since.
    – Tom
    Apr 15, 2022 at 13:09
  • I'm not sure why this one was deleted. Assuming the post is accurate this is a real answer and I feel it should not have been deleted by a moderator. In either event a comment by the mod who deleted it would have been helpful in understanding why it was removed.
    – codewario
    Apr 15, 2022 at 13:52
  • 7
    @BendertheGreatest it looks like the second answer was deleted because we do not allow verbatim reposting of answers. The OP should have voted (flagged) the other question to be closed as a duplicate since the answer is essentially the same. Apr 15, 2022 at 14:09
  • 1
    Ah, that makes sense. I did not check the first link, and didn't realize that OP posted the same answer twice. Since the first answer is now accepted I was able to VTC as a dupe on the second target, but normally you can't VTC as a dupe if the target hgas no positively-scored answers.
    – codewario
    Apr 15, 2022 at 14:13
  • 2
    @BendertheGreatest indeed (my turn to miss things :)), they should have posted a comment on the second question pointing at their answer then and VTC / FTC if the answer gains traction. Apr 15, 2022 at 14:15
  • 5
    Still, a simple comment by the deleting mod would have been helpful here. Not that abuse of power happens very often here but it would be nice to have a more public paper trail of mod decisions outside of This post was deleted by So-And-So, if only to avoid confusion when decisions are being disputed.
    – codewario
    Apr 15, 2022 at 14:17
  • @BendertheGreatest yeah, would've saved us the post. Maybe they misclicked while using Samuel's Duplicate Answer Flags Helper userscript - it has an option to delete with comment. Or maybe they did not know such a script exists :) Apr 15, 2022 at 14:22
  • FWIW, here's an answer I wrote about a bug in PIL / Pillow related to converting image data to Numpy arrays. stackoverflow.com/a/50134667/4014959 That bug managed to survive for several years...
    – PM 2Ring
    Apr 15, 2022 at 15:01
  • FWIW, I've created this QA pair to act as a duplicate target for similar questions about internal errors. But it hasn't had much love. stackoverflow.com/q/57357557/545127
    – Raedwald
    Apr 16, 2022 at 14:38
  • @OlegValteriswithUkraine while I agree that the answer is the same, the two questions are about very different software components and have different stack traces. Of course I understand if the answer is the same and that would mean the questions are duplicated; I'm not sure that that is obvious, in this case. I don't want to cause endless discussion, so would you just be able to comment on this question: are the two questions duplicates, despite being in involving very different software stack (PyCharm vs numpy?) Thanks for your time.
    – mtd
    Apr 17, 2022 at 10:43
  • @BendertheGreatest a comment by the deleting mod would have helped a lot, thanks.
    – mtd
    Apr 17, 2022 at 10:44
  • 1
    @mtd questions themselves do not matter while determining whether they are duplicate (unless there are no answers). If the same answer applies, they are duplicates. That's been the official guideline for closure for ages Apr 17, 2022 at 11:00
  • @mtd Both questions are about code failing in PyCharm debug mode, and both fail at the same numpy component. Even without looking at the answer, these are duplicates. Apr 18, 2022 at 7:16
  • 1
    NP, just FYI, as of today the proposal to rename the close reason became a feature request, you might be interested. Answers do not need to be the same, but yeah, they need to be applicable in the sense that they need to answer the core of the question in the exact same manner. I'll see what I can do to clarify the wording Apr 20, 2022 at 11:46

2 Answers 2

20

I've asked questions about quirky behavior under PowerShell, to have someone knowledgeable enough report that it is in fact a bug. In these cases generally a link to the issue in its tracker is shared in the answer, as well as a workaround to achieve the intended behavior presented in the question. Here is one example of what I mean.

In this example, the answer addresses the buggy behavior in the question, goes above and beyond in linking to the actual GitHub issue tracker for the same issue, and exemplifies how to work around the issue. If at some point the bug is fixed it could be edited in or provided in a new answer.


I feel such answers to questions about bugs should follow this example:

  1. Link to supporting information that it is indeed a bug, if available; and
  2. Provide a workaround to achieve the intended behavior or getting as close to it as possible.

In the case where multiple questions reference a specific bug, either:

  1. Pick the best question with the best answer (subjective, I know), and vote to close the others as duplicates.
  2. If none of them have an answer, answer the best question and vote to close the others as duplicates.
  3. If none of them have a positively scoring answer or accepted answer, follow 2. But instead of voting to close, leave a comment linking to the would-be-duplicate target in the comments of the other questions.

Make sure you don't accidentally vote-to-close or dupe-hammer different questions that end up referencing the same bug. If a bug manifests itself in multiple ways, there is definite value in keeping these questions around.

16
  • 5
    @MisterMiyagi Posts should only be closed as duplicates if the question is the same. If there is one bug, but it manifests itself in multiple ways, then the questions will end up looking different, and they shouldn't be closed as duplicate if the questions themselves are quite different from each other.
    – Flimm
    Apr 15, 2022 at 17:25
  • 9
    @MisterMiyagi "What is the capital of France?" is not a duplicate of "Where was Marion Cotillard born?" even though the answer is the same. Yes, questions are duplicates if they are about the same thing, but they are not necessarily duplicate if they happen to have a similar answer or if they are exposed to a similar bug.
    – Flimm
    Apr 16, 2022 at 5:24
  • 1
    Great clarification, I've added that to this answer as well. There is definitely value in recording multiple conditions of a bug.
    – codewario
    Apr 16, 2022 at 12:59
  • 1
    Why not refer to the Question Close Reasons - Definitions and Guidance: Duplicate instead of trying to provide your own guidelines for duplicate closure? Apr 16, 2022 at 17:54
  • Because this is a nuance that answer doesn't cover in a way I agree with. You are more than welcome to share that in your own answer if you wish.
    – codewario
    Apr 16, 2022 at 19:37
  • @BendertheGreatest What for? To create another reference people don't give a crap about? Apr 16, 2022 at 20:45
  • 1
    Isn't being able to identify two things that look different but are in fact the same as things that are in fact the same the primary value that duplicates add to our knowledgebase? There's a reason that, unlike other forms of closed questions, duplicates can still be upvoted: Good ones (that is, ones that use sufficiently different terms) are expected to add value. A rule that boils down to "don't dupehammer sufficiently different descriptions of the same problem" defeats that value and makes the site worse. Apr 16, 2022 at 20:51
  • 1
    Different problems which happen to share a solution should not be considered duplicates if the problems presented in each question occur under different circumstances. I'm not talking about the same issue worded differently; in the case of bugs, a bug may have multiple triggers and still not manifest under other circumstances. The programming problem is unique, and workarounds may differ. It is also possible for a maintainer to fix triggers A and B of a given bug but still leave trigger C. There is nuance with this question and we would do well to remember that.
    – codewario
    Apr 16, 2022 at 21:26
  • 1
    @BendertheGreatest The nuance is that if the same answer is not applicable - because additional details are needed - then it's not a dupe. Opening the can of worms about different questions, triggers and whatnot only invites to exploit those loopholes... Apr 17, 2022 at 5:30
  • @MisterMiyagi According to your own link, Flimm and Bender are correct. "Duplicate questions are defined as questions that have already been answered on this site." Not questions with answers that have already been given on this site. It boggles the mind that anyone who doesn't understand the difference can pass themselves off as a programmer. Apr 17, 2022 at 6:41
  • 1
    @KevinKrumwiede "In other words, if the question matches exactly to one that has been previously asked, or there is an answer that would serve both questions, that question should be marked as a [Duplicate] and linked to the canonical." I'll refrain from name calling if you don't mind. Apr 17, 2022 at 7:29
  • And to cut the chase short (again!): I am not asking to use "my" specific definition of dupe-voting here. I am asking not to invent a new one but to refer to a canonical one. We can then all bicker over there what it actually means, but maintaining another definition is not helpful. Apr 17, 2022 at 7:57
  • 1
    Thanks for this answer...definitely makes sense to me.
    – mtd
    Apr 17, 2022 at 10:47
  • 1
    @KevinKrumwiede I may not agree with MisterMiyagi here but let's keep it civil. Ad hominem attacks have no place on SO or Meta.
    – codewario
    Apr 17, 2022 at 12:26
  • 1
    Back to the topic at hand, @MisterMiyagi this question should be presumably closed as a dupe then right? Because the SE staff post should already answer it? But since it hasn't been VTC'd yet even once, there must be some value in keeping it around, even though that answer technically covers this case (in a way I disagree with). This may be a lesser example since Meta is a bit more relaxed but dupes are still one of the more common post closure reasons on Meta.
    – codewario
    Apr 17, 2022 at 12:31
12

Your answer seems to be very good and fine as it is. However, it would seem it was deleted due to posting the same identical answer to multiple locations: here and here, so the latter got deleted.

You shouldn't do that. If questions are essentially duplicated, they should be closed as duplicates. If they are not, but the same root cause applies, it is still better to answer in-context rather than with identical answers and explain in detail why in this case the same root cause would apply.

7
  • Thank you. I will add some additional information to my separate answers, next time. I was in a rush because I had spent a lot of time researching the bug, but hopefully will take some extra time next time (it's not that much, to be fair).
    – mtd
    Apr 17, 2022 at 10:46
  • 1
    Wouldn't the answer be even better (so I guess a step beyond "very good and fine") if it described what the bug was, either using a terse summary or some appropriate block quotes? It feels very close to a link-only answer; if nothing else, if those links go away it won't be clear from just the Stack Overflow post what the issue was.
    – M. Justin
    Apr 18, 2022 at 2:46
  • @M.Justin I don't agree - it's really irrelevant what the bug was about and if those links go away it takes nothing from the answer.
    – eis
    Apr 18, 2022 at 4:44
  • 1
    @M.Justin That would make my answer better, yes, so I'm happy to do that. It's sometimes difficult to get in the mindset of fleshing things out when one has been knee-deep in reading various bugs, mostly dead-ends, and stackoverflow comments (not answers ;)) only to find the right answer buried in a comment, then read lots to confirm it's the answer, then collect all the links, and then say more than "yeah it's a bug -- here is the proof". But thanks for the feedback and for taking the time to respond.
    – mtd
    Apr 20, 2022 at 1:53
  • @mtd I hear ya. Sometimes "posting the update" is the last, sometimes neglected, step in the "figure out the obscure issue", happening right after "clean up my code before final commit" and "document the fix for my colleagues in the pull request".
    – M. Justin
    Apr 20, 2022 at 1:54
  • @eis agree that the answer could stand alone even without the links (not that the links to CPython bugs are likely to go away while the answer remains useful), but no harm in the additional info. Agree it's close to a link-only answer, but sometimes the simplest phrasing is best so I'm not too worried that "it's a real bug; there is no fix yet" is "close" to a link-only answer: it's 90% of the conveyable-utility in this case, so the good-turn-for-the-day is pretty done :).
    – mtd
    Apr 20, 2022 at 1:55
  • @M.Justin exactly :). It's usually when motivation is in short supply that bugs in the fundamental programming language you're using hit, anyway :).
    – mtd
    Apr 20, 2022 at 1:56

You must log in to answer this question.

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