Invalid pointer operation???!!! 
Author Message
 Invalid pointer operation???!!!

Hi,
I'm having a problem with the DISPOSE function in that when I pass it
a pointer to the data I want to deallocate memory for it says "Invalid
pointer operation". BTW, I am passing it a pointer to a node in a linked
list. 2 possibilities are:1) The pointer is pointing to NIL which isn't
the case since I put a watch on the variable and it doesn't point to NIL,
2) The pointer points outside the heap, which I think is the problem. Can
any1 tell me how to solve this problem?
Thanx in advance,  

********************************************************************            
Stephen W Franken      
4th year Bachelor of Electrical and Computer Engineering                              
Queensland University of Technology,
Gardens Point, Brisbane, QLD, AUSTRALIA                                                            

********************************************************************



Wed, 18 Jun 1902 08:00:00 GMT  
 Invalid pointer operation???!!!

Quote:

> Hi,
> I'm having a problem with the DISPOSE function in that when I pass it
> a pointer to the data I want to deallocate memory for it says "Invalid
> pointer operation". BTW, I am passing it a pointer to a node in a linked
> list. 2 possibilities are:1) The pointer is pointing to NIL which isn't
> the case since I put a watch on the variable and it doesn't point to NIL,
> 2) The pointer points outside the heap, which I think is the problem. Can
> any1 tell me how to solve this problem?
> Thanx in advance,

Did you initialize all pointers to NIL before starting the main part
of your program? And please beware: when running the program from the
IDE (i.e. debugging it in the IDE with all debug-information activated)
all variables _are_ initiliazed by BP/TP! But when running it on its
own (or without debug information, I think) all variables are
initialized with random values. This is at least my experience.

Hope this helps.

Bernd Heutling



Wed, 18 Jun 1902 08:00:00 GMT  
 Invalid pointer operation???!!!



Quote:

>Did you initialize all pointers to NIL before starting the main part
>of your program? And please beware: when running the program from the
>IDE (i.e. debugging it in the IDE with all debug-information activated)
>all variables _are_ initiliazed by BP/TP! But when running it on its
>own (or without debug information, I think) all variables are
>initialized with random values. This is at least my experience.

At least version 7.0 clears the entire data segment at the beginning.

Osmo



Wed, 18 Jun 1902 08:00:00 GMT  
 Invalid pointer operation???!!!

3rd possibiltie is that the pointer has already been disposed.  If you are
using OOP to implement the linked list. it's possible that you are disposing of
heap memory that has already been deallocated by another method.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Invalid pointer operation

2. Invalid Pointer Operation after FPC 1.00 installation and an Ansistring problem

3. dipose [Invalid Pointer operation]

4. !Help with DLL 'Invalid Pointer Operation problems'!

5. DbiGetProcs Oracle 7.2 Invalid Floating Point Operation

6. error 207: invalid floating poind operation

7. Delphi 3 Invalid Operation Error

8. Error 207 - Invalid Floating Point Operation

9. Error 207 - Invalid floating point operation

10. TQuery error: Invalid floating point operation???

11. Invalid Pointer problem

12. pointers, pointers, pointers...

 

 
Powered by phpBB® Forum Software