Project

General

Profile

Actions

Bug #1501

closed

wt-3.2.3-rc2 WTableView with large number of rows within Firefox and Opera not updated correctly

Added by Stefan Ruppert over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
10/29/2012
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I think due to the latest layout changes within wt-3.2.3-rc1 sometimes the WTableView does not update the view correctly under Firefox and Opera.

We have a table view which shows rows from a database. If we show less than around 4500 or 5000 rows in table view everytime is fine. But if there are more rows in the table to show the number of rows is not updated anymore. Lets say we want to show 7185 rows from the database:

  • If the table view was empty before no rows are shown at all.
  • If the table view had 145 rows before only 145 rows are displayed of the 7185 loaded rows.

We use a normal WStandardItemModel.

The problem exists in Firefox 16.0 and Opera 12.02.

With Chrome 22.0.1229 and IE9 9.0.10 this problem does not occur!


Files

large.cpp (2.22 KB) large.cpp Koen Deforche, 10/30/2012 08:39 AM
TestApp.cc (12.7 KB) TestApp.cc Stefan Ruppert, 10/30/2012 09:51 AM
TestApp.cc (12.7 KB) TestApp.cc Koen Deforche, 10/30/2012 10:31 AM
Actions #1

Updated by Koen Deforche over 11 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
Actions #2

Updated by Koen Deforche over 11 years ago

Hey Stefan,

I couldn't reproduce this with the test case attached. Can you modify it so it reproduces the problem ?

Perhaps a layout manager needs to be involved ?

Regards,

koen

Actions #3

Updated by Stefan Ruppert over 11 years ago

Hi Koen,

I have integrated your VirtualTable within our TestApp.cc application which has the same layout we use for our real application. The problem can be reproduced with this layout. Does not work with Firefox, works fine with Chrome! Attached you will find the source code.

The model will be populated with 40 rows initially and if you click apply 7185 rows should be added. But the scrollbar only allows to scroll the initial 40 rows!

Stefan

Koen Deforche wrote:

Hey Stefan,

I couldn't reproduce this with the test case attached. Can you modify it so it reproduces the problem ?

Perhaps a layout manager needs to be involved ?

Regards,

koen

Actions #4

Updated by Koen Deforche over 11 years ago

Hey,

I've added insertColumns() to this test case (see attached), but this works for me with either Opera or Firefox.

Perhaps some other small changes I made in my tree affect this, so to be sure, I've pushed everything I still had pending to git. Can you double verify things go wrong for you ?

My Firefox version is: 16.0.2 (Linux) and my Opera version is: 12.02 (Linux)

Perhaps it also depends on the OS ?

Regards,

koen

Actions #5

Updated by Stefan Ruppert over 11 years ago

Hi Koen,

with bug is not fixed with your latest changes. I use also Linux (64bit debian with gnome). Also my Firefox is 16.0.2.

I need to do now something different. I'll come back to this issue this afternoon!

Stefan

Actions #6

Updated by Stefan Ruppert over 11 years ago

Hi Koen,

I tested your large.cpp test app and it has also the same problem. Thus it seems to me that it is an environment or a compiling problem...

Now I tested it with Firefox 12 (Windows XP) and Firefox 16.0.2 (Windows 7) with the same bug. Therefore is it possible that there is a compiling problem? For building Wt we use an old Debian 4.0 with the following g:

ruppert@debian-x86-64:~/work/wt/kdeforche-wt-523950c/build$ g++ --version
g++ (GCC) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Actions #7

Updated by Stefan Ruppert over 11 years ago

Hi Koen,

I looked into the HTML content of Firefox and Chrome and I saw the following difference marked with "". It seems to me that there is some calculation wrong and a float value is returned within Firefox "1.0px" instead of "143700px" within Chrome. Hope that helps to track down the problem! Maybe there is an integer overflow problem?!

Firefox WTableView HTML content:

<div id="o276moj" onclick="var e=event||window.event,o=this;if($(o).hasClass('Wt-disabled')){Wt3_2_3.cancelEvent(e);return;}if(window.wtClickTimeout) {clearTimeout(window.wtClickTimeout);window.wtClickTimeout = null;Wt._p_.update(o,'s2d',e,true);}else{if (Wt3_2_3.isIElt9 &amp;&amp; document.createEventObject) e = document.createEventObject(e);window.wtClickTimeout = setTimeout(function() {window.wtClickTimeout = null;Wt._p_.update(o,'s26',e,true);},200);}" onmousedown="var e=event||window.event,o=this;if($(o).hasClass('Wt-disabled')){Wt3_2_3.cancelEvent(e);return;}Wt._p_.saveDownPos(event);Wt3_2_3.capture(this);(function(obj, event) {jQuery.data(Wt3_2_3.$('o276mo6'), 'obj').mouseDown(obj, event);})(o,e);Wt._p_.update(o,'s27',e,true);" onmouseup="var e=event||window.event,o=this;if($(o).hasClass('Wt-disabled')){Wt3_2_3.cancelEvent(e);return;}Wt._p_.update(o,'s28',e,true);"

 class="Wt-spacer" style="position:relative;width:785.0px;height:1.0px;line-height: 20.0px">
                                                          ^^^^^^^^^^^^^

