Author Topic: developer active x and memory issue  (Read 7562 times)

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

plummer

  • Guest
developer active x and memory issue
« on: September 21, 2007, 06:43:00 AM »
Dear Genesys Developers:

I've been programming with Genesys Active X 7.1 and has developed programs ranging from softphone to wallboard servers (no small thanks to the code available here).

I am currently writing a software piece that will tracks agent states. To do this, I am using TExtension and assign it to each agent's DN. I have noticed that if I have more than 600 DNs, my windows returns an error on TExtension.Load for six-hundred-first DN . The error says that system is out of memory.

I was wondering if someone could tell me if there is a way to register for DNs without creating a new TExtension object for each one of them. And if not, has anyone ran into a memory limitation when registering a large number of DNs using this method.

Incidentally my development environment has 2 Gb of memory. But this should not matter since Windows would create any additional memory using swap drive, so what is causing this mysterious "out of memory" error?

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1416
  • Karma: 18
Re: developer active x and memory issue
« Reply #1 on: September 28, 2007, 02:34:42 AM »
Plummer,

I tried to replicate the problem and I got program stuck at around 600th count:

Private Sub Form_Load()

    Dim i As Integer
    Dim dns As String
    Dim dni As String
   
   
    TConnection1.THost = "172.30.0.222"
    TConnection1.TPort = "3000"
    rtn = TConnection1.TConnect()
   
   
    dns = "1000"
    dni = dns
   
    For i = 0 To 3000

        dni = dni + 1
   
        Load Me.TExtension1(i)
        dns = dni
        Me.TExtension1(i).TDN = dns
       
   
    Next i

    TConnection1.TDisconnect
   
End Sub

Application freezes on Load Me.TExtension1(i) when i is around 600 or so. I checked System Resources, and there is still a lot of free memory, and CPU is almost zero. I wonder what causes this? anyone?

Best regards,
Vic

Offline vivek

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 0
Re: developer active x and memory issue
« Reply #2 on: October 01, 2007, 03:02:26 PM »
You need to create new textension object and use it, once the work is done you need to destroy it. - think in object oriented way.

Was wondering way need to write your own software... because Genesys Stats server is already tracking agent stats:)

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1416
  • Karma: 18
Re: developer active x and memory issue
« Reply #3 on: October 16, 2007, 07:08:10 AM »
Hi, Vivek,

if you look at the code that I used to check plummer's post, we are creating multiple TExtensions, and it seems like there is some problem with one system having more than 500 TExtensions open at the same time.

I was plaing with Quest Server a bit more, and noticed that it is also affected by this bug. If there are more than 500 queues, Quest Server cannot add them without experiencing this error.

I issued a ticket to Genesys, but so far, instead of working on it they want to know why we are curious about it by asking for who it was for and when we plan to use it.

Best regards,
Vic

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: developer active x and memory issue
« Reply #4 on: October 16, 2007, 02:55:25 PM »
Lol, sounds to me that they are aware of the issue and want to know how long and $$$ will they put on it according of who is going to use it, for a 5 license user, not way, for a $$$$$$ customer may go...lol

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1416
  • Karma: 18
Re: developer active x and memory issue
« Reply #5 on: October 23, 2007, 08:44:16 AM »
I checked plummer's claim and found that on different systems it varies between 200 to 1000. I think this is really a system limitation and not Genesys Active X one. Chances are it is something related to number of handles that can be assigned to active X or something like that (I have no clue what this "handles" are, but I am reminding of the limit of how many processes you can run at any given time on windows and I think it is something like that).

Does anyone know of a good site to ask ActiveX programming question on this, because now I am intrigued :)

Best regards,
Vic

Marked as best answer by on Today at 08:21:41 AM

Offline mcruli

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: developer active x and memory issue
« Reply #6 on: October 31, 2007, 09:43:01 PM »
  • Undo Best Answer
  • I think, you problem is the windows thread limitation.
    Try make this using the tlib dll.