Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Exception at address

Exception at address

Scheduled Pinned Locked Moved Visual Basic
csharpquestion
6 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VFaul
    wrote on last edited by
    #1

    My VB .NET app is causing an unhandled exception. When I look at the exception details, it shows me the hex address where the exception is occurring. How I determine where in my code this is happening given an address? Thanks

    C 1 Reply Last reply
    0
    • V VFaul

      My VB .NET app is causing an unhandled exception. When I look at the exception details, it shows me the hex address where the exception is occurring. How I determine where in my code this is happening given an address? Thanks

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Look for code that calls a COM object, and set breakpoints to work out which one it is.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      V 1 Reply Last reply
      0
      • C Christian Graus

        Look for code that calls a COM object, and set breakpoints to work out which one it is.

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        V Offline
        V Offline
        VFaul
        wrote on last edited by
        #3

        The exception is an "invalid typecast". I'm sure it is in my code. I don't believe it has anything to do with COM. Is there some sort of map file that that I can look at to find the method that contains the offending address. I don't have the debugger on the target machine. An I'd rather not put it on the target. What if the exception happens out in the field? I'd like to be able to find the problem given the offending address.

        L 1 Reply Last reply
        0
        • V VFaul

          The exception is an "invalid typecast". I'm sure it is in my code. I don't believe it has anything to do with COM. Is there some sort of map file that that I can look at to find the method that contains the offending address. I don't have the debugger on the target machine. An I'd rather not put it on the target. What if the exception happens out in the field? I'd like to be able to find the problem given the offending address.

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          If you have cought an exception, you should look at all the information it contains, by dumping its ToString() result, not jsut its Message. That will give you, amongst others, a full stack traceback (including file names and line numbers if it is a debug build with PDB file available next to the EXE/DLL files). :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


          V 1 Reply Last reply
          0
          • L Luc Pattyn

            If you have cought an exception, you should look at all the information it contains, by dumping its ToString() result, not jsut its Message. That will give you, amongst others, a full stack traceback (including file names and line numbers if it is a debug build with PDB file available next to the EXE/DLL files). :)

            Luc Pattyn [Forum Guidelines] [My Articles]


            this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


            V Offline
            V Offline
            VFaul
            wrote on last edited by
            #5

            No, no, no... My app did not catch the exception. So I don't have any idea where to look in my app. The OS, or whatever catches unhandled exceptions, caught the exception and that dialog tells me the address of the where the exception occurred. Now I'm trying to determine where in my app that address is.

            L 1 Reply Last reply
            0
            • V VFaul

              No, no, no... My app did not catch the exception. So I don't have any idea where to look in my app. The OS, or whatever catches unhandled exceptions, caught the exception and that dialog tells me the address of the where the exception occurred. Now I'm trying to determine where in my app that address is.

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              OK, then I suggest you improve the exception catching in your app: - add a try-catch in your Main() method; - handle AppDomain.CurrentDomain.UnhandledException event; - and handle Application.ThreadException event. Doing all this, you should catch everything except maybe a few drag exceptions. For each of them, you could do a MessageBox.Show(...Excecption.ToString()...); :)

              Luc Pattyn [Forum Guidelines] [My Articles]


              this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups