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

Key: LPP-4597
Type: Bug Bug
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

turn debugger warnings for non-fatal issues into INFO

Created: 28/Aug/07 12:01 PM   Updated: 24/Oct/07 11:23 AM
Component/s: Laszlo Foundation Classes (LFC)
Affects Version/s: 4.0.5WaffleCone
Fix Version/s: 4.0.5WaffleCone

Time Tracking:
Not Specified

File Attachments: 1. File messagegridbaserow.lzx (14 kb)


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


 Description  « Hide
STEPS: Haven't fully tracked down offending issue. Not sure if it's Webtop or Wafflecone LFC components.
1. compile Webtop with ?debug=true in wafflecone
2. look at debugger output

RESULTS: debugger warning
WARNING: `menu` is already defined.

STACK TRACE -
Use `lz.menu` instead.«debugger/LzBacktrace.lzs#85/19#21(12)#23| debugger/LzMessage.lzs#388/17 <- LzSourceMessage.format <- Debug.warnInt...» {
length: 12
  0: kernel/LzIdleKernel.lzs#29/16.apply(«undefined», [])
  1: __idleupdate.apply(global, [4176])
  2: sendEvent.apply(LzIdle.onidle, [4176])
  3: «debugger/LzBacktrace.lzs#59/22#41| checkQ.apply(«LzInstantiatorClass| {..., datareplq: messagegridbaserow ,,messagegridbaserow ,,messagegridbaserow ,,messagegridbaserow ,, isdatareplicating: false, istrickling: false, halted: false, isimmediate: fa...»
  4: «debugger/LzBacktrace.lzs#59/22#41| makeSomeViews.apply(«LzInstantiatorClass| {..., datareplq: messagegridbaserow ,,messagegridbaserow ,,messagegridbaserow ,,messagegridbaserow ,, isdatareplicating: false, istrickling: false, halted: false, isimmedi...»
  5: makeChild.apply(This is the canvas, [[object Object], true])
  6: lz.class.apply(for lz.menu, [This is the canvas, [object Object], null, true])
  7: initialize.apply(for lz.menu, [This is the canvas, [object Object], null, true])
  8: Debug.warn.apply(#Debug, [`%s` is already defined. Use `%s` instead., menu, [type Function]])
  9: Debug.warnInternal.apply(#Debug, [[type Function], `%s` is already defined. Use `%s` instead., menu, [type Function]])
 10: LzSourceMessage.format.apply(debugger/LzMessage.lzs#388/17, [null, null, `%s` is already defined. Use `%s` instead., menu, [type Function]])
 11: debugger/LzMessage.lzs#388/17.apply(WARNING: `menu` is already defined. Use `lz.menu` instead., [null, null, `menu` is already defined. Use `lz.menu` instead.])
}«debugger/LzBacktrace.lzs#85/19#21(12)#23| debugger/LzMessage.lzs#388/17 <- LzSourceMessage.format <- Debug.warnInt...»
lzx>

EXPECTED:
no warnings

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
P T Withington - 29/Aug/07 04:50 PM
r6284 | ptw | 2007-08-29 19:47:46 -0400 (Wed, 29 Aug 2007) | 73 lines
Changed paths:
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/compiler/Class.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/core/LzNode.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/core/UserClass.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzDatapath.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzDatapointer.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzDataset.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzBacktrace.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzDebug.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/LzMessage.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/dhtml/kernel.js
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/debugger/platform/swf/kernel.as
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/views/LaszloView.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java

Change 20070828-ptw-t by ptw@dueling-banjos.local on 2007-08-28 16:56:02 EDT
    in /Users/ptw/OpenLaszlo/wafflecone-2
    for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: Implement Debug.messageLevel, downgrade deprecated warnings
to info, heuristicate file/line info in Debug messages

Bugs Fixed:
LPP-4597 'turn debugger warnings for non-fatal issues into INFO'
LPP-4549 'runtime warnings should include file references, line #s' (partial)
LPP-4478 'Richedittext: WARNING: __LZgetNodes: p is null in LzDatapointer' (partial)
LPP-4450 'improve LFC warnings for xpath query on empty datapath' (partial)
LPP-4551 'debugger warnings emitted from a private LFC function' (partial)
LPP-4592 'basedatacombobox-based components with selectfirst="false" emits Debugger warnings' (partial)
LPP-4464 'setVisible(null) warning, but it is never called' (partial)

Technical Reviewer: max (Message-ID: <46D5EB42.4000508@openlaszlo.org>)
QA Reviewer: enw (pending)

Documentation:
    In debug mode the compiler annotates every LzNode object with the
    file/line where the object was created. If a node object is one
    of the arguments to a Debug message, the debugger will use the
    node object's file/line information when printing the message to
    the console. [This is obviously not as accurate as we would like,
    but it at least gives the programmer a hint as to where the
    problem may lie.]

    Debug.messageLevel is one of (from lowest to highest) 'ALL',
    'DEBUG', 'INFO', 'WARNING', 'ERROR'; defaults to 'ALL'. Setting
    it to a particular level will suppress all messages of a lower
    level.

    All deprecation messages have been changed from 'WARNING' to
    'INFO'. By setting Debug.messageLevel to 'WARNING', deprecation
    messages will be suppressed.

    All API warnings that are new in 4.x have been changed from
    'WARNING' to 'INFO'. By setting Debug.messageLevel to 'WARNING',
    deprecation messages will be suppressed.

Details:
    LzSprite, LzNode, LaszloView, LzAnimatorGroup, LzDatapointer,
    LzDataset, LzDatapath, Class: Change all deprecated warnings to
    use Debug.deprecated, or in custom cases Debug.info.

    UserClass: Refine the warning that explains why <class name="xxx">
    will not be defined as a global if there is already a global value
    of the same name in the underlying runtime. Change the warning to
    an info message.

    LzMessage: Update frames to skip to match the current
    implementation of backtrace. Heuristicate file/lineno from
    message arguments. Add Debug.deprecated that handles common
    deprecation messages.

    LzDebug, kernel.as, kernel.js: Implement Debug.messageLevel.

    LzBacktrace: Add a pretty type name.

    NodeModel: Annotate nodes with their creation file and line.

Tests:
    swf and dhtml smokecheck.

    In smokecheck, the last two warnings now say:

    WARNING: regression.lzl:730: serialize: p is null in LzDatapointer name: bad
    WARNING: regression.lzl:744: setNodeAttribute: p is null in LzDatapointer name: dp

    Which indeed are the locations of the erroneous datapointers.


Mamye Kratt - 24/Oct/07 11:23 AM
(trunk4 build r5967)
Fixed, verified emma bug is closed too.