Thread: Abnormal Program Termination when executed from C:/Program Files

  1. #16
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    Quote Originally Posted by Salem View Post
    I prefer this - http://www.microsoft.com/whdc/devtoo...g/default.mspx
    You can run and debug the program wherever it is, and not just inside your project.

    Plus, there's lots of "power user" features in windbg.
    thanks. i'll give it a shot.

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Visual Studio also contains a very powerful, and if not easier, debugger.
    You can get it for free at http://www.microsoft.com/Express/.
    But you should try out for yourself if it's to your liking. No sense in using something that you don't like.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #18
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    do i have to install the compile the app from source code to use it?

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Yes, you would have to installing the IDE, then compile your source.
    I'm not sure if or how you can debug apps with windbg with source code information. I'm not sure how that works and what compilers can produce the correct debug information...
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #20
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    compiling from source is not a viable option in the long term.

    i don't know how windbg works either, as obviously i'm not familiar with it yet.

    i expect it will not work 100% until i switch to MSVC++ since i use BCB, but it's better than nothing.

  6. #21
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    The debugger inside Visual Studio doesn't really require you to compile with the Visual C++ compiler per se... just as windbg, it works fine by attaching to executables.
    However, I know the VS debugger requires program database files (aka debug files) for being able to properly debug (or you'll just get assembly output). Maybe this can be generated from other compilers too, but I don't know for sure.
    Otherwise, VS is not a bad idea and VC++ is not a bad compiler, if you have the option to switch and try it out.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #22
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    i would love to, but unfortunately i don't have that option as i don't have the available time to do the port

  8. #23
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    "Do the port"? I don't understand what you mean by that, but...
    You do realize that standards compliant code will compile in any compliant compiler, yes?
    Anyway, I'm going to trust you have your reasons. Unfortunately, the rest of how to make it work is beyond my knowledge.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #24
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    i've made extensive use of features that i believe are specific to BCB, namely their GUI components.

  10. #25
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Well isn't that just more or less their version of MFC? I am not qualified to answer that question on my own since I do not have a PhD in proprietary useless libraries. Which also means I am not welcome to work at Microsoft. Its listed as one of their basic requirements.

  11. #26
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,665
    WinDbg has a very good help file.

    Use it to run the program in it's current location, then just let it catch the exception when it crashes.
    Then go looking to see where the problem is.

    If you compile the project in visual studio, so that it also outputs a .pdb file, then you should have full source code as well.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  12. #27
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    He says his code cannot be easily moved over to VC++. I bet it may be easier than he suggests.

  13. #28
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    i'm pretty sure it's this now:


    nm false hope
    Last edited by m37h0d; 09-19-2008 at 08:44 AM.

  14. #29
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    OH!

    i omitted a critical detail

    this only happens on a certain computer setup - they're a celeron Ms with XP embedded IIRC.

    doesn't happen on my development PC.

  15. #30
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Make sure that the account your application is running under can write to %ProgramFiles%, because normally, an application SHOULD NOT write to it's install directory. %ProgramFiles% could be write protected in your execution environment.

    Use SHGetFolderPath to find a folder suitable for writing data. APPDATA or LOCAL_APPDATA comes to mind.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Abnormal termination
    By juice in forum Windows Programming
    Replies: 7
    Last Post: 02-03-2012, 05:05 AM
  2. Abnormal program termination
    By Kayoss in forum C++ Programming
    Replies: 3
    Last Post: 05-16-2006, 03:29 PM
  3. abnormal program termination
    By Smiley0101 in forum C++ Programming
    Replies: 1
    Last Post: 03-02-2003, 05:04 PM
  4. **///Re: Abnormal prg termination
    By jhsurti in forum C++ Programming
    Replies: 5
    Last Post: 01-07-2003, 02:33 AM
  5. abnormal program termination
    By ProLin in forum C++ Programming
    Replies: 2
    Last Post: 01-20-2002, 09:56 PM