Help with cause of error please

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • harry

    Help with cause of error please

    Hi

    This error appears from time to time either when my VB.NET program starts or
    at some time during runtime. It is absolutely inconsistent. I change nothing
    in my code and yet after I restart the program the error may or may not
    appear again until some unknopwn future time. Sometimes the error doesn't
    appear for days, other times it appears often in 1 day. It is very strange.

    ///
    An unhandled exception of type 'System.NullRef erenceException ' occurred in
    system.windows. forms.dll

    Additional information: Object reference not set to an instance of an
    object.
    ///

    Public Class frmMain <<<<<< this line triggers the error
    Inherits System.Windows. Forms.Form


    Could someone give me a link or idea on how to trap this error so that I may
    get more detailed explanation of it's cause. If the error was triggered in a
    sub/function I can trap with try/catch, however how do I catch unhandled
    errors in the entire class?

    Thanks
    Harry








  • Ken Tucker [MVP]

    #2
    Re: Help with cause of error please

    Hi,

    Hard to say what is causing the error without seeing your code.

    Ken
    ----------------

    "harry" <harry@nospam > wrote in message
    news:egrc0UNVEH A.1952@TK2MSFTN GP12.phx.gbl:[color=blue]
    > Hi
    >
    > This error appears from time to time either when my VB.NET program starts
    > or
    > at some time during runtime. It is absolutely inconsistent. I change
    > nothing
    > in my code and yet after I restart the program the error may or may not
    > appear again until some unknopwn future time. Sometimes the error doesn't
    >
    > appear for days, other times it appears often in 1 day. It is very
    > strange.
    >
    > ///
    > An unhandled exception of type 'System.NullRef erenceException ' occurred in
    >
    > system.windows. forms.dll
    >
    > Additional information: Object reference not set to an instance of an
    > object.
    > ///
    >
    > Public Class frmMain <<<<<< this line triggers the error
    > Inherits System.Windows. Forms.Form
    >
    >
    > Could someone give me a link or idea on how to trap this error so that I
    > may
    > get more detailed explanation of it's cause. If the error was triggered in
    > a
    > sub/function I can trap with try/catch, however how do I catch unhandled
    >
    > errors in the entire class?
    >
    > Thanks
    > Harry
    >[/color]

    --
    Outgoing mail is certified Virus Free.
    Checked by AVG Anti-Virus (http://www.grisoft.com).
    Version: 7.0.230 / Virus Database: 263.3.0 - Release Date: 6/12/2004


    Comment

    • Sriram Krishnan

      #3
      Re: Help with cause of error please

      It would help if you could post more code - atleast the code in your startup



      --
      Sriram Krishnan
      Microsoft Student Ambassador
      Manager - Chennai .NET Student User Group (www.cnugstudent.net)
      I blog at http://www.dotnetjunkies.com/weblog/sriram

      Comment

      • Armin Zingler

        #4
        Re: Help with cause of error please

        "harry" <harry@nospam > schrieb[color=blue]
        > Hi
        >
        > This error appears from time to time either when my VB.NET program
        > starts or at some time during runtime. It is absolutely inconsistent.
        > I change nothing in my code and yet after I restart the program the
        > error may or may not appear again until some unknopwn future time.
        > Sometimes the error doesn't appear for days, other times it appears
        > often in 1 day. It is very strange.
        >
        > ///
        > An unhandled exception of type 'System.NullRef erenceException '
        > occurred in system.windows. forms.dll
        >
        > Additional information: Object reference not set to an instance of
        > an object.
        > ///
        >
        > Public Class frmMain <<<<<< this line triggers the error
        > Inherits System.Windows. Forms.Form
        >
        >
        > Could someone give me a link or idea on how to trap this error so
        > that I may get more detailed explanation of it's cause. If the error
        > was triggered in a sub/function I can trap with try/catch, however
        > how do I catch unhandled errors in the entire class?[/color]

        Post the callstack when the error occurs.


        --
        Armin

        How to quote and why:



        Comment

        Working...