Before you ask your question in a channel...
  1. Read How To Ask Questions the Smart Way.
  2. Prepare a simple test case. This will be the smallest subset of your original code that is valid stand-alone code and still produces the problem.
    ...but that will take too much time!
    You are asking others to take the time to look over your code, the least you can do it prepare it in a way they can actually use. Also, if it actually takes a long time to prepare, see the next item.
    ...but my problem is complex, I can't possibly extract a subset!
    Then your real problem is that your code is too sloppy/complicated. Refactor it. The problem will probably go away on its own; and in the future you will have an easier time sharing your code.
    ...but my code is proprietary and I can't share it!
    Then you are either not simplifying your test case enough, or your problem is with your actual algorithm and not your implementation. Neither of which can be solved by strangers without access to your code and/or algorithm documentation.
  3. Post your test case on a pastebin site. This allows people to see your code and download it/compile it/run it themselves.
Finally, ask in the channel. The most important factor as to whether or not you eventually fix your problem depends on how you ask your question in the channel. See #1. If you come off as ignorant, arrogant; if you provide too little information or too much irrelevant information you will likely not be helped.