"Invalid pointer operation" when closing application

This is a discussion on "Invalid pointer operation" when closing application within the Windows Programming forums, part of the Platform Specific Boards category; Hello. I use Borland C++ 6.0 and I have written an appliaction that gets some web pages' contents and displays ...

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    31

    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 :
    Code:
    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,546
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    31
    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, 01:36 AM
  4. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21