So I think I found a flex compiler bug. I'm trimming it down to a minimal
test case, but it seems to
trigger a 'verify' error when you call a function expression which contains
some flavor of that try/catch/finally
that you're generating.



On Tue, Sep 29, 2009 at 11:27 PM, Henry Minsky <[email protected]>wrote:

> So when the fdb debugger runs, it prints out a bunch of things that look
> like maybe verifier errors, starting with
>
> [trace] verify <anonymous>()
> [trace]             exception[0] from=47 to=186 target=192 type=*
> name=$lzsc$e
> [trace]             exception[1] from=45 to=281 target=285 type=*
> name=(none)
> [trace]                         stack:
> [trace]                         scope: [global Object$ LzEventable$ LzNode$
> LzView$ $lzc$class_LzDebugWindow$]
> [trace]                          locals: Object * * *
> [trace]   0:debugfile
> "/Users/hqm/openlaszlo/lib/jakarta-tomcat-5.0.30/temp/lzswf9/Users/hqm/openlaszlo/trunk6/test/foo/build/hello;;$lzc$class_LzDebugWindow.as"
> [trace]                         stack:
> [trace]                         scope: [global Object$ LzEventable$ LzNode$
> LzView$ $lzc$class_LzDebugWindow$]
> [trace]                          locals: Object * * *
> [trace]   3:debugline 36
> [trace]                         stack:
> [trace]                         scope: [global Object$ LzEventable$ LzNode$
> LzView$ $lzc$class_LzDebugWindow$]
> [trace]                          locals: Object * * *
> [trace]   5:newactivation
> [trace]                         stack: <anonymous>
>
>
> The intermediate .as files made by compiling swf10 get stuck into a temp
> dir in tomcat, on my machine that's
>
> ~/openlaszlo/lib/jakarta-tomcat-5.0.30/temp/lzswf9/Users/hqm/openlaszlo/trunk6/test/foo/build/hello/
> for a test app  test/foo/hello.lzx
>
> The lzDebugWindow.as file shows this code block which ends at line 36 (it's
> an anonymous method
> on LzDebugWindow class)
>
> function  ($lzc$ignore_$1) {
> /* -*- file: -*- */
> var $lzsc$d_$3 = Debug;
> var $lzsc$s_$4 = $lzsc$d_$3.backtraceStack;
> try {
> if ($lzsc$s_$4) {
> var $lzsc$a_$5 = [$lzc$ignore_$1];
> $lzsc$a_$5.callee = "applied='${...}'";
> $lzsc$a_$5["this"] = this;
> $lzsc$a_$5.filename = "debugger/debugger.lzx";
> $lzsc$a_$5.lineno = 122;
> $lzsc$s_$4.push($lzsc$a_$5);
> if ($lzsc$s_$4.length > $lzsc$s_$4.maxDepth) {
> $lzsc$d_$3.stackOverflow()
> }};
> with (this) {
> /* -*- file: debugger/debugger.lzx#122.262 -*- */
> var $lzc$newvalue_$2 = parent.default_width;
> /* -*- file: -*- */
> if ($lzc$newvalue_$2 !== this["applied"] || !this.inited) {
> $lzsc$a_$5.lineno = 128, this.setAttribute("applied", $lzc$newvalue_$2)
> }}}
> catch ($lzsc$e) {
> if ($lzsc$e is Error && $lzsc$e !== lz["$lzsc$thrownError"]) {
> $lzsc$runtime.reportException("debugger/debugger.lzx", $lzsc$a_$5.lineno,
> $lzsc$e)
> } else {
> throw $lzsc$e
> }}
> finally {
> if ($lzsc$s_$4) {
> $lzsc$s_$4.pop()
> }}}
>
> So I'm going to look at that and see if there's something that might be
> confusing the flex compiler...
>
>
> On Tue, Sep 29, 2009 at 6:13 PM, P T Withington <[email protected]> wrote:
>
>> [This is not really a review request, more a request for collaboration.
>>  I've made a cut at getting the backtrace annotations working in swf9 and
>> made a lot of progress, but it is currently bombing in a way that I can't
>> debug.  I'm using:
>>
>>  fdb "
>> http://repo-man.home:8080/trunk/test/smoke/simple.lzx?debug=true&lzr=swf10&lzbacktrace=true
>> "
>>
>> as my test case.  It halts implying that canvas has no makeChild method.
>>  If anyone feels like unpacking this and playing around to see if they can
>> push it along, that would be great...  I've got to stop for the day.]
>>
>> Change 20090929-ptw-y by [email protected] on 2009-09-29 18:01:59 EDT
>>    in /Users/ptw/OpenLaszlo/trunk
>>    for http://svn.openlaszlo.org/openlaszlo/trunk
>>
>> Summary: A cut at getting backtracing to work in swf9
>>
>> Bugs Fixed: LPP-8479 Debug.evalCarefully not necessary after LPP-8222?
>> [I got carried away trying to make the line numbering in the debugger
>> more accurate...]
>>
>> Technical Reviewer: hminsky (pending)
>> QA Reviewer: [email protected] (pending)
>>
>> Release Notes:
>>   The debugger indicates when the file/line information on a debugger
>>   message is not accurate.  If the location information is coming
>>   from the view associated with the error, rather than @file it will
>>   print %file.  If the line number is only approximate (backtracing
>>   is not enabled), rather than #line it will print ~line.
>>
>> Details:
>>
>>
>> Tests:
>>    Nothing works yet...
>>
>> Files:
>> M      test/smoke/lztext.lzl
>> M      test/smoke/lzunit-test.lzl
>> M      WEB-INF/lps/lfc/kernel/swf9/LzPreloader.as
>> M      WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as
>> M      WEB-INF/lps/lfc/debugger/LzMessage.lzs
>> M      WEB-INF/lps/lfc/debugger/LzDebug.lzs
>> M      WEB-INF/lps/lfc/debugger/platform/swf9/LzDebug.as
>> M      WEB-INF/lps/lfc/debugger/LzMonitor.lzs
>> M      WEB-INF/lps/lfc/debugger/LzTrace.lzs
>> M      WEB-INF/lps/lfc/debugger/LzBacktrace.lzs
>> M      WEB-INF/lps/lfc/build.xml
>> M      WEB-INF/lps/lfc/compiler/LzDebugStub.lzs
>> M      WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs
>> M      WEB-INF/lps/server/src/org/openlaszlo/cm/CompilationManager.java
>> M      WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
>> M      WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
>> M      WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
>> M      WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
>> M
>>  WEB-INF/lps/server/src/org/openlaszlo/compiler/ToplevelCompiler.java
>> M      WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java
>> M      WEB-INF/lps/templates/info-response.xslt
>> M      lps/components/debugger/platform/swf9/eval.lzs
>>
>> Changeset:
>> http://svn.openlaszlo.org/openlaszlo/patches/20090929-ptw-y.tar
>>
>
>
>
> --
> Henry Minsky
> Software Architect
> [email protected]
>
>
>


-- 
Henry Minsky
Software Architect
[email protected]
_______________________________________________
Laszlo-reviews mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews

Reply via email to