LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Address specified to RtlSizeHeap

I get this error when using some functions of the word2000 function panel.  Any ideas?  Thanks.

0 Kudos
Message 1 of 6
(5,546 Views)

Hi Gris,

 

I hope you are doing well today!  I have a few questions regarding your setup.  What version of LabWindows/CVI do you have?  Does this error happen consistently with certain functions but not others?  Specifically, what functions are causing this error?  Could you post a screenshot of the actual error?  Thanks, Gris.  Have a great day!

Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 6
(5,529 Views)

Thanks, Taylor. 

 

I'm using CVI 6.0 and word2000.fp.  Here's one example:  

errChk (Word_DocumentClose (docHandle, NULL, vtSaveChanges, CA_DEFAULT_VAL, CA_DEFAULT_VAL));

 

In debug mode, it hangs on the statement (as if there were a breakpoint, but there's not), and in the debug window I get the messages

HEAP[System Test_dbg.exe]: Invalid Address specified to RtlSizeHeap( 00080000, 000C65A8 )
HEAP[System Test_dbg.exe]: Invalid Address specified to RtlFreeHeap( 00080000, 000C65A8 )

 

It doesn't hang when I run the executable.  This happens with another function, too, (I'll have to find it) but the calls seem to have this in common:  CA_DEFAULT_VAL.

 

Let me know if you need more info.  Thanks.

0 Kudos
Message 3 of 6
(5,515 Views)

Hi Gris,

 

Thanks for the update.  Can you run the word2000demo.cws example successfully?  If you do not have this example, I have attached a link to it below.  Please take a look at this example's code as well as try to run it on your end to see if you run into the same error at any point in testing out its functionality.  Thanks, Gris.  Have a great day!

 

Developer Zone Example: Controlling Microsoft Word for Office 2000 through ActiveX Automation

Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 4 of 6
(5,510 Views)

Taylor,

 

Yes, the demo runs successfully.  I found the spot where the program hangs at a lower level - see attached.

 

Thanks,

Gris

0 Kudos
Message 5 of 6
(5,505 Views)

Hi Gris,

 

Thanks for the update.  I am glad to hear that the demo works as expected!  I have done some research into this error, and it seems it can sometimes be caused by improper allocation and/or deallocation of memory.  Make sure that you are properly allocating and deallocating memory in your application.  The demo is a great place to start to compare your code to see if there are any functions that are missing or out of order, perhaps.  Also, you might try setting breakpoints and stepping through sections of code before and after this function in your code that it is hanging to make sure that the references you are passing in are, in fact, being referenced properly.  Please let me know if you have any further questions regarding this.  Thanks, Gris.  Have a great day!

 

CodeGuru Forums: Invalid Address specified to RtlSizeHeap( 130000, 16dc28 )

Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 6 of 6
(5,489 Views)