30

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
  • 2
    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
    Commented Apr 15, 2022 at 13:06
  • 3
    @Gimby This is the version of the answer which was deleted: i.imgur.com/y2spA2r.png. It has been edited since.
    – Tom
    Commented 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
    Commented Apr 15, 2022 at 13:52
  • 10
    @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.
    – 0Valt
    Commented 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
    Commented 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.
    – 0Valt
    Commented 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
    Commented 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 :)
    – 0Valt
    Commented 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
    Commented 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
    Commented 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
    Commented Apr 17, 2022 at 10:43
  • @BendertheGreatest a comment by the deleting mod would have helped a lot, thanks.
    – mtd
    Commented 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
    – 0Valt
    Commented Apr 17, 2022 at 11:00
  • 1
    @OlegValteriswithUkraine I did read that quoted section. "A question that has been answered already" is definitely different than "A question with the same answer as a different question", though. So perhaps just "Duplicate questions are 'questions with the exact same answers', or questions that are literal duplicates of each other". But thanks, I will check out those discussions. Thanks again.
    – mtd
    Commented Apr 20, 2022 at 1:49
  • 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
    – 0Valt
    Commented Apr 20, 2022 at 11:46

3 Answers 3

23

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
    Commented Apr 15, 2022 at 17:25
  • 11
    @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
    Commented 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
    Commented 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? Commented 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
    Commented Apr 16, 2022 at 19:37
  • @BendertheGreatest What for? To create another reference people don't give a crap about? Commented Apr 16, 2022 at 20:45
  • 2
    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. Commented 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
    Commented 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... Commented 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. Commented 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. Commented 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. Commented Apr 17, 2022 at 7:57
  • 1
    Thanks for this answer...definitely makes sense to me.
    – mtd
    Commented 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
    Commented 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
    Commented Apr 17, 2022 at 12:31
14

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
    Commented 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
    Commented 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
    Commented 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
    Commented 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
    Commented 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
    Commented 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
    Commented Apr 20, 2022 at 1:56
4

Should these questions have no answers? They represent real problems and seem exactly part of Stack Overflow's mission.

The Stack Exchange Q&A model can be very valuable for presenting info that can be equivalently gleaned from reading issue tickets: the value of writing concise questions that give exactly enough info to pin down the specific problem (which helps with searchability), and the value of summarizing the cause of the issue, known workarounds, and longer-term solutions in answer posts. This is- to my understanding- part of the goal of the Stack Overflow platform- so that you can get straight from problem to solution without having to scroll through and skim / read all the back-and-forth info-gathering, problem isolating, and solution-implementing discussion that happens in issue tickets.

I often deal with questions that have to do with bugs and it seems that people do find them valuable: https://stackoverflow.com/search?tab=votes&q=user%3a11107541%20url%3agithub.com%20url%3aissues%20bug.

Of course, the bug has to be about some piece(s) of software that is on-topic for SO.

