Thread: "Invalid pointer operation" when closing application

  1. #1
    Registered User
    Join Date
    Aug 2005

    Question "Invalid pointer operation" when closing application

    Hello. I use Borland C++ 6.0 and I have written an appliaction that gets some web pages' contents and displays some of it (Using FastNet). When I cloase the application (having threee forms) I get an EInvalidPointer exception with message : "Invalid pointer operation" and debugger stops at 397th line in Forms.hpp which stands like this :
    inline __fastcall virtual ~TForm(void) { }
    Could you help me to solve this problem, please? Thank all of you in advance.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    It's pretty safe to say that the pointer got mangled a long time ago on another line, and this is merely where you get to notice.

    Without the rest of the code, it's pure guess-work.

    I'll guess line 42

    You could try disabling various bits of functionality, but if it works it means 2 things
    - you managed to hide the problem in another way
    - the commented out code is the real cause of the problem.

    Really, you need tools like bounds checker or purify to find random pointer abuse in a large application.
    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.

  3. #3
    Registered User
    Join Date
    Aug 2005
    Thankee sai. I shall try those tools.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 05-15-2009, 08:38 AM
  2. Replies: 0
    Last Post: 03-20-2008, 07:59 AM
  3. What is a virtual function pointer?
    By ting in forum C++ Programming
    Replies: 4
    Last Post: 03-05-2008, 02:36 AM
  4. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM
  5. file pointer
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 10-11-2001, 03:52 PM