Results 1 to 1 of 1

Thread: [2005] Memory error

  1. #1

    Thread Starter
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    [2005] Memory error

    I get this error:

    AccessViolationException was unhandled.
    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    and don't know where it's coming from. It doesn't happen all the time but I need it to stop happening - quickly! Attached is the details of the error - don't know if it is any use but thought I'd include it. It mentions Lists and I do have a List collection. Using an eye tracker that has a On_GazeData event there is the following code:

    VB Code:
    1. Private Sub m_tetClient_OnGazeData(ByVal gazedataholder As Object) Handles myTetClient.OnGazeData
    2.  
    3.         Try
    4.             'SET the gazeData to the GazeDataHolder
    5.             gazeData = CType(gazedataholder, TetGazeDataHolder)
    6.  
    7.             'Record X and Y Eye Data
    8.             'X
    9.             VideoEyeData(trial_Count, videoPlay_Count).x_coOrdinates.Add _
    10.             ((gazeData.GazePosXLeftEye + gazeData.GazePosXRightEye) / 2)
    11.             'Y
    12.             VideoEyeData(trial_Count, videoPlay_Count).y_coOrdinates.Add _
    13.                     ((gazeData.GazePosYLeftEye + gazeData.GazePosYRightEye) / 2)
    14.  
    15.             'Record TIME Data
    16.             'Seconds Time Stamp
    17.             VideoEyeData(trial_Count, videoPlay_Count).second_Stamp.Add _
    18.             (gazeData.TimeStampSec)
    19.             'Micro-Second Time Stamp (0 to 99999)
    20.             VideoEyeData(trial_Count, videoPlay_Count).micro_SecondStamp.Add _
    21.             (gazeData.TimeStampMicroSec)
    22.  
    23.             'Record average distance
    24.             VideoEyeData(trial_Count, videoPlay_Count).distance_measure.Add _
    25.             ((gazeData.DistanceLeftEye + gazeData.DistanceRightEye) / 2)
    26.  
    27.             'Record Validity for Left Eye (0 = total accuracy)
    28.             VideoEyeData(trial_Count, videoPlay_Count).leftEye_Validity.Add _
    29.             (gazeData.ValidityLeftEye)
    30.  
    31.             'Record Validity for Right Eye (0 = total accuracy)
    32.             VideoEyeData(trial_Count, videoPlay_Count).rightEye_Validity.Add _
    33.             (gazeData.ValidityRightEye)
    34.  
    35.         Catch ex As Exception
    36.             MessageBox.Show(ex.Message)
    37.         End Try
    38.  
    39.     End Sub



    I've put Try/Catch blocks everywhere and none of them are throwing any exceptions. I can't understand why it doesn't happen all the time.
    Can anyone help me with this?? Details of error:
    Attached Images Attached Images  
    Last edited by stimbo; Feb 12th, 2007 at 10:18 AM.
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width