History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5167
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: P0 P0
Assignee: Unassigned
Reporter: P T Withington
Votes: 0
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

DHTML setResource error tickled by lzmail

Created: 29/Nov/07 05:29 AM   Updated: 21/Jan/08 03:58 PM
Component/s: Kernel - DHTML
Affects Version/s: RingDing (4.1)
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 7,471
Runtime: N/A
Fix in hand: False


 Description  « Hide
simple test case now works but lzmail in webtop shows a different error when compiling to DHTML -
$1.indexOf is not a function
setResource(0)LFCdhtml.js (line 2237)
(no name)(0)LFCdhtml.js (line 4655)
(no name)(Object resource=panelTopLeftResource, Object name=tl $classrootdepth=1)LFCdhtml.js (line 731)
(no name)(panel name: panel __LZUID=__U61 _instanceAttrs=Object, Object name=tl $classrootdepth=1, null, true)LFCdhtml.js (line 692)
nc()LFCdhtml.js (line 86)
(no name)(Object attrs=Object name=view, true)LFCdhtml.js (line 1015)
(no name)([This is the canvas hasdatapath=true datapath=Object, [Object attrs=Object name=text, Object attrs=Object name=mailwindow, Object attrs=Object name=contactswindow, 277 more...], LzView name: gAbout id: gAbout __LZUID=__U60 _instanceAttrs=Object, 3 more...], 500)LFCdhtml.js (line 10961)
(no name)()LFCdhtml.js (line 10934)
(no name)(2625)LFCdhtml.js (line 1679)
__idleupdate()LFCdhtml.js (line 12427)
__update()LFCdhtml.js (line 1721)
[Break on this error] if($1.indexOf("http:")==0||$1.indexOf("https:")==0){

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
P T Withington - 03/Dec/07 05:54 AM
This is the bug report from our debugger. I think the problem is the commented out swf resources are tickling a bug in the sprite where it is trying to set the resource frame number but the resource is empty? Note we also get this warning first:

WARNING @../../components/panel/panel.lzx#6: Invalid CSS value for .tl.resource: `''`. Use: `#000000`.
ERROR: $1_r.indexOf is not a function
lzx> Debug.inspect(ERROR: $1_r.indexOf is not a function)
«#LzError#5#4| ERROR: $1_r.indexOf is not a function» {
backtrace: debugger/LzBacktrace.lzs#113/19 <- Debug.backtrace <- LzSprite.prototype...
file: null
line: null
message: '$1_r.indexOf is not a function'
}
ERROR: $1_r.indexOf is not a function
lzx> Please copy the following information into your bug report:

---START OF BUG REPORT---

LPS VERSION INFORMATION:
URL: http://dueling-banjos.local:8080/ringding-2/diamond/client/future/lzmail/main.lzx?lzt=object&lzt=object&debug=true&lzr=dhtml&lzbacktrace=true
Version: 4.1.x.0
Release: Latest
Build: 7370 /Users/ptw/OpenLaszlo/ringding-2
Date: 2007-12-02T15:28:55-0500
Target: dhtml
Runtime: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

ERROR MESSAGE: ERROR: $1_r.indexOf is not a function

