Thread: debugging problem

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    4

    Exclamation debugging problem

    I have a little problem.
    When i'am debugging my program with MSVC 6.0 I recieve no errors, but when I siply execute it in Explorer it works incorrect. What is the problem? It is the same EXE. I just can't fix bugs like that, it's too big program(a lot of code).
    I think that problem could be in memory managment (malloc). I'am useing this function(malloc), but sometimes it FAILS ?? even if I have free memory(swap & RAM). My program uses only system dlls, no ather files are being used(txt....).

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    114
    welcome to the real world of programming...

    The only thing I see for you to do is to try to find the line that fails. output for each function as a msgbox or other... when you find the line, fix the problem or post here if clueless... But I think you are right. Its the memory management (or unmanagement?!?) that is the problem.

    And a word of wisdom:
    Next time you write a program, you should write your code with this mysterious error in mind. You can see now when there is possible for this error to arrise again, so you will trap it. You will also know how to trap simillar bugs before you get to the stage of nightmarish debugging. Eventually, you will reach the ultimate goal, absolutely bugfree code, and a state of mind where you are in the nirvana of programming.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    305
    use the msvc++ debugger. ive heard good things about it.

  4. #4
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    if you are simply double clicking the exe in explorer, you may be executing the program in a different directory to where the IDE runs it, and therefore the working directory is different. are you opening any files or doing anything that has relative paths names at all?? you may find that could be a problem.

    U.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  2. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  3. debugging problem
    By XX@nnX in forum Windows Programming
    Replies: 0
    Last Post: 09-27-2006, 10:20 AM
  4. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 06:24 PM
  5. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM