LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Wanted: strategy for fixing 'Dynamic memory is corrupt'

Hi,

 

'out of a sudden' I receive the fatal run-time error 'Dynamic memory is corrupt'. I have no idea where this might be. I have found the questionable code, but it looks completely harmless:

 

   CheckToolBoxStatus ( SetCtrlToolTipAttribute ( panel_handle,
                                                   control_id,
                                                   CTRL_TOOLTIP_ATTR_TEXT,
                                                   text ) );

 

All the three parameters panel_handle, control_id, and text are defined. Moreover, I did not touch this part of code, so the location (and reason) of the crash is completely unclear to me.

 

Are there any recommendations of how to proceed? I have rebooted the computer but with no visible effect. So I guess it does have to do with my code, but how could I possibly find the problem?

 

Thanks,

 

Wolfgang

0 Kudos
Message 1 of 4
(3,490 Views)

Check this:

 

http://digital.ni.com/public.nsf/allkb/862567530005F09C8625632500692F41 

 

Menchar

0 Kudos
Message 2 of 4
(3,479 Views)

Hi Menchar,

 

thank you for the link! I had read the CVI help before which states roughly the same; my problem is that I am already running in extended debug mode and no memory problem (actually no warning at all) is reported. And I wouldn't expect one, as I did not touch any of these routines lately.

 

The problem appeared when changing my routines from single to multi threading, so I expect that it is related to this issue. Of course, if nothing helps I will have to undo my latest changes. But I was hoping (and indeed I am still hoping...) that it might be possible to obtain some useful debugging information. At the moment, the debugging information seems to be quite odd as it points to a function call of the toolslib library, and none of the parameters involved is dynamic ...

 

Wolfgang

0 Kudos
Message 3 of 4
(3,459 Views)

OK,

 

at least I have found the source of the error: removing all calls to the tooltips removes the problem, and I vaguely remember that the toolslib library isn't thread safe, so...

 

Wolfgang

0 Kudos
Message 4 of 4
(3,455 Views)