0xC0000005: Access violation reading location

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I receive this message under certain conditions:

1. "Unmanaged Code Debugging" is checked in Property Pages.
2. Certain routines are "stressed." The error does not appear unless loops
are repeated many times.

I'm using Net Framework 1.1. I found a confirmed bug in Online Technical
Support (Article ID : 811193), but the workaround applies only to C++.

What is the significance of this error? More importantly, can I/should I do
anything about it?

Any suggestions would be most appreciated.
 
Fred said:
I receive this message under certain conditions:

1. "Unmanaged Code Debugging" is checked in Property Pages.
2. Certain routines are "stressed." The error does not appear unless
loops
are repeated many times.

I'm using Net Framework 1.1. I found a confirmed bug in Online Technical
Support (Article ID : 811193), but the workaround applies only to C++.

What is the significance of this error? More importantly, can I/should I
do
anything about it?

Can you post some code that causes this error?
 
Herfried,

Thanks for replying so quickly.

Without getting into too much detail, I'm putting 2 Excel ranges into two
separate 2-dimensional Object arrays, then doing some comparisons and
manupulations. (Afterward, the put the arrays back into Excel. I found this
works MUCH faster than accessing Excel ranges repeatedly.) The code that
seems to initiate the problem is:

If liMRows > 1 AndAlso liDRows > 1 Then

' Arrays are zero-based. By starting with 1, we skip the headers.
For I = 2 To liMRows
For J = 2 To liDRows
If (Not lxDetailArRet(J, liForeignKeyCol) Is Nothing) AndAlso (Not
lxMasterArRet(I, 1) Is Nothing) AndAlso (Not lxMasterArRet(I, liDescrCol) Is
Nothing) Then
lsDetailVal = lxDetailArRet.GetValue(J, liForeignKeyCol).ToString
lsMasterVal = lxMasterArRet.GetValue(I, 1).ToString
lxSubstituteVal = lxMasterArRet.GetValue(I, liDescrCol)
If lsDetailVal = lsMasterVal Then
lxDetailArRet.SetValue(lxSubstituteVal, J, liForeignKeyCol)
End If
End If
Next
Next

End If

(Pasting code into this box is a bear. I apologize for the way it looks...)

When the number of loops is small (e.g., up to 50) I don't see the error.
When, however, large Excel ranges are involved (16,000+ rows) I see the error
repeatedly. Despite this, the routine completes and the data seems get
transferred correctly.

Thanks in advance, Fred de Picciotto
 
I found the source of the error, but don't know how to fix it.

The source is running a DTS package written in VB.Net. I created the
package using Enterprise Manager and converted it over to .Net (I followed
the tutorial that can be found at:

http://www.devguru.com/features/tutorials/DTS_VB/DTS_VB.html

Unfortunately, although it runs correctly most of the time, I'm afraid it
causes intermittent failures (my program runs the DTS on 71 tables, some of
them with over 15,000 rows).

I don't know what I'm doing wrong, but any help would be greatly appreciated!
 

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

Back
Top