Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6056283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:21:33+00:00 2026-05-23T08:21:33+00:00

I am debuggin a subtle bug that is thrown from a .net custom component

  • 0

I am debuggin a subtle bug that is thrown from a .net custom component (no source and obfuscated). The component throws a NullReferenceException in its OnPaint() method which makes calls to subscribers, including my code. I am 100% sure that the problem is in my code. The problem is that visual studio debugger does not stop at the point where the exception is thrown, as it should (I enabled NullReferenceException in the Debug/Exceptions dialog).

This is the first time I encountered such a problem in visual studio. Any ideas on identifying offending code, please?

Kemal

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:21:34+00:00Added an answer on May 23, 2026 at 8:21 am

    Likely the problem is your code isn’t throwing the NullReferenceException, however it is probably returning null at some point. You could try adding guard conditions at the end of your functions that ensure you are not returning null, such as an Debug.Assert(retVal != null, "Returned null in function").

    If you are sure you own code is throwing a NullReferenceException, make sure you turn on thrown exceptions, rather than user-unhandled ones.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use Monkey debuggin tool (from adb) to stress test a part
Debugging asp.net websites/web projects in visual studio.net 2005 with Firefox is loads slower than
Debugging with gdb, any c++ code that uses STL/boost is still a nightmare. Anyone
Debugging a Firefox addon is a slow process: (1) edit source code in a
When debugging web sites that I'm working on, I tend to use Attach to
I have developed a PHP script that uses $_REQUEST[] superglobal. A typical client request
I get an AccessViolationException when I try to start debuggin a C#-MVC2-webproject in VisualStudio
I'm creating asp.net mvc login page. This is simple. Same as others. Controller contains
Debugging a complex jQuery-based application that wasn't working in Opera browser, I traced back
I have a trouble with pre-population of the forms in Django. Because debuggin tool

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.