The last consideration I can think of right now in terms of the "goodness" of bug-related questions on SO is how likely a Q&A pair about the bug is to have long-term value, which is mostly related to the likelihood that someone will encounter that bug again in the future. I once did some investigation for a why-am-I-getting-weird-behaviour™ question and found out that it was a bug in a beta-release channel of that software- a channel where bugs get patched and released relatively quickly in, and one where the point is for users to actively update. The bug had not yet made it into the stable release channel. I'll wager it to be very unlikely for anyone else to hit that bug again in the future, because it's very unlikely that anyone will use the affected "beta" release again in the future. I don't think I'm a good person to speak about what to do with that Q&A pair since I have a conflict of interest in it. What ended up happening is that I backlinked to the Q&A pair in the issue ticket (I usually do that unless the issue tracker has guidance that discourages such comments), and a maintainer (who has made considerable contributions to SO) voted for it to be closed (it didn't end up closing due to insufficient close-votes).


How should I answer a question about a bug in a programming language or dependencies?

My end goal for such Q&A is

  1. For the question to be easily searchable, and easy to tell what versions the bug applies to (so if someone sees the Q&A in a search engine result, they can get a rough idea of how likely it is that it's about the problem they're facing or not)

  2. For there to be an answer post (mine or someone else's) that- to the extent that I am capable of doing so,

    • Links to the canonical issue ticket(s) for the bug and gives a rough explanation of what the cause is
    • Lists each possible solution (typically, which version to update to) or workaround.

Here's how I typically deal with questions that I suspect to revolve around a bug:

  • If I am confident that another Q&A already covers the bug (often because I have been involved with that question post within the past week or so), I cast my dup-close-vote.

  • If a question that I suspect to be about the same bug has already been posted (often a bug will cause multiple question posts to be posted about it), and I can't cast a dup-close-vote (Ex. for lack of answers), I link to the first or best instance of the question in a comment. I also follow each of those question posts.

  • If I'm aware of specific pieces of information that I think have the potential to help better understand the nature of the bug, or to reproduce it, or to further isolate it, I comment asking for that information. This often involves asking for version and environment information, or asking the asker to follow some well-known troubleshooting steps to isolate the problem or get more information about it. This is useful for two possible reasons: either it turns new info that I can use to find an existing issue ticket, or it saves maintainers time in triage when the issue ticket is later created.

  • Whether or not I try to reproduce the bug depends on context. Sometimes it's something that I should have already encountered in my day-to-day if not for the problem likely depending on more environmental/setup context different from mine. That's what the above bullet helps with.

  • I try to search for an existing bug ticket based on the information provided in the question.

  • If I can't find one in the first page of multiple google search results, I post a comment informing of what search queries I used, the fact that I didn't find anything in the first page of google results, and suggest raising an issue ticket, with instructions on how to do that, or a link to the issue drafting page.

    If there are multiple places the issue could potentially be filed (Ex. bugs that happen with specific combinations of multiple technologies) and I think there's probably a "right answer" but aren't sure yet which one, I try to get more info from the asker to figure that out (usually involves posting some comments giving instructions on how to further isolate the source of the problem). Filing issue tickets in the wrong place is kind of an annoyance / waste of time to everyone involved. I'm often not that confident in the end if I wasn't confident in the first place about where to report, but it's a source of mental relief to know that I made an effort to not be the cause of annoying a busy software maintainer.

    Importantly, I also ask the asker to ping me with a link to their issue ticket. I want to subscribe to notifications on it so I can keep my answer post up to date.

  • I post an answer once a maintainer can reproduce the issue, or other users chime in with workarounds they found. I keep my answer post updated with new workarounds, information about the fix timeline, requests from the maintainers for more diagnostic info, etc. Basically, with anything that is actionable to getting the problem solved.

  • If I can reproduce the problem and can't find an existing issue ticket, sometimes I just go and raise it myself. https://github.com/issues?q=is%3Aissue+author%3Astarball5+stack+overflow

  • Once there is clear information about what version the issue was born in, and in what version it is supposed to be fixed, I edit the question title to contain that version info to help future searchers get an idea of whether the behaviour they're seeing could be related to that bug.

  • Sometimes, if I read changelogs / release notes and see bugs or other things that I expect people will probably bump their heads on- ex. things listed in "known issues" sections, I just go ahead and post a self-answered Q&A myself. Sometimes I'm too lazy, or sometimes I'm just not confident whether it would end up helping anyone (which pretty much translates to whether I think anyone is going to post a question about it later). There have been times where I've posted self-answered Q&A in anticipation of it being useful, and it ending up fruitless(?), and times when I pick the lazy route and end up doing it later because I see related questions popping up repeatedly on Reddit (Ex. this).

  • If I get a spark of personal curiosity, sometimes I go reading source code to try to understand the cause myself, but this is relatively rare.

  • There are various situations where I post an answer even if I am not aware of any solutions or workarounds:

    • I see a need to give very specific instructions on how to raise a bug ticket (Ex. this), or contribute more diagnostic information to an existing one, and I can't reproduce the bug or don't think it would be productive for myself to spend more time seeking out ways to reproduce it
    • If there are existing issue tickets, and the bug is very high-visibility and lots of duplicate questions are getting posted and I'm getting antsy about closing the duplicates to prevent fragmentation of information. I think my perspective on what people on the internet consider useful as an answer is shifting towards finding this acceptable even if duplicate-angst isn't a consideration. Particularly, it started changing in my experience with this question, which I purposely held off answering because I wanted to wait for info about actual fixes to the problem. In the meantime, someone else posted an answer to the effect of "it's a bug. upvote the bug ticket.", and that answer was very well received. I dunno. My thoughts are still forming on this.
    • If I think the explanation of why I am convinced something is a bug has information that is of some sort of long term-value.
  • If (as in the case of some of the directly above bullets) I write an answer post suggesting to raise an issue ticket (instead of a comment), then I ask (via comment, to be consistent with the general guidance that asking for replies in posts is generally redundant and meta commentary) that either the reader comment with a link to their issue ticket if they raise one, or consider editing the link into the answer post (I'm a bit wary of suggesting that people edit my answer to add such a link because I don't want to give off the impression that I'm discouraging someone from writing their own answer post, but I do it because I'm worried that if the original asker gives up, other readers who can't comment might raise an issue ticket, but not be able to comment, and not think to or not want to write up a non-link-only-answer, in which case I'd get out of the loop, which would just be kind of sad I think).

It sounds like a lot, but usually all it ends up producing is a rather short and to-the-point answer post and slightly cleaned up question post. Nothing very impressive.


Answering bug questions can be fun. It can also be boring or make me wish that answer posts I've written that display more "technical prowess" or subject-matter-expertise got as many votes as my pretty run-of-the-mill answer to a super-high-visibility bug. I find that the more "detective work" it involves (that I feel capable of doing), the more I enjoy it.

1
  • 2
    +100 for "so that you can get straight from problem to solution without having to scroll through and skim / read all the back-and-forth... that happens in issue tickets." I've seen many clear cases where official documentation is improved by the Q&A model; bug reports and general "you can search for this", far more so. Commented Sep 28, 2023 at 4:50

You must log in to answer this question.

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