No announcement yet.

HELP: Strange Problem...

  • Filter
  • Time
  • Show
Clear All
new posts

  • HELP: Strange Problem...

    Hi all,

    I have a program I have to show to some people tomorrow
    And now it GPF's when it exit!

    Very short version:
    function pbmain
        a lot of code...
        msgbox "test"
        ' Here it GPF !!!      
    exit function
    When I run the program it showes the msgbox and then it GPF!
    Anybody seen that before?


    [email protected]

    [This message has been edited by Peter P Stephensen (edited September 27, 2001).]
    [email protected]

  • #2
    Hi Peter,

    I have experienced something very similar to what you describe.
    In the end, I was able to trace the problem to corrupted memory.
    I was writing well past the bounds of my arrays, but apparantly
    within the memory space alloted to my app. Therefore, I didn't
    get any error messages right away. But when I attempted to use
    a MSGBOX or in some cases just any string function (like FORMAT$())
    I would get a GPF.

    It drove me bonkers for a while. Difficult to find the unexpected....

    Bernard Ertl
    Bernard Ertl
    InterPlan Systems


    • #3
      Without more specific source it is hard to say what it is.
      It could be that your winamp player is playing the wrong song...

      However, seriously speaking, I have had issues with killing objects (OR Not destroying them), in the WM_CLOSE or WM_QUERYENDSESSION and found that if I have to close mutexes or files sometimes it is best to do right after dialog show etc.


      Dialog Show hDlg Call DialogProc
      Close hFile1
      Close hTcp
      Cosehandle hMutex
      KillTimer hTimer etc
      'You get the point....
      End Function

      Scott Turchin
      MCSE, MCP+I
      Computer Creations Software
      Scott Turchin
      MCSE, MCP+I
      True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi