PDA

View Full Version : Cannot compile when debug checked


hoenie
11-08-2006, 01:49 PM
I have a seating_chart.lzx that compiles and runs without problem. But if I check "Debug" and then compile, I get this:

The application could not be compiled due to the following errors:
Compilation Errors
seating_chart.lzx:156:10: Block

On line 156 of seating_chart.lzx, there is the beginning of the <script> tag and nothing else. This tag is closed with </script> on line 733.

In addition, there is not a single instance of "debug" and "Debug" anywhere in the .lzx file. That's why I am totally puzzled.

I can also get the same error if I bug ' debug="true" ' in the <canvas> tag.

Has anybody encountered this problem? What is a "Block" error, anyway?

Thanks.

senshi
11-09-2006, 11:26 AM
Try to split up your script-block. I think I've read once of this bug on the dev-mails.
But I think it is fixed, at least in the nightly builds...

I've just found the dev-mail:

Date: Fri, 27 Oct 2006 07:35:22 -0400
From: P T Withington
Subject: Re: [Laszlo-dev] [JIRA] Updated: (LPP-2903) unit test
test/lztest/lztest-layout.lzx fails in DHTML runtime
To: "Henry Minsky"
Cc: "Jim Grandy \(JIRA\)", OpenLaszlo development and bug reporting

I'll check in a fix for the message (along with a bunch of other
accumulated tweaks).

On 2006-10-27, at 07:13 EDT, Henry Minsky wrote:

> > ah ha lemme try without backtrace
> >
> > On 10/27/06, P T Withington wrote:
>> >>
>> >> Oh yes I do. Damn default precedences. Who would have thought ?:
>> >> had lower precedence than +
>> >>
>> >> And I bet you have backtracing on, which expands the code, which is
>> >> why it is too big for you.
>> >>
>> >> On 2006-10-27, at 06:47 EDT, P T Withington wrote:
>> >>
>>> >> > Very likely. Check line 74 of sc/Assembler.java. I don't
>>> >> > understand why the message got truncated though.
>>> >> >
>>> >> > On 2006-10-27, at 00:44 EDT, Henry Minsky wrote:
>>> >> >
>>>> >> >> If I break that large <script> block into a couple smaller ones, I
>>>> >> >> don't get the error.
>>>> >> >> Is the script compiler complaining that the compiled byte code
>>>> >> >> function block is too large?
>>>> >> >>
>>>> >> >>
>>>> >> >> On 10/26/06, P T Withington wrote: Nope. But
>>>> >> >> that location is the beginning of a CDATA block in a
>>>> >> >> script. Something happen to your XML parser?
>>>> >> >>
>>>> >> >> On 2006-10-25, at 18:33 EDT, Henry Minsky wrote:
>>>> >> >>
>>>>> >> >> > When I try to compile that app I get this compiler error which I
>>>>> >> >> > have not
>>>>> >> >> > seen before. Does this ring a bell for anybody?
>>>>> >> >> >
>>>>> >> >> > Compilation Errorslztest-layout.lzx:89:9: Block
...

hoenie
11-10-2006, 01:53 PM
Thank you very much, senshi.

Splitting the script block into two smaller blocks does get rid of the compilation failure error. I can do my debugging again!

The version of OpenLazslo I am using is v3.3.3. If I ever get to update to the nightly build, I'll check to see if this bug has been fixed.