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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Debugging a C++ program in Visual Studio 2005

Debugging a C++ program in Visual Studio 2005

Scheduled Pinned Locked Moved C / C++ / MFC
c++sqlitehelpquestioncsharp
5 Posts 2 Posters 0 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.
  • L Offline
    L Offline
    loyal ginger
    wrote on last edited by
    #1

    My question has something to do with C/C++ and Visual Studio. I have an MFC project in VS2005 with lots of .h and .cpp files. The program has problems so I run it in debug mode to try to find out what the problems are. For one situation it showed the following message: Unhandled exception at 0x00761001 in XPT.exe: 0xC0000005: Access violation reading location 0x00000044. As I clicked the Break button, VS2005 breaks at a line in a source file in my project. The problem is it is on a line irrelavent to the error. It is on a comment line outside any function. The function following that comment block does not seem to have anything to do with that error. This happened many times in different situations, breaking on comment lines that give me no clue. This only happened when breaking happened on a third party source file. In my project, this is the sqlite3.c file from SQLite. I have done a lot such as deleting all the files that are not critical to the project and relaunching the project. (Files such as .ncb, .suo, user-specific options file, etc) Any idea how to cure that? Any settings, etc. I am running out of ideas. Thanks!

    A 1 Reply Last reply
    0
    • L loyal ginger

      My question has something to do with C/C++ and Visual Studio. I have an MFC project in VS2005 with lots of .h and .cpp files. The program has problems so I run it in debug mode to try to find out what the problems are. For one situation it showed the following message: Unhandled exception at 0x00761001 in XPT.exe: 0xC0000005: Access violation reading location 0x00000044. As I clicked the Break button, VS2005 breaks at a line in a source file in my project. The problem is it is on a line irrelavent to the error. It is on a comment line outside any function. The function following that comment block does not seem to have anything to do with that error. This happened many times in different situations, breaking on comment lines that give me no clue. This only happened when breaking happened on a third party source file. In my project, this is the sqlite3.c file from SQLite. I have done a lot such as deleting all the files that are not critical to the project and relaunching the project. (Files such as .ncb, .suo, user-specific options file, etc) Any idea how to cure that? Any settings, etc. I am running out of ideas. Thanks!

      A Offline
      A Offline
      Abhi Lahare
      wrote on last edited by
      #2

      You IntelliSense is screwed. Try deleting .ncb and .opt files from your project directory and then you may see the code line which point to your exception code.

      L 1 Reply Last reply
      0
      • A Abhi Lahare

        You IntelliSense is screwed. Try deleting .ncb and .opt files from your project directory and then you may see the code line which point to your exception code.

        L Offline
        L Offline
        loyal ginger
        wrote on last edited by
        #3

        I just did this: 1. Deleted the .ncb file 2. Deleted the .suo file 3. Deleted the folder "DebugUnicode" (this is the folder for my DebugUnicode build of this project which contains all the intermediate files such as .obj files, and the final .exe file for this project.) 4. Deleted the user options file (.user) After those, the only files I have in the project are The .sln file The .rc file The .vcproj file The .h files The .cpp files and the two files from sqlite.org: sqlite3.h and sqlite3.c However, after relaunching VS2005 and the project, it still breaks on that comment line! Any other suggestions? Thanks!

        A 1 Reply Last reply
        0
        • L loyal ginger

          I just did this: 1. Deleted the .ncb file 2. Deleted the .suo file 3. Deleted the folder "DebugUnicode" (this is the folder for my DebugUnicode build of this project which contains all the intermediate files such as .obj files, and the final .exe file for this project.) 4. Deleted the user options file (.user) After those, the only files I have in the project are The .sln file The .rc file The .vcproj file The .h files The .cpp files and the two files from sqlite.org: sqlite3.h and sqlite3.c However, after relaunching VS2005 and the project, it still breaks on that comment line! Any other suggestions? Thanks!

          A Offline
          A Offline
          Abhi Lahare
          wrote on last edited by
          #4

          Does it breaks in your code or sqlite3.c? Why don;t you single step in your code and then check calls made to functions in sqlite3.c, BTW are you running debug or release version? Regards Abhi

          L 1 Reply Last reply
          0
          • A Abhi Lahare

            Does it breaks in your code or sqlite3.c? Why don;t you single step in your code and then check calls made to functions in sqlite3.c, BTW are you running debug or release version? Regards Abhi

            L Offline
            L Offline
            loyal ginger
            wrote on last edited by
            #5

            It breaks in sqlite3.c. I am running the debug version. I will set break points on calls to sqlite functions and try to find out what is happening. I can find the problems that way, which involves a little bit more hassle. I am just annoyed by the strange behavior of VS2005. Thanks for your help!

            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