|
|
|
Note sure if this helps, but the exact error message was:
Error: A runtime Error has occurred. Do you wish to Debug? Line: 3602 Error: 'style' is null or not an object. This small test reproduces the same problem.
(Make sure to use '?lzr=dhtml&lzt=html' with the URL.) Click on 'Count' button to start the counter. This will update the <text> by calling setText() every 1ms. Counter will stop after 992 calls with a javascript error. Note: I'm not using it every 1ms -- but every 1 second -- but this speeds up getting to the problem without waiting 2 minutes. See 'Attached File' for sample code to repro the problem
Reminder: Counter will stop after 992 calls consistently using IE...
...and requires only '?lzr=dhtml' to repro (&lzt=html isn't needed). This also affects RingDing Revision 7457 for OpenLaszlo 4.1.x
- made testcase smaller
- added another test which shows a bug in the "LzTextSprite" text-style cache [just apply the patch to see what's actually broken in LzTextSprite] Also see created
Change 20071218-Philip-6 by Philip@Philip-DC on 2007-12-18 16:27:25 EST
in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Fixed text size caching in IE7 New Features: Bugs Fixed: Technical Reviewer: max QA Reviewer: (pending) Doc Reviewer: (pending) Documentation: Release Notes: Details: LzTextSprite.getTextSize() has a cache to save computation, and this cache is erased every 1000 entries. The problem is the counter is also zeroed. In IE, the tag name includes the counter value and the name cannot be reused without generating javascript errors. I think IE is trying to reuse the name, but the object has been deleted. The fix is to never zero the counter. The cache is erased but the counter value is set to its old value. Tests: Run test in Files: M WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20071218-Philip-6.tar Problem still occurs using Ring Ding Build 4.1.x.7695.
When _sizecache.counter reaches 1000, Internet Explorer 7 displays: Error: A runtime error has occurred. Do you wish to debug? Line: 1889 Error: 'style' is null or not an object. The line it fails on is in 'LzTextSprite.js' when calling: ....$8.style.display="block"; (where $8 is the mdiv variable and style is not defined) I tried adding the following change to 'LzTextSprite.js' to guard against this, but it also fails stating: "Object doesn't support this property or method" when calling '__setAttr()' on the mdiv. Note: '>>' indicates lines changed -- periods added to preserve indention. [snippit from LzTextSprite.js] ............var tagname = this.multiline ? 'div' : 'span'; ............var mdiv = _textsizecache[tagname]; ............if (mdiv == null) { ................mdiv = document.createElement(tagname); ................Lz.__setAttr(mdiv, 'style', style); ................root.appendChild(mdiv); ................_textsizecache[tagname] = mdiv; ............} >>.......else if( mdiv.style == null ) { >>..............Lz.__setAttr( mdiv, 'style', style ); >>............._textsizecache[tagname] = mdiv; >>.......} [end snippit] Can you help? To work-around the problem, I've added the following changes to 'LzTextSprite.js'. This appears to work, but I'm not sure about the side effects.
Note: '>>' indicates lines added -- periods added to preserve indention. [snippit from LzTextSprite.js] ........mdiv.innerHTML = string; >>...if( typeof( mdiv.style ) == "undefined" ) >>...{ .............mdiv.style.display = 'block'; >>...} ........size.width = mdiv.offsetWidth; ........size.height = mdiv.offsetHeight; >>...if( typeof( mdiv.style ) == "undefined" ) >>...{ .............mdiv.style.display = 'none'; >>...} Correction...
[snippit from LzTextSprite.js] ........mdiv.innerHTML = string; >>...if( typeof( mdiv.style ) != "undefined" ) >>...{ .............mdiv.style.display = 'block'; >>...} ........size.width = mdiv.offsetWidth; ........size.height = mdiv.offsetHeight; >>...if( typeof( mdiv.style ) != "undefined" ) >>...{ .............mdiv.style.display = 'none'; >>...} [end snippit] Is this a solution that should be committed to the trunks for Ring Ding and/or Wafflecone? (trunk 4 build r7833)
----- Original Message ----- From: "Dan Swaney" <dswaney@echostorm.net> To: <mamye@laszlosystems.com> Sent: Thursday, January 24, 2008 5:06 PM Subject: Hi Mamye, problems during a refresh or close down of the browser window. See Also, it seems as though over time, text will not resize properly causing clipping and strange word-wrapping effects on text elements. My guess is this occurs after the 1000-th text update occurs. I downloaded the latest 4.1.x build and will try to see if these problems fix themselves -- although last week I did this and images weren't resizing (possibly after a certain size of the SOLO DHTML Laszlo App). =Dan= On Jan 24, 2008, at 6:40 PM, Mamye Kratt wrote: Hi Dan, I haven't checked the fix for using? r7833? Mamye From Dan: Yes -- I'm using r7833. Are you using your original test_tabs.lzx app to test?
I just tried it on a clean version of trunk (r7885). I ran test_tabs.lzx for 5000 iterations on IE7 without any errors. It's not easily reproducible with the attached examples.
I'm having major problems within an application that continuously updates 24 text fields per second. I'm working on building a small test app to type reproduce this to help with fixing this since I can't post the entire application. I finally was able to repro this with a small example.
I'll be posting it shortly... See
From Dan: Here's the state of the tickets: 1. LPP-5389 (sub-task to 2. While similar in cause, ( 3. but didn't realize it wouldn't let me edit the title. I also didn't realize the initial description couldn't be edited -- it shows the description of |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The problem occurred after 2 min 30 seconds ( approx 150 calls to setText() ).