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

Key: LPP-4082
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: -- --
Assignee: Mamye Kratt
Reporter: P T Withington
Votes: 0
Watchers: 0
Operations

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

LzDatapointer.selectChild not careful enough

Created: 02/Jun/07 06:30 AM   Updated: 06/Jun/07 03:23 PM
Component/s: LFC - Data
Affects Version/s: 4.0.2
Fix Version/s: 4.0.3, Legals

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 5,313
Runtime: N/A
Fix in hand: False


 Description  « Hide
On 2007-06-01, at 16:52 EDT, Antun Karlovac wrote:

Hi all,

In DHTML (4.0.2), I'm seeing an error in the debugger that says "has no properties". This causes the runtime to break completely, so nothing further is drawn:

ERROR: http://localhost:8080/lps-4.0.2/lps/includes/lfc/LFCdhtml-debug.js:11855: $2_np has no properties

Can anyone explain what the "has no properties" errors mean? Is there a we can avoid having them be so destructive?

It happens both with the debugger open and closed.


Here's the offending line from the LFCdhtml-debug.js:

$2_np = $2_np.getFirstChild()


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
P T Withington - 02/Jun/07 06:31 AM
This is Javascript's way of saying you're trying to dereference a null pointer. You're asking foo.bar, but foo is a value that does not have any properties, so it surely does not have a bar property. Most likely foo is undefined or null.

What would help is a test case, or a backtrace from Firebug that might let us pinpoint the source of the error. If you look at the source of the error in Firebug, and scan back to the beginning of the function you will see a comment in the form:

/* -*- file: data/LzDataElement.lzs#293.34 -*- */

that gives the source of the generated code, which would also be helpful.

Grepping around, it looks like this error is coming from LzDataElement.selectChild not being careful enough about running off the end.

P T Withington - 02/Jun/07 06:39 AM
In review by Henry

P T Withington - 04/Jun/07 10:19 AM
r5313 | ptw | 2007-06-04 13:18:31 -0400 (Mon, 04 Jun 2007) | 20 lines
Changed paths:
   M /openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDataElement.lzs
   M /openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDatapointer.lzs

Change 20070602-ptw-4 by ptw@dueling-banjos.local on 2007-06-02 09:36:49 EDT
    in /Users/ptw/OpenLaszlo/legals
    for http://svn.openlaszlo.org/openlaszlo/branches/legals

Summary: Repair LzDatapointer.selectChild

Bugs Fixed:
LPP-4082: 'LzDatapointer.selectChild not careful enough'

Technical Reviewer: henry (Message-ID: <8c61fad60706040953h28e269f0t487576f397a19df6@mail.gmail.com>)
QA Reviewer: antun (pending)

Details:
    Factored out common loop from all select operations, rewrote in a
    more modern style, testing pre-condition at the top of the loop.

Tests:
    smokecheck, Waiting for test case from Antun

Mamye Kratt - 06/Jun/07 03:23 PM
(local legals build r5334)
Smokecheck passes all 685 tests. Antun never provided a test file mentioned in the checkin.