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:
Private Sub m_tetClient_OnGazeData(ByVal gazedataholder As Object) Handles myTetClient.OnGazeData Try 'SET the gazeData to the GazeDataHolder gazeData = CType(gazedataholder, TetGazeDataHolder) 'Record X and Y Eye Data 'X VideoEyeData(trial_Count, videoPlay_Count).x_coOrdinates.Add _ ((gazeData.GazePosXLeftEye + gazeData.GazePosXRightEye) / 2) 'Y VideoEyeData(trial_Count, videoPlay_Count).y_coOrdinates.Add _ ((gazeData.GazePosYLeftEye + gazeData.GazePosYRightEye) / 2) 'Record TIME Data 'Seconds Time Stamp VideoEyeData(trial_Count, videoPlay_Count).second_Stamp.Add _ (gazeData.TimeStampSec) 'Micro-Second Time Stamp (0 to 99999) VideoEyeData(trial_Count, videoPlay_Count).micro_SecondStamp.Add _ (gazeData.TimeStampMicroSec) 'Record average distance VideoEyeData(trial_Count, videoPlay_Count).distance_measure.Add _ ((gazeData.DistanceLeftEye + gazeData.DistanceRightEye) / 2) 'Record Validity for Left Eye (0 = total accuracy) VideoEyeData(trial_Count, videoPlay_Count).leftEye_Validity.Add _ (gazeData.ValidityLeftEye) 'Record Validity for Right Eye (0 = total accuracy) VideoEyeData(trial_Count, videoPlay_Count).rightEye_Validity.Add _ (gazeData.ValidityRightEye) Catch ex As Exception MessageBox.Show(ex.Message) End Try 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:




Reply With Quote