Instance.FormTitle

  • Автор темы Автор темы EtaLasquera
  • Дата начала Дата начала

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
527
Реакции
113
Баллы
43
Hi all!

We are trying to move our projects from FF52 to Chrome.
Our latest revision is 5.29.5 and our main build revision is 5.16.2.

On 5.16.2 if we write on c# code:
string title = instance.FormTitle;
projec.SendInfoToLog(title, true);

We got something like this:
Instance (Port: 1234 PID: 789)

But in revision 5.29.5 the command return only:
Instance

We made a lot of loops in our projects and sometimes these loops make the instance to use a lot of memmory (I alreay post a lot of things talking about that).
I read all documentation and don't find anything talking about changes in this command.

There is a way to retreive PID from current instance running in revision 5.29.5?

Here is our old c# snipet to restart instance after memmory check (not working in our latest licenced pro revision):
Код:
Развернуть Свернуть Копировать
string title = instance.FormTitle.ToString();
Regex r = new Regex (@"(?<=Pid:).*?(?=\))");
Match m = r.Match(title);
if (m.Success){
    int pid = int.Parse(m.Value.ToString());
    System.Diagnostics.Process p = System.Diagnostics.Process.GetProcessById(pid);
    long mem = p.WorkingSet64 / 1048576;
    project.Variables["mem"].Value = "";
    project.SendInfoToLog("Memory in use: "+mem.ToString()+"MB on PID: " + pid.ToString() ,true);
    if (mem > 850) {
        project.SendInfoToLog("High memory usage, restarting...",true);
        project.Variables["mem"].Value = "sim";
    }
}
else{
    project.SendInfoToLog("There is no PID? Help me!", true);
}
 
I reported the bug to developers. Hope they fix it in new versions.
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)