ERROR BACKTRACE:
debugger/LzBacktrace.lzs#113/19 @lfc/debugger/LzBacktrace.lzs#126
this: «Backtrace(13)#6| debugger/LzBacktrace.lzs#113/19 <- Debug.backtrace <- LzSprite.prototype...»
arg 0: 0
Debug.backtrace @lfc/debugger/LzBacktrace.lzs#231
this: «Object#12| Debug»
arg 0: 0
LzSprite.prototype.setResource @lfc/kernel/dhtml/LzSprite.js#431
this: «kernel/dhtml/LzSprite.js#12/16#16#15| {..., owner: LzView name: tl , uid: 5}»
arg 0: 0
setResource @lfc/views/LaszloView.lzs#1031
this: «lz.view#0| .tl»
arg 0: 0
__LZapplyStyleMap @lfc/core/LzNode.lzs#547
this: «lz.view#0| .tl»
arg 0: {resource: panelTopLeftResource}
arg 1: {..., _dbg_filename: ../../components/panel/panel.lzx, _dbg_lineno: 6, name: tl, ...}
initialize @lfc/core/LzNode.lzs#182
this: «lz.view#0| .tl»
arg 0: «lz.panel#25| .panel»
arg 1: {..., _dbg_filename: ../../components/panel/panel.lzx, _dbg_lineno: 6, name: tl, ...}
arg 2: null
arg 3: true
lz.view @lfc/compiler/Class.lzs#290
this: «lz.view#0| .tl»
arg 0: «lz.panel#25| .panel»
arg 1: {..., _dbg_filename: ../../components/panel/panel.lzx, _dbg_lineno: 6, name: tl, ...}
arg 2: null
arg 3: true
makeChild @lfc/core/LzNode.lzs#1095
this: «lz.panel#25| .panel»
arg 0: {attrs: [object Object], name: view}
arg 1: true
makeSomeViews @lfc/services/LzInstantiator.lzs#196
this: #LzInstantiator
arg 0: «Array(6)#34| [This is the canvas, [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[objec...»
arg 1: 500
checkQ @lfc/services/LzInstantiator.lzs#152
this: #LzInstantiator
arg 0: 4135
sendEvent @lfc/events/LaszloEvents.lzs#451
this: #LzIdle.onidle
arg 0: 4135
#__idleupdate @lfc/services/LzIdle.lzs#105
this: «Window(0)#43| global»
arg 0: 4135
kernel/LzIdleKernel.lzs#29/16 @lfc/kernel/LzIdleKernel.lzs#32
this: «Window(0)#43| global»
arg 0: 3195

OBJECT DETAILS:
«Backtrace(13)#6| debugger/LzBacktrace.lzs#113/19 <- Debug.backtrace <- LzSprite.prototype...» {
length: 13
0: kernel/LzIdleKernel.lzs#29/16 @lfc/kernel/LzIdleKernel.lzs#32
1: #__idleupdate @lfc/services/LzIdle.lzs#105
2: sendEvent @lfc/events/LaszloEvents.lzs#451
3: checkQ @lfc/services/LzInstantiator.lzs#152
4: makeSomeViews @lfc/services/LzInstantiator.lzs#196
5: makeChild @lfc/core/LzNode.lzs#1095
6: lz.view @lfc/compiler/Class.lzs#290
7: initialize @lfc/core/LzNode.lzs#182
8: __LZapplyStyleMap @lfc/core/LzNode.lzs#547
9: setResource @lfc/views/LaszloView.lzs#1031
10: LzSprite.prototype.setResource @lfc/kernel/dhtml/LzSprite.js#431
11: Debug.backtrace @lfc/debugger/LzBacktrace.lzs#231
12: debugger/LzBacktrace.lzs#113/19 @lfc/debugger/LzBacktrace.lzs#126
}

