the memory could not be read

G

Guest

Dear Sir

We did receive a memory error when we closing the program develop by VB.Net
The error message as below.

the instruction at "0x5047faa1" referenced memory at "0x14a390bc". the
memory could not be "read"

This .Net program included only one OCX develop by VB6 (SP6) and this OCX is
running well in VB6 exe program.

we include this OCX into VB.Net as well, It work fine as the VB6 exe
program. But system keep on popup the memory error message during we close
the VB.net program.

We also use this OCX in asp.net project and it giving a same memory error
problem during we close the IE6.

The OCX included components as below
-Microsoft Common Dialog Control 6.0 (SP6)
-Microsoft Windows Common Controls 5.0 (SP2)
-TeeChart Pro Activex Control v5

Note: The TeeChart Pro Activex Control v5 is 3nd component. We did post the
memory error to thay support forums. But they can't give us a sulation. even
the problem resaon. You can check the link below. Forum Title - Memory Erro
http://www.teechart.net/support/mod...orum&f=1&sid=895af797e2bc6bd2ccdd078318e423e5

Please! Please! Help me...
We really don't know hot to solved this problem.

Thanks
Cliven
 
G

Guest

It's impossible to be sure, without seeing the source.

But I have had an interesting problem, that may be related.

Mine was various execution errors some time after a form had been closed,
actually in the form's own code.

These turned out to be caused by the (obvious, with hindsight) fact that
under VB.Net, the form and its controls continue to receive events AFTER the
form has been closed, (and therefore, after associated data may no longer be
in a consistent state).

As an aside, in my case, a combobox bound to a datasource was getting
selectedIndexChanged events as other data, totally unrelated to the form, was
added to the table, causing the selected item to change its index, even
though there was no actual change in selection [well, there wouldn't be with
the form disposed, but what the heck]

The form and controls can continue to receive events right up until the form
is disposed and garbage collected.

The solution appears to be to explicitly dispose of such controls in the
form's closed event, and possibly also to dispose the form itself at the
same point.

This does seem to solve several unexpected problems - I hope it helps with
yours.
 
G

Guest

Dear Policywatcher

I did try the dispose all the controls in the VB.Net Form closed event. But
I still receive a memory error message. Please I really need to solve this
problem!
Do you have any ideas? Please help me.

Thanks
Cliven

policywatcher said:
It's impossible to be sure, without seeing the source.

But I have had an interesting problem, that may be related.

Mine was various execution errors some time after a form had been closed,
actually in the form's own code.

These turned out to be caused by the (obvious, with hindsight) fact that
under VB.Net, the form and its controls continue to receive events AFTER the
form has been closed, (and therefore, after associated data may no longer be
in a consistent state).

As an aside, in my case, a combobox bound to a datasource was getting
selectedIndexChanged events as other data, totally unrelated to the form, was
added to the table, causing the selected item to change its index, even
though there was no actual change in selection [well, there wouldn't be with
the form disposed, but what the heck]

The form and controls can continue to receive events right up until the form
is disposed and garbage collected.

The solution appears to be to explicitly dispose of such controls in the
form's closed event, and possibly also to dispose the form itself at the
same point.

This does seem to solve several unexpected problems - I hope it helps with
yours.






Cliven said:
Dear Sir

We did receive a memory error when we closing the program develop by VB.Net
The error message as below.

the instruction at "0x5047faa1" referenced memory at "0x14a390bc". the
memory could not be "read"

This .Net program included only one OCX develop by VB6 (SP6) and this OCX is
running well in VB6 exe program.

we include this OCX into VB.Net as well, It work fine as the VB6 exe
program. But system keep on popup the memory error message during we close
the VB.net program.

We also use this OCX in asp.net project and it giving a same memory error
problem during we close the IE6.

The OCX included components as below
-Microsoft Common Dialog Control 6.0 (SP6)
-Microsoft Windows Common Controls 5.0 (SP2)
-TeeChart Pro Activex Control v5

Note: The TeeChart Pro Activex Control v5 is 3nd component. We did post the
memory error to thay support forums. But they can't give us a sulation. even
the problem resaon. You can check the link below. Forum Title - Memory Error
http://www.teechart.net/support/mod...orum&f=1&sid=895af797e2bc6bd2ccdd078318e423e5

Please! Please! Help me...
We really don't know hot to solved this problem.

Thanks
Cliven
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top