Log In
Developer Network
Technologies
Join the Network
Member Services
Events & Community
Computer Telephony Integration Object Server (CTIOS) Toolkit Developer Center
Overview
Documentation
Community
Blogs
CTIOS 8.5(2) provides support for .NET Framework 3.5
David Lender
03 Aug 2011
Filter mode skill group statistics sample in Java
David Lender
05 Jan 2011
Cisco Live! London - Jan. 31-Feb 3, 2011
David Staudt
01 Nov 2010
Avoiding a Memory Leak in your CTIOS Filter mode application.
David Lender
11 Feb 2010
Intermittently, Network Blind Transfer with CTIOS clients gets stuck.
David Lender
02 Feb 2010
Registry entry controls Invalid Agent Login receiving eCTIOSFailureEvent or eControlFailureCon
David Lender
04 Dec 2009
Web Services Client
David Lender
11 Nov 2009
Not Ready reason code in Not Ready state
David Lender
20 Feb 2009
Using JavaCil LogWrapper over a year boundary
David Lender
16 Feb 2009
CTIOS Desktop 7.5(3) now supports Windows XP SP3
David Lender
05 Dec 2008
using LogWrapper in a mult-threaded Agent app
David Lender
19 Nov 2008
CTIOS Preferred Server vs Load Balancing
DAVID LENDER
23 Apr 2008
Showing 12 results.
Items per Page 20
Page
(Changing the value of this field will reload the page.)
1
of 1
First
Previous
Next
Last
Forums
Message Boards Home
Recent Posts
Statistics
Answer
(
Unmark
)
Mark as an Answer
« Back to CTIOS Toolkit Questions
Memory leaks in CTIOS
Threads [
Previous
|
Next
]
Showing 1 - 20 of 28 results.
Items per Page
(Changing the value of this field will reload the page.)
5
10
20
30
50
75
Page
(Changing the value of this field will reload the page.)
1
2
of 2
First
Previous
Next
Last
Virinchi Garimella
Posts:
17
Join Date:
11/25/08
Recent Posts
Memory leaks in CTIOS
Answer
4/9/09 12:32 PM
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Hi,
In CTIOS when I am using DumpArgs() to print the arguments structure in the taskbar it is showing too may handles. Some times it is showing 1 billion also. If I commented the use of that function then in taskbar it is showing 200 to 300 handles. Is there any function shall I call to release the memory for Arguments structure after the DumpArgs().
Thanks,
Sunitha.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
David Lender
Posts:
467
Join Date:
4/4/08
Recent Posts
RE: New Message from Virinchi Garimella in Computer Telephony Integration O
Answer
4/10/09 6:45 PM as a reply to Virinchi Garimella.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Which Cil and version are you using? A memory leak was found in
getElement which is used by most functions. This was found in 7.2(3)
and fixed in 7.5(2) and 7.2(6) . Use the latest CTIOS Client toolkit
version and demonstrate the issue with one of the sample applications
with the Cil you are using. If problem persists, open a Service Request
using your Developer Services contract subscription and provide the
modified sample so that our engineers can duplicate your specific issue.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Arthur Shats
Posts:
57
Join Date:
8/24/12
Recent Posts
RE: Memory leaks in CTIOS
Answer
10/10/12 1:52 PM as a reply to David Lender.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
I have to make a good case and present hard evidence that the upgrade to the latest CTIOS would fix the memory leak we are having. When you say that leaky getElement is used by MOST functions, do you know if it's used by .CreateInstance(), .GetValueArray() or .GetValueInt() in particular and by C++Phone sample app in general? I couldn't find any direct calls to getElement in C++Phone, but as you said, it could be called by other functions.
Thanks.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
David Lender
Posts:
467
Join Date:
4/4/08
Recent Posts
RE: New Message from Arthur Shats in Computer Telephony Integration Object
Answer
10/10/12 1:58 PM as a reply to Arthur Shats.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
I believe all GetValue methods utilize the GetElement method.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
JACK CHEN
Posts:
5
Join Date:
10/10/12
Recent Posts
RE: Memory leaks in CTIOS
Answer
10/10/12 4:10 PM as a reply to David Lender.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
David: I upgraded 7.5(1) with maintenence release 7.5(10). Now, when I compile the C++ Phone sample, it complains of missing CTIOSKeyStrings.h and CTIOSKeyStringsAbbrev.h. Do you know if I need to take a certain upgrade path? Thanks.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
David Lender
Posts:
467
Join Date:
4/4/08
Recent Posts
RE: New Message from JACK CHEN in Computer Telephony Integration Object Ser
Answer
10/10/12 4:29 PM as a reply to JACK CHEN.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
The C++ sample has not changed. Are you pointing to the Include directory for the Win32 Cil? Are the CTIOSKeyStrings.h and CTIOSKeyStringsAbbrev.h. files in the include directory?
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
JACK CHEN
Posts:
5
Join Date:
10/10/12
Recent Posts
RE: New Message from JACK CHEN in Computer Telephony Integration Object Ser
Answer
10/10/12 4:56 PM as a reply to David Lender.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
It is pointing to the include directory. However, I do not see the two .h files in the C:\Program Files\Cisco Systems\CTIOS Client\CTIOS Toolkit\Win32 CIL\Include directory. I’m wondering if they were included in a different maintenance release that I need to apply first.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
David Lender
Posts:
467
Join Date:
4/4/08
Recent Posts
RE: New Message from JACK CHEN in Computer Telephony Integration Object Ser
Answer
10/10/12 6:14 PM as a reply to JACK CHEN.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
The 7.5(10) maint release should contain all the files you need to upgrade from 7.5(1).
I suggest you open a Service Request (specify Other for Technology and CDN Contact Center Applications for SubTechnology. I can then send you the include files to see if it resolves your issue.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
JACK CHEN
Posts:
5
Join Date:
10/10/12
Recent Posts
RE: New Message from JACK CHEN in Computer Telephony Integration Object Ser
Answer
10/10/12 7:07 PM as a reply to David Lender.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
David: Thank you for the offer. I may take you up on the offer if I can't figure it out. So far, I have reverted back to 7.5(1) and upgraded to 7.5(2) and compiling succeeded.
I am trying to track down a memory leak with Arthur. After the ref counts have decremented to zero what is performing the actual clean-up? Do you know if there is a way to force the clean-up or if there is a threshold in general? I'm trying to confirm if there is still a memory leak, because I still see the memory footprint increasing in 7.5(2).
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
David Lender
Posts:
467
Join Date:
4/4/08
Recent Posts
RE: New Message from JACK CHEN in Computer Telephony Integration Object Ser
Answer
10/10/12 7:44 PM as a reply to JACK CHEN.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
I suggest you install v8.5(3) I have confirmed you can build the C++ Phone with that version and also it includes the fix to the memory leak that was found in 7.5(1). I could not see any memory growing in the C++ sample with 8.5(3).
There is no way to force clean-up and there is no threshold. Memory should be released when the reference count goes to 0.
Do you see a memory leak with C++ Phone with 7.5(2) or just with your modified sample that uses statistics?
Note that the sample is provided as is and is not intended for production use.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
JACK CHEN
Posts:
5
Join Date:
10/10/12
Recent Posts
RE: New Message from JACK CHEN in Computer Telephony Integration Object Ser
Answer
10/10/12 8:06 PM as a reply to David Lender.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
If we install 8.5(3), does the server also need to be on 8.5?
Is there a way to dump all the ref counts ?
I believe the memory leak started with the modified version to obtain statistics.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
David Lender
Posts:
467
Join Date:
4/4/08
Recent Posts
RE: New Message from JACK CHEN in Computer Telephony Integration Object Ser
Answer
10/10/12 8:12 PM as a reply to JACK CHEN.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
The server also needs to be at 8.5. I suggest you review your statistics code for memory leaks. I have verified that the COM Cil application ctiosphone does not have any memory leak when skillgroupstatistics are enabled. Note that the COM Cil uses the C++ Cil so if there was a memory leak it would show up in a COM Cil app. Is it possible for you to use the COM CIL rather than the C++ CIL? That way you do not have to worry about memory management.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Arthur Shats
Posts:
57
Join Date:
8/24/12
Recent Posts
RE: Memory leaks in CTIOS
Answer
10/11/12 5:58 PM as a reply to David Lender.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
David,
Whe you say to review our statistics code for memory leask, this would be very simple, because there are only few lines of code I added to the C++Phone sample app. Here they are:
In the EvenSink.cpp, in the OnSetAgentModeEvent, where it sets agentID, password, instrument and peripheralID before doing the actual login, I added 3 lines to enable remote login:
arLoginReq.AddItem(CTIOS_REMOTELOGIN, "true");
arLoginReq.AddItem(CTIOS_AGENTREMOTENUMBER, "1234567890");
arLoginReq.AddItem(CTIOS_AGENTCALLMODE, 3);
then it does m_pCtiAgent->Login(arLoginReq); and arLoginReq.Release(); I didn't touch these lines.
Then in OnQueryAgentStateConf, I added a call to enable stats:
Arguments &skillGrpParam = Arguments::CreateInstance();
rc = m_pCtiAgent->EnableSkillGroupStatistics(skillGrpParam);
unsigned long rcode = skillGrpParam.Release(); //and when I print rcode, it's 0, so all is good.
And then I add OnSkillGroupStatisticsUpdated event with no code in it.
When I execute with the above code, there is no memory leak, memory usage doesn't increase.
The memory leak starts when in OnSkillGroupStatisticsUpdated, I add the following:
Arguments &stats = Arguments::CreateInstance();
stats = rArguments.GetValueArray("Statistics");
unsigned long rcode = stats.Release(); //rcode here returns 2; even when I call .Release() twice so it rcode does become 0, the next time the event is called I get rcode of 2 again. And the memory usage keeps increasing.
So as you can see, there is very little code I added, and the leak seem to start only after the last two .CreateInstance and .GetValueArray. So where am I doing something wrong? I am using the methods that are part of the SDK.
Thanks.
p.s. Do you have the actual COM code that you used to get stats? Is my C++ equivalent is similar to your COM, or am I missing something. Could you send me the lines you added in COM... if you can?
Thanks.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Arthur Shats
Posts:
57
Join Date:
8/24/12
Recent Posts
RE: Memory leaks in CTIOS
Answer
10/11/12 6:27 PM as a reply to Arthur Shats.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
David,
One more thing I forgot to mention. I tried the above code in v7.5(2) going upto and including v7.5(6) and it still leaks.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
David Lender
Posts:
467
Join Date:
4/4/08
Recent Posts
RE: New Message from Arthur Shats in Computer Telephony Integration Object
Answer
10/11/12 6:57 PM as a reply to Arthur Shats.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Here is the VB.NET (COM Cil) Code
Private Sub m_session_OnSkillGroupStatisticsUpdated(ByVal pIArguments As Cisco.CTIOSCLIENTLib.Arguments) Handles m_session.OnSkillGroupStatisticsUpdated
Dim statArgs As New Cisco.CTIOSCLIENTLib.Arguments
Dim numAgents As Integer
Dim strAgents As String
LogEvent("OnSkillGroupStatisticsUpdated", pIArguments)
' Log("Stats: " + pIArguments.GetValue("Statistics").DumpArg())
statArgs = pIArguments.GetValueArray("Statistics")
' Log("Statargs:" + statArgs.DumpArgs())
If statArgs.IsValid("AgentsLoggedOn") Then
' Log("Valid")
Else
' Log("NotValid")
End If
Log("numAgents: " + Str(statArgs.GetValueInt("AgentsLoggedOn")))
numAgents = statArgs.GetValueInt("AgentsLoggedOn")
Log("numAgents: " + Str(numAgents))
End Sub
Private Sub Enable_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Enable.Click
Dim myskillArgs, skillArgs As New Cisco.CTIOSCLIENTLib.Arguments
Log("Sending EnableSkillGroupStatistics")
skillArgs.AddItem("1", 1) ' 1 is skillgroupnumber
skillArgs.AddItem("2", 0) ' 0 is skillgroup priority
skillArgs.AddItem("3", 2) ' 2 is skillgroupnumber
skillArgs.AddItem("4", 0) ' 0 is skillgroup priority
myskillArgs.AddItem("SkillGroupNumbers", skillArgs)
m_Agent.EnableSkillGroupStatistics(myskillArgs)
End Sub
Private Sub Disable_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Disable.Click
Dim myskillArgs, skillArgs As New Cisco.CTIOSCLIENTLib.Arguments
skillArgs.AddItem("1", 1) ' 1 is skillgroupnumber
skillArgs.AddItem("2", 0) ' 0 is skillgroup priority
skillArgs.AddItem("3", 2) ' 2 is skillgroupnumber
skillArgs.AddItem("4", 0) ' 0 is skillgroup priority
myskillArgs.AddItem("SkillGroupNumbers", skillArgs)
m_Agent.DisableSkillGroupStatistics(myskillArgs)
End Sub
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Arthur Shats
Posts:
57
Join Date:
8/24/12
Recent Posts
RE: Memory leaks in CTIOS
Answer
10/11/12 7:32 PM as a reply to David Lender.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
But in Agent Desktop, if I want to monitor stats for ALL skillgroups, I don't have to specify the skillgroups, do I ? Therefore you can omit your .AddItem calls. Am I right?
Another questions. If my app runs continuously, 24 hours a day, I call EnableSkillGroupStatistics once and I do NOT have to call DisableSkillGroupStatistics. Am I correct?
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
David Lender
Posts:
467
Join Date:
4/4/08
Recent Posts
RE: New Message from Arthur Shats in Computer Telephony Integration Object
Answer
10/11/12 7:54 PM as a reply to Arthur Shats.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Correct, if you want all skill groups you do not specify any skills arguments to the EnableSkillGroupStatistics method.
Correct, you only have to enable skillgroupstatistics once.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Arthur Shats
Posts:
57
Join Date:
8/24/12
Recent Posts
RE: Memory leaks in CTIOS
Answer
10/15/12 3:57 PM as a reply to David Lender.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
David,
I reviewed your code above and it looks like I am using the same logic in C++. The only difference is that I don't call DisableSkillGroupStatistics and I don't set skillGroups when calling EnableSkillGroupStatistics. What I noticed in your code is that you set skillGroups using AddItem for skillArgs, then you call myskillArgs.AddItem("SkillGroupNumbers", skillArgs) and you use myskillArgs to EnableSkillGroupStatistics. The Java code example in the documentation uses SetValue to set skillGroups and corresponding peripheralID instead of AddItem and it does NOT use a line similar to your myskillArgs.AddItem("SkillGroupNumbers", skillArgs). Is that right? I am doing anything of that kind because I need stats for ALL groups, so I just call:
Arguments &skillGrpParam = Arguments::CreateInstance();
rc = m_pCtiAgent->EnableSkillGroupStatistics(skillGrpParam);
but maybe I do need to set something like your myskillArgs.AddItem("SkillGroupNumbers", skillArgs) where skillArgs would be an empty object? What do you think?
thanks.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Arthur Shats
Posts:
57
Join Date:
8/24/12
Recent Posts
RE: Memory leaks in CTIOS
Answer
10/15/12 3:59 PM as a reply to Arthur Shats.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Correction,
When in the above I say, "I am doing anything of that kind because I need stats for ALL groups", I really mean "I am
NOT
doing anything of that kind because I need stats for ALL groups"
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
David Lender
Posts:
467
Join Date:
4/4/08
Recent Posts
RE: New Message from Arthur Shats in Computer Telephony Integration Object
Answer
10/15/12 4:03 PM as a reply to Arthur Shats.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
You are receiving the skillgroupstatistics for all stats, correct? My example was for obtaining only specific skills. You are correct for all skills you send an empty skillGrpParam, just make sure you release it after you call EnableSkillGroupStatistics.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Showing 1 - 20 of 28 results.
Items per Page
(Changing the value of this field will reload the page.)
5
10
20
30
50
75
Page
(Changing the value of this field will reload the page.)
1
2
of 2
First
Previous
Next
Last
Collateral
No files available