Showing results for 
Search instead for 
Did you mean: 
Walkthrough Wednesdays

"Attempted to divide by zero" errors upon logging in to the toolk

This document was generated from CDN thread

Created by: Komalkumar Tagdiwala on 18-04-2009 01:29:02 AM
Project: C:\Program Files\Cisco Systems\CTIOS Client\CTIOS Toolkit\dotNet CIL\Samples\CTI Toolkit Combo Desktop.NET
Environment: Production
Error: Attempted to divide by zero

Note: The error does not occur in lab environment and is only occuring in production

Steps to reproduce:
1. Open the sample toolkit project - CTI Toolkit Combo Desktop.NET.
2. Update the config file to point to a production CTIOS environment. (In my case, the CTIOSA, CTIOSB and ports all point to hosts geocscopg15a and geocscopg15b)
3. Start the project in DEBUG mode.
4. Once the client is loaded, click the <Login> button.
5. Enter the production info. for "Connect to:", "Agent ID", "Password", and "Instrument ID" and click <OK>.
6. Once logged in, the system start throwing an error: "Attempted to divide by zero"

Screenshot: See attached file Error_Screenshot.jpg

1. Error Screenshot which demonstrates the error.
2. Config file for this application
3. Log file which has the detailed error when I am pointing to a production environment (geocscopg15a and geocscopg15b)
4. Log file which does NOT have any error when I am pointing to a lab environment (icmstgsjccmpga and icmstgsjccmpgb) since everthing works perfectly fine in lab.

Error as captured from the LOG file (see excerpt from the log file below):
04/08/2009 13:20:08.4155 CTIObject.OnEvent: Received Event: eOnNewSkillGroupStatisticsEvent
Arguments: (InvokeID:does not exist PeripheralID:5019 SkillGroupNumber:25649 SkillGroupID:48698 UniqueObjectID:skillgroup.5019.25649 MessageID:eOnNewSkillGroupStatisticsEvent StatisticsCallsQNow:0 CallsQTimeNow:0 LongestCallQNow:0 HandledCallsToHalf:1 HandledCallsTalkTimeToHalf:3 HandledCallsTimeToHalf:3 IncomingCallsHeldToHalf:0 IncomingCallsHeldTimeToHalf:0 InternalCallsRcvdToHalf:0 InternalCallsRcvdTimeToHalf:0 InternalCallsHeldToHalf:0 InternalcallsHeldTimeToHalf:0 CallsQHalf:0 CallsQTimeHalf:0 LongestCallQHalf:0 AvailTimeToday:117 LoggedOnTimeToday:347 NotReadyTimeToday:154 HandledCallsToday:2 HandledCallsTalkTimeToday:6 HandledCallsTimeToday:6 IncomingCallsHeldToday:0 IncomingCallsHeldTimeToday:0 InternalCallsHeldToday:0 InternalCallsHeldTimeToday:0 CallsQToday:0 CallsQTimeToday:0 LongestCallQToday:0 HandledCallsAfterCallTimeToHalf:0 HandledCallsAfterCallTimeToday:0 AgentsLoggedOn:1 AgentsAvail:0 AgentsNotReady:1 AgentsReady:0 AgentsTalkingIn:0 AgentsTalkingOut:0 AgentsTalkingOther:0 AgentsWorkNotReady:0 AgentsWorkReady:0 AgentsBusyOther:0 AgentsReserved:0 AgentsHold:0 AvailTimeTo5:73 LoggedOnTimeTo5:136 NotReadyTimeTo5:23 HandledCallsTo5:1 HandledCallsTalkTimeTo5:3 HandledCallsAfterCallTimeTo5:0 HandledCallsTimeTo5:3 IncomingCallsHeldTo5:0 IncomingCallsHeldTimeTo5:0 InternalCallsRcvdTo5:0 InternalCallsRcvdTimeTo5:0 InternalCallsHeldTo5:0 InternalCallsHeldTimeTo5:0 CallsQ5:0 CallsQTime5:0 LongestCallQ5:0 MonitorCallsToday:0 MonitorCallsToHalf:0 MonitorCallsTo5:0 RouterCallsQNow:0 LongestRouterCallQNow:0 InternalCallsRcvdToday:0 InternalCallsRcvdTimeToday:0) TimerInterval:10)
04/08/2009 13:20:08.4155 CtiOsGrid.doUpdateRow:
Caught Attempted to divide by zero.. Stack trace:
**at CtiOsDataGrid.SkillGroupStatsGridHelper.CalcStat(Arguments stats, Enum_CtiOs keyWord1, Enum_CtiOs keyWord2)
at CtiOsDataGrid.SkillGroupStatsGridHelper.FormatArgument(Arguments args, String columnName)
at CtiOsDataGrid.SkillGroupStatsGridHelper.ArgumentsToRow(String key, Arguments args, DataRow row)
at CtiOsDataGrid.StatsGridHelper.UpdateRow(Arguments args)
at CtiOsDataGrid.SkillGroupStatsGridHelper.UpdateRow(Arguments args)
at CtiOsDataGrid.CtiOsDataGrid.DoUpdateRow(Arguments args)

Troubleshooting Steps:
In the above "Steps to reproduce", if I were to change the CONFIG file to point to a LAB environment (hosts icmstgsjccmpga and icmstgsjccmpgb) but still login using production AGENT and INSTRUMENT ID, I DO NOT see any such error and everything works just fine.

The issue happens only when the config file points to a production environment.

As displayed in the log excerpt above, the error is thrown at the line where the CalcStat procedure is invoked for CtiOsDataGrid.SkillGroupStatsGridHelper. I tried adding the CtiOsDataGrid sample project to my solution and attempted to debug for that procedure hoping to catch the error but the control never reaches that procedure. I even changed the order in which classes are loaded using the Project Properties window but the control never reaches this added project (CtiOsDataGrid).

Can anybody help troubleshoot this issue? I don't know why it happens only in production and does not occur in dev.

Any clues?

Subject: RE: New Message from Komalkumar Tagdiwala in Computer Telephony Integration
Replied by: David Lender on 20-04-2009 01:21:39 PM
The CTIOS Server configuration could be different on the different CTIOS
Servers.  Compare the skill group statistics grid configuration in the
registry on both machines per the CTIOS System Manager's Guide section
on CTIOS Configuration.
Also turn up tracing in your .NET application using the TraceMask
setting in the CTIOSSoftphoneCSharp.exe.config xml config file.
Content for Community-Ad

This widget could not be displayed.