Chrome WTableView HTML content

<div id="o276mi3" onclick="var e=event||window.event,o=this;if($(o).hasClass('Wt-disabled')){Wt3_2_3.cancelEvent(e);return;}if(window.wtClickTimeout) {clearTimeout(window.wtClickTimeout);window.wtClickTimeout = null;Wt._p_.update(o,'se',e,true);}else{if (Wt3_2_3.isIElt9 &amp;&amp; document.createEventObject) e = document.createEventObject(e);window.wtClickTimeout = setTimeout(function() {window.wtClickTimeout = null;Wt._p_.update(o,'s7',e,true);},200);}" onmousedown="var e=event||window.event,o=this;if($(o).hasClass('Wt-disabled')){Wt3_2_3.cancelEvent(e);return;}Wt._p_.saveDownPos(event);Wt3_2_3.capture(this);(function(obj, event) {jQuery.data(Wt3_2_3.$('o276mhq'), 'obj').mouseDown(obj, event);})(o,e);Wt._p_.update(o,'s8',e,true);" onmouseup="var e=event||window.event,o=this;if($(o).hasClass('Wt-disabled')){Wt3_2_3.cancelEvent(e);return;}Wt._p_.update(o,'s9',e,true);" 

class="Wt-spacer" style="position: relative; width: 785px; height: 143700px; line-height: 20px; ">
                                                           ^^^^^^^^^^^^^^^^

<div id="o276mog" class="Wt-tv-contents" style="position: absolute; width: 785px; height: 480px; left: 0px; right: auto; top: 0px; bottom: auto; background-image: url(&quot;/myarmweb/themes/default/no-stripes/no-stripe-20px.gif&quot;); background-repeat: repeat;">
Actions #8

Updated by Koen Deforche over 11 years ago

Hey Stefan,

Can you paste the network POST response that you seebefore the failing update ?

I Have a suspicion about a change in float rendering.

Also, what boost version do you use ?

Regards,

Koen

Actions #9

Updated by Stefan Ruppert over 11 years ago

Hi Koen,

we use boost-1.48.

This is the POST result before the addRows button:

Wt._p_.response(3225736434);{var j15=Wt3_2_3.$('os17vo6');
var j16=document.createElement('div');j15.parentNode.replaceChild(j16,j15);
j16.setAttribute('id', 'os17vo6');
j16.style.position='absolute';
j16.style.width='0.0px';
j16.style.overflowX='hidden';
j16.style.overflowY='hidden';
j16.style.display='none';
Wt3_2_3.setHtml(j16,'<div id="os17vo7" onclick="var e=event||window.event,o=this;if($(o).hasClass(\'Wt-disabled\')){Wt3_2_3.cancelEvent(e);return;}if(window.wtClickTimeout) {clearTimeout(window.wtClickTimeout);window.wtClickTimeout = null;Wt._p_.update(o,\'s4d\',e,true);}else{if (Wt3_2_3.isIElt9 &amp;&amp; document.createEventObject) e = document.createEventObject(e);window.wtClickTimeout = setTimeout(function() {window.wtClickTimeout = null;Wt._p_.update(o,\'s48\',e,true);},200);}" onmousedown="var e=event||window.event,o=this;if($(o).hasClass(\'Wt-disabled\')){Wt3_2_3.cancelEvent(e);return;}Wt._p_.saveDownPos(event);Wt3_2_3.capture(this);Wt._p_.update(o,\'s49\',e,true);" onmouseup="var e=event||window.event,o=this;if($(o).hasClass(\'Wt-disabled\')){Wt3_2_3.cancelEvent(e);return;}Wt._p_.update(o,\'s4a\',e,true);" style="position:relative;width:0.0px;height:1.0px;line-height: 20.0px"><div id="os17vo8" class="Wt-tv-contents" style="position:absolute;width:0.0px;height:0.0px;left:auto;right:auto;top:0.0px;bottom:auto;background-image:url(/myarmweb/themes/default/no-stripes/no-stripe-20px.gif);background-repeat:repeat;"></div></div>');
Wt3_2_3.unstub(j15,j16,1);
}

This is the POST result of the addRows button POST:

Wt._p_.response(3225736435);{Wt3_2_3.remove('os17vmm');Wt3_2_3.remove('os17vmn');Wt3_2_3.remove('os17vmo');Wt3_2_3.remove('os17vmp');Wt3_2_3.remove('os17vmq');var j17=Wt3_2_3.$('os17voo');
jQuery.data(Wt3_2_3.$('os17voo'), 'obj').scrolled(0, 586, 0, 90);

var j18=Wt3_2_3.$('os17vob');
j18.style.height='1.437e05px';
var j19=Wt3_2_3.$('os17vo7');
j19.style.height='1.437e05px';
var j20=Wt3_2_3.$('os17voe');
j20.style.position='absolute';
j20.style.height='480.0px';
j20.style.left='0.0px';
j20.style.right='auto';
j20.style.top='0.0px';
j20.style.bottom='auto';
Wt3_2_3.setHtml(j20,'<div id="os17vlx" class="Wt-tv-c1" style="position:absolute;width:157.0px;height:480.0px;left:0.0px;right:auto;top:0.0px;bottom:auto;overflow-x:hidden;overflow-y:hidden;"><div id="t_os17vml" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vmk" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vmj" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vmi" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vmh" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vmg" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vmf" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vme" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vmd" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vmc" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vmb" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vma" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vm9" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vm8" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vm7" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vm6" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vm5" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vm4" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vm3" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vm2" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vm1" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vm0" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlz" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vly" class="Wt-tv-c" style="height:20.0px;">Data</div></div><div id="os17vl8" class="Wt-tv-c2" style="position:absolute;width:157.0px;height:480.0px;left:157.0px;right:auto;top:0.0px;bottom:auto;overflow-x:hidden;overflow-y:hidden;"><div id="t_os17vlw" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlv" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlu" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlt" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vls" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlr" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlq" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlp" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlo" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vln" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlm" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vll" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlk" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlj" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vli" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlh" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlg" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlf" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vle" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vld" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlc" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vlb" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vla" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vl9" class="Wt-tv-c" style="height:20.0px;">Data</div></div><div id="os17vkj" class="Wt-tv-c3" style="position:absolute;width:157.0px;height:480.0px;left:314.0px;right:auto;top:0.0px;bottom:auto;overflow-x:hidden;overflow-y:hidden;"><div id="t_os17vl7" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vl6" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vl5" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vl4" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vl3" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vl2" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vl1" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vl0" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkz" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vky" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkx" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkw" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkv" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vku" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkt" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vks" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkr" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkq" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkp" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vko" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkn" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkm" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkl" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkk" class="Wt-tv-c" style="height:20.0px;">Data</div></div><div id="os17vju" class="Wt-tv-c4" style="position:absolute;width:157.0px;height:480.0px;left:471.0px;right:auto;top:0.0px;bottom:auto;overflow-x:hidden;overflow-y:hidden;"><div id="t_os17vki" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkh" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkg" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkf" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vke" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkd" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkc" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vkb" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vka" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vk9" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vk8" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vk7" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vk6" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vk5" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vk4" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vk3" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vk2" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vk1" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vk0" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjz" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjy" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjx" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjw" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjv" class="Wt-tv-c" style="height:20.0px;">Data</div></div><div id="os17vj5" class="Wt-tv-c5" style="position:absolute;width:157.0px;height:480.0px;left:628.0px;right:auto;top:0.0px;bottom:auto;overflow-x:hidden;overflow-y:hidden;"><div id="t_os17vjt" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjs" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjr" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjq" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjp" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjo" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjn" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjm" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjl" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjk" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjj" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vji" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjh" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjg" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjf" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vje" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjd" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjc" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vjb" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vja" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vj9" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vj8" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vj7" class="Wt-tv-c" style="height:20.0px;">Data</div><div id="t_os17vj6" class="Wt-tv-c" style="height:20.0px;">Data</div></div>');
var j21=Wt3_2_3.$('os17vo8');
j21.style.position='absolute';
j21.style.height='480.0px';
j21.style.left='auto';
j21.style.right='auto';
j21.style.top='0.0px';
j21.style.bottom='auto';
Wt.layouts2.adjust('os17vo1', [[0,0],[0,1],[1,0],[1,1]]);
}
Actions #10

Updated by Koen Deforche over 11 years ago

  • Status changed from Feedback to Resolved

Hey,

Got it! A fix is on its way to the git repo.

Regards,

koen

Actions #11

Updated by Stefan Ruppert over 11 years ago

Hi Koen,

thats great! I can't see it within the master git repo. Can you push the fix?

Stefan

Actions #12

Updated by Stefan Ruppert over 11 years ago

Hi Koen,

yes, the latest git version fixed the bug!

Thanks!

Stefan

Actions #13

Updated by Koen Deforche over 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF