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

Key: LPP-4549
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: P1 P1
Assignee: Unassigned
Reporter: Elliot Winard
Votes: 0
Watchers: 0
Operations

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

runtime warnings should include file references, line #s

Created: 22/Aug/07 08:08 AM   Updated: 24/Oct/07 11:42 AM
Component/s: Debugger
Affects Version/s: 4.0.5WaffleCone
Fix Version/s: 4.0.5WaffleCone

Time Tracking:
Not Specified

File Attachments: 1. File test-datapath.lzx (0.3 kb)


Severity: Minor
Fixed in Change#: 6,361
Runtime: N/A
Fix in hand: False


 Description  « Hide
STEPS:
1. port app from OL3.4 to Wafflecone
2. look at new warnings that show up in debugger

RESULTS:
Debugger warnings that didn't appear in 3.4 show up in Wafflecone.
So far these have been useful, but not simple to track down and fix in the source.

EXPECTED:
warnings include a way to get to file name, line # of code line that caused debugger warning

WARNING: Redefining .buttons.options from {} to «lz.wtcombobox»
WARNING: `menu` is already defined. Use `lz.menu` instead.
WARNING: __LZgetNodes: p is null in Datapath for LzView name: to
WARNING: __LZgetNodes: p is null in Datapath for LzView name: cc
WARNING: __LZgetNodes: p is null in LzDatapointer
WARNING: __LZgetNodes: p is null in LzDatapointer
WARNING: __LZprocessOperator: p is null in Datapath for messagegridbaserow

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Elliot Winard - 22/Aug/07 08:09 AM
__LzgetNodes calls are due to making xpathqueries on datapaths with no data

Elliot Winard - 22/Aug/07 08:10 AM
attached file displays debugger warnings at runtime when user clicks button

P T Withington - 29/Aug/07 09:25 AM
So I have a scheme where if the warning message refers to an LZX node, I can print the file/line where that node was defined. But that is not necessarily the source of the error. I think really what you want is to enable backtracing and to have the backtrace tell you the file/line of each call. Would that be an acceptable alternative solution?

P T Withington - 05/Sep/07 05:54 AM
r6361 | ptw | 2007-09-05 08:53:39 -0400 (Wed, 05 Sep 2007) | 41 lines
Changed paths:
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzBacktrace.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzMessage.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java

Change 20070903-ptw-a by ptw@dueling-banjos.local on 2007-09-03 18:01:48 EDT
    in /Users/ptw/OpenLaszlo/wafflecone-2
    for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: Add file/line information to backtraces

Bugs Fixed:
LPP-4549 'runtime warnings should include file references, line #s'

Technical Reviewer: max (Message-ID: <46DE199D.8020901@openlaszlo.org>), dda@ddanderson.com (pending)
QA Reviewer: ewinard (pending)

Details:
    LzMessage: Get file/line information from backtrace if available,
    tweak format of locationString.

    LzDebug.*: correct padding computation for computeSlotDescription.

    LzDebug.js: _dbg_name takes precedence over runtime function name.

    LzBacktrace, LzRuntime: Move backtraceStack creation to runtime so it is
    available as early as needed.

    LzBacktrace: Add __LzStackFrame.isUserFrame,
    .filename, .lineno. Update _dbg_name to display file and line
    information. Add LzBacktrace.userStackFrame to get first non-LFC
    frame from a backtrace.

    Compiler: Correct precedence computations for unparser, ensure
    parens are added in all the appropriate places. Needed to handle
    expression-lists that backtrace annotation inserts.

    JavascriptGenerator, CodeGenerator: Copy location info when
    re-writing functions. Note line numbers of call sites for
    backtrace. Note file and line on functions for backtraces.

Tests:
    smokecheck with backtrace on shows file/line information in debug
    messages and in backtraces.


Mamye Kratt - 24/Oct/07 11:42 AM
(trunk local build r5967)
Closed, verified emma bug is closed too.