Chrome 37 showModalDialog and kwf 3.5

19 views
Skip to first unread message

Artyom M

unread,
Oct 16, 2014, 1:54:39 AM10/16/14
to koala-fra...@googlegroups.com
Hello!

After Google killed showModalDialog method in Chrome 37 our project on kwf 3.5 not working properly. It freeze until you kill the tab. 
See load.jpg
chrome.exe constantly eats memory....see process.jpg

I do a regedit fix from this link:

But problem still exists.
Now it works only in Firefox.
p.s. IE freeze and eats memory too.
load.JPG
process.JPG

Niko Sams

unread,
Oct 17, 2014, 2:13:06 AM10/17/14
to Koala Framework Dev
Hi,

that's a different issue - we don't use showModalDialog.
check developoer console for any errors.

Niko

--
You received this message because you are subscribed to the Google Groups "Koala Framework Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to koala-framework...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Artyom M

unread,
Oct 17, 2014, 2:19:11 AM10/17/14
to koala-fra...@googlegroups.com
Hmm... coincided with chrome release 37. Strange...

>check developoer console for any errors.
What you mean? F12 in Chrome not work because tab is freeze.

Niko Sams

unread,
Oct 17, 2014, 2:21:50 AM10/17/14
to Koala Framework Dev
then you have some kind of an endless loop - which also causes the high memory usage.
You could probalby find the cause using firefox...

Niko

--

Artyom M

unread,
Oct 26, 2014, 7:49:19 PM10/26/14
to koala-fra...@googlegroups.com
Hello!

Now not work in FF =((

How can I debug this?


what i see in chrome

  1. Request URL:
  2. Request Headers
    1. Provisional headers are shown
    2. Content-Type:
      application/x-www-form-urlencoded; charset=UTF-8
    3. Origin:
    4. Referer:
    5. User-Agent:
      Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36
    6. X-DevTools-Emulate-Network-Conditions-Client-Id:
      D49D41DE-1740-41D0-9384-5051389725E9
    7. X-Requested-With:
      XMLHttpRequest
  3. Form Dataview sourceview URL encoded
    1. meta:
      true
    2. flightId:
      4092
    3. application_max_assets_mtime:
      1407134012
    4. kwfSessionToken:
      901ff1c8124bbda84e54bcfff2993a02

in FF i see responce, but it eats memory now...

Admin.js not work (FF says that I need to debug)

Artyom M

unread,
Oct 27, 2014, 2:07:39 AM10/27/14
to koala-fra...@googlegroups.com
Done!

I found interesting bug in this lines of my code:
$tab->fields->add(new Kwf_Form_Field_TimeField('flightStartTime', trlKwf('Start Time')))->setIncrement(5);
$tab->fields->add(new Kwf_Form_Field_TimeField('flightStartActualTime', 'Факт. время'))->setIncrement(5);

After I comment this my project works normal. 

Then I found that this time incremen (setIncremet(5)) is reason of endless loop.

In \library\ext\2.3.0\src\widgets\form\TimeField.js:

// private - This is the date to use when generating time values in the absence of either minValue
// or maxValue.  Using the current date causes DST issues on DST boundary dates, so this is an 
// arbitrary "safe" date that can be any date aside from DST boundary dates.
initDate: '1/1/2008',

// private
    initComponent : function(){
        Ext.form.TimeField.superclass.initComponent.call(this);

        if(typeof this.minValue == "string"){
            this.minValue = this.parseDate(this.minValue);
        }
        if(typeof this.maxValue == "string"){
            this.maxValue = this.parseDate(this.maxValue);
        }

        if(!this.store){
            var min = this.parseDate(this.minValue);
            if(!min){
                min = new Date(this.initDate).clearTime();
            }
            var max = this.parseDate(this.maxValue);
            if(!max){
                max = new Date(this.initDate).clearTime().add('mi', (24 * 60) - 1);
            }
            var times = [];
            while(min <= max){
                times.push([min.dateFormat(this.format)]);
                min = min.add('mi', this.increment);
            }
            this.store = new Ext.data.SimpleStore({
                fields: ['text'],
                data : times
            });
            this.displayField = 'text';
        }
    },


What I see in debug in max and min variables:
min = Tue Jan 01 2008 00:00:00 GMT+1000

max = Tue Jan 01 2008 23:59:00 GMT+1000

when min value set to 23:55 next increment change it to 23:00 and do it again and again => endless loop

I change this:
while(min <= max) {
     times.push([min.dateFormat(this.format)]);
     min = min.add('mi', this.increment);
}

to this:
do {
     times.push([min.dateFormat(this.format)]);
     min = min.add('mi', this.increment);
}
while(min <= max);

It works normal now.

Also I set initDate: '10/26/2014',

Artyom M

unread,
Oct 27, 2014, 3:25:22 AM10/27/14
to koala-fra...@googlegroups.com
Finally found a problem and solution.

Problem is KB2998527:

Solution is to change initDate in Ext.js:
initDate: '2/1/2008',


Also about this bug (in russian):

Niko Sams

unread,
Oct 27, 2014, 4:28:35 PM10/27/14
to Koala Framework Dev
wow, interesting issue.

As this is a problem in ExtJS you could probably check if other versions are also affected.
If your fix is the proper way to solve this problem I can integrate it into our library repository.

cheers,
Niko

Artyom M

unread,
Oct 27, 2014, 8:39:37 PM10/27/14
to koala-fra...@googlegroups.com
>As this is a problem in ExtJS you could probably check if other versions are also affected.
I heard there are no problems in ExtJS 4  but it remains to be verified. Do you have plans to migrate on last ExtJS version?

>If your fix is the proper way to solve this problem I can integrate it into our library repository.
Anyway I don't know other methods to solve this problem =))

Niko Sams

unread,
Oct 28, 2014, 4:22:02 PM10/28/14
to Koala Framework Dev
On Tue, Oct 28, 2014 at 1:39 AM, Artyom M <psycho...@gmail.com> wrote:
>As this is a problem in ExtJS you could probably check if other versions are also affected.
I heard there are no problems in ExtJS 4  but it remains to be verified. Do you have plans to migrate on last ExtJS version?

>If your fix is the proper way to solve this problem I can integrate it into our library repository.
Anyway I don't know other methods to solve this problem =))

--
Reply all
Reply to author
Forward
0 new messages