«Object#12| Debug» {
_dbg_name: 'Debug'
_showDivs: Debug._showDivs
abbreviate: Debug.abbreviate
addHTMLText: Debug.addHTMLText
addText: Debug.addText
atFreshLine: true
atPrompt: false
backtrace: Debug.backtrace
backtraceStack: «Array(17)| [3195, 4135, 4135, 4135, This is the canvas,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[...»
bugReport: Debug.bugReport
clear: Debug.clear
computeSlotDescription: Debug.computeSlotDescription
debug: Debug.debug
DebugWindow: []
deprecated: Debug.deprecated
displayObj: Debug.displayObj
displayResult: Debug.displayResult
doEval: Debug.doEval
enableInspectMouseHandlers: Debug.enableInspectMouseHandlers
environment: {_: ERROR: $1_r.indexOf is not a function
}
error: Debug.error
evalCarefully: Debug.evalCarefully
format: Debug.format
formatToString: formatToString
freshLine: Debug.freshLine
freshPrompt: Debug.freshPrompt
functionName: Debug.functionName
functionNamePattern: «RegExp»
id_to_object_table: «Array(71)| [LzView name: tl , WARNING @../../components/panel/panel.lzx#6: Invalid CSS value for .tl.resource: `''`. Use: `#000000`.
, function LzWarning($1_file, $2_line, $3_message) {
try {
var $4_$lzsc$d = Debug, $5_$lzsc$s = $4_$l...»
IDForObject: Debug.IDForObject
ignoringErrors: ignoringErrors
info: Debug.info
inspect: Debug.inspect
inspectInternal: Debug.inspectInternal
internalProperty: Debug.internalProperty
internalPropertyPrefixes: [$, __]
log: Debug.log
makeDebugWindow: Debug.makeDebugWindow
makeObjectLink: Debug.makeObjectLink
messageLevel: 'WARNING'
messageLevels: {ALL: 0, MONITOR: 1, TRACE: 2, DEBUG: 3, INFO: 4, WARNING: 5, ERROR: 6, NONE: 7}
monitor: Debug.monitor
monitorMessage: Debug.monitorMessage
nativeClassPattern: «RegExp»
objectClassPattern: «RegExp»
ObjectForID: Debug.ObjectForID
objectOwnProperties: Debug.objectOwnProperties
objseq: 88
pad: pad
printLength: 256
printPretty: true
showDivs: Debug.showDivs
showInternalProperties: false
singleEscapeCharacters: {\b: , \t: , \n:
, \v: , \f: , \r: , \": ", \': ', \\: \}
sourceWarningHistory: []
stackOverflow: Debug.stackOverflow
stringEscape: Debug.stringEscape
trace: Debug.trace
traceMessage: Debug.traceMessage
uncaughtBacktraceStack: «Array(19)| [3195, 4135, 4135, 4135, This is the canvas,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[...»
unmonitor: Debug.unmonitor
untrace: Debug.untrace
versionInfo: Debug.versionInfo
warn: Debug.warn
warnInternal: Debug.warnInternal
write: Debug.write
writeInternal: Debug.writeInternal
xmlEscape: Debug.xmlEscape
}

«kernel/dhtml/LzSprite.js#12/16#16#15| {..., owner: LzView name: tl , uid: 5}» {
owner: .tl
uid: 5
}

«lz.panel#25| .panel» {
_dbg_filename: '../../framework/application/about.lzx'
_dbg_lineno: 81
_events: [LzEvent, LzEvent, LzEvent, LzEvent]
_instanceAttrs: {..., _dbg_filename: ../../framework/application/about.lzx, _dbg_lineno: 81, appVersions: null, clickable: true, name: panel, ...}
_instanceChildren: [[object Object], [object Object], [object Object], [object Object]]
_pl: ._pl
aboutWebtopString: 'About Laszlo Webtop...'
appVersions: null
clickable: true
constructor: lz.panel
immediateparent: #gAbout
layouts: [LzLayout for view panel name: panel ]
mask: #canvas
name: 'panel'
nodeLevel: 2
onaddsubview: .panel.onaddsubview
onclick: .panel.onclick
oninit: .panel.oninit
onremovesubview: .panel.onremovesubview
parent: #gAbout
setup: setup
sprite: {..., owner: panel name: panel , uid: 4, ..., clickable: true}
subnodes: [LzLayout for view panel name: panel , LzView name: tl ]
tl: .tl
webtopMessageString: "Laszlo Webtop enables the delivery of multiple applications inside a client-server framework.<br/>(<u><a href='http://www.laszlosystems.com/go/webtop' target='_blank'>Learn More</a></u>)"
}

«LzInstantiatorClass#33| #LzInstantiator» {
_dbg_name: '#LzInstantiator'
checkQDel: #LzInstantiator.checkQ()/* handles #LzIdle.onidle */
constructor: LzInstantiatorClass
isUpdating: true
}

«LzEvent#39| #LzIdle.onidle» {
_dbg_eventName: 'onidle'
_dbg_eventSender: #LzIdle
constructor: LzEvent
delegateList: [Delegate for [object Object] calls checkQ 1]
locked: true
ready: true
}



Elliot Winard - 03/Dec/07 07:39 AM
yeah, I removed the need for SWF resources by changing the src to ""

P T Withington - 06/Dec/07 10:57 AM
r7471 | ptw | 2007-12-06 13:55:56 -0500 (Thu, 06 Dec 2007) | 21 lines
Changed paths:
   M /openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs

Change 20071206-ptw-h by ptw@dueling-banjos.local on 2007-12-06 07:52:27 EST
    in /Users/ptw/OpenLaszlo/ringding-2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Correct CSS color heuristic

Bugs Fixed:
LPP-5167 'DHTML setResource error tickled by lzmail'

Technical Reviewer: ben@openlaszlo.org (pending)
QA Reviewer: ewinard@laszlosystems.com (pending)

Details:
    Heuristic for detecting use of '0xNNNNNN' as a color in CSS was
    incorrectly converting an empty string to `0` (leading to havoc).
    Be much more careful with this heuristic.

Tests:
    smokecheck, lzmail now gets past this error


Mamye Kratt - 21/Jan/08 03:58 PM
(trunk 4 local build r7775)

lzmail is running on r7719 and smokecheck.lzx runs successfully.