Ошибка C# 'system.stackoverflowexception'
I have an error "System.StackOverflowException" when I get all alarms from cameras devices, any help ??
Что я уже пробовал:
switch (_iAlarmType) { case AlarmConstMsgType.ALARM_VCA_INFO: sbAlarmMsg.Append("- VCA"); int iChannelNumber = 0; int iretu = NVSSDK.NetClient_GetChannelNum(_ulLogonID, ref iChannelNumber); int channelCamera = iChannelNumber; int int_rule = 0; int iBufSiz = 80; m_lpbuf = new NVS_FILE_LPBUF(); int iRetx = NVSSDK.NetClient_VCAGetAlarmInfo(_ulLogonID, _iAlarmState, ref m_lpbuf, iBufSiz); try { Console.WriteLine("Loading received alerts : " + m_lpbuf.m_iRuleID , "MyAlarm_NOTIFY_V4" + " " + DateTime.Today.ToString()); ObjLog.LoggerWritter("Loading received alerts : " + m_lpbuf.m_iRuleID + " MyAlarm_NOTIFY_V4" + " " + DateTime.Today.ToString()); ObjLog.LoggerWritter("Loading Alerts Rules : {" + m_lpbuf.m_iRuleID + "} MyAlarm_NOTIFY_V4" + " " + str_VCARules.ToString()); int AlarmSentChannel = channelCamera; int AlarmSentCustCompanyID = CustomerID; string AlarmSentDateIng = Convert.ToString(DateTime.Today); string AlarmSentDescription = GetiAlarmType(_iAlarmType) + " - " + sbAlarmMsg.ToString(); int AlarmSentEstado = _iAlarmState; string AlarmSentIDE = Convert.ToString(m_lpbuf.m_iID);// IPCustomer; // cantidadtrips++; string AlarmSentrctTarget = ""; string AlarmSentRuleDescrip = GetiAlarmType(_iAlarmType) + " - " + sbAlarmMsg.ToString(); int AlarmSentRuleID = m_lpbuf.m_iRuleID; int AlarmSentState = _iAlarmState; int AlarmSentTargetDirection = 0; int AlarmSentTargetID = Convert.ToInt32(_iAlarmState.ToString()); int AlarmSentTargetSpeed = 0; int AlarmSentTargetType = _iAlarmType; int AlarmSentventType = _iAlarmType; try { string needle = _ulLogonID.ToString(); foreach (Device foo in Lista) { if (foo.DeviceIDLogon == needle) { AlarmSentIDE = foo.DeviceIP; } } }catch (Exception ex){ } SendAlarmsToNextivaSWG( AlarmSentChannel, AlarmSentCustCompanyID, AlarmSentDateIng, AlarmSentDescription, AlarmSentEstado, AlarmSentIDE, AlarmSentrctTarget, AlarmSentRuleDescrip, AlarmSentRuleID, AlarmSentState, AlarmSentTargetDirection, AlarmSentTargetID, AlarmSentTargetSpeed, AlarmSentTargetType, AlarmSentventType); ObjLog.LoggerWritter("Sending received alerts to WebService Server from Device : " + AlarmSentIDE); } catch (Exception ex) { Console.WriteLine("Error Remote Windows Service SWG : {0} ", "MyAlarm_NOTIFY_V4" + " " + DateTime.Today.ToString()); } return; break; default: sbAlarmMsg.Append("-" + _iAlarmType.ToString()); break; }