PDA

View Full Version : lzc bug in version 4.1


matrix9
07-04-2008, 01:13 AM
For a simple view with a gif source, the compiled version can't display the image.

The attached zip contains all files. The test.rtf contains the screenshots, which are also available in the attached test.png file. Use compile.bat to compile it to swf8 runtime.

The lzx file is simple:

<canvas>
<simplelayout/>
<text>test</text>
<view>
<handler name="oninit">
this.setSource("test.gif");
</handler>
</view>
</canvas>



The test.gif can't be displayed in the compiled swf format.

Am I doing something wrong or it's a bug in v4.1?

Thanks.

ultimatemanu
07-04-2008, 01:48 AM
Hello,

it works perfectly for me. I've tested with gif and jpg file.
Put the debug on and look if you see and error, e.g. if your image is into an another directory...

By.

Emmanuel

matrix9
07-04-2008, 05:11 AM
There's no such problem in v4.0.x. The problem only exists in v4.1.0

test.gif and test.lzx are in the same directory. I've tested many times and the results are always the same. (OS: windows 2003 and RHEL 4.0, JDK 1.6)

The problem is the swf compiled by lzc doesn't behave the same way as the lzx compiled by the server. And we are using lzc to compile project.

(BTW, the compile.bat in the zip should have the --runtime=swf8 switch)

matrix9
07-04-2008, 05:52 AM
Test it again on Windwos XP (sp2) and Java 1.4.2, the results are the same.

Turn on debugger, nothing written to debug window for the lzx one, but for the compiled swf one, I saw these messages in debug window:


[object Object]
undefined


test.lzx and test.gif are in the same directory. and for the same lzx file, lzx edition works correctly, so that excludes the possibility of wrong gif path. But lzc may generate a wrong path to the swf file.

ultimatemanu
07-04-2008, 05:57 AM
I've tested this code with 4.1.0 on windows XP SP2 within Firefox 3, FLASH compilation, and it works !!!!!!!!
I really cannot figure out what happens for you :confused: :confused: :confused:

ultimatemanu
07-04-2008, 06:05 AM
The only difference I see is my java version. I use Java 1.6.
I've attached a printscreen of your code running.
Also it works for me with OL 4.1.0 on windows XP SP2 and Java 1.6 :cool:

matrix9
07-04-2008, 06:19 AM
thanks for testing. The key is the compiled swf doesn't work. How do you compile the lzx file?

What I did is
1. Set LPS_HOME
2. Go to C:\Program Files\OpenLaszlo Server 4.1.0\Server\lps-4.1.0
3. Run
WEB-INF\lps\server\bin\lzc.bat --runtime=swf8 test.lzx

Then test.lzr=swf8.swf will be created.
Use the browser to open test.lzr=swf8.swf file:

http://127.0.0.1:8080/lps-4.1.0/test.lzr=swf8.swf

I've tested on both XP and 2003, with JDK 1.4.2 and 1.6. Pretty sure it's a bug in lzc.

ultimatemanu
07-04-2008, 07:26 AM
Allright, I do use the "browser" "super lazy";) compilation method.
I run the Laszlo server. then I open the my-apps folder with the browser of my choise : url = http://127.0.0.1:8080/lps-4.1.0/my-apps/
Tomcat lists all the file I have under it and then I just click on the file I want to compile.
That's all.

SamLL
07-08-2008, 01:46 PM
I am also encountering this problem for SOLO applications and not for proxied applications, just as matrix9 and ultimatemanu describe.

Even worse, this locks the entire application - if I include a button in matrix9's test.lzx, I am unable to click the button.

This is a very serious problem for me, since our application is deployed in SOLO mode.

matrix9
07-08-2008, 10:50 PM
I am also encountering this problem for SOLO applications and not for proxied applications, just as matrix9 and ultimatemanu describe.

Even worse, this locks the entire application - if I include a button in matrix9's test.lzx, I am unable to click the button.

This is a very serious problem for me, since our application is deployed in SOLO mode.

Yes, button, menu and other components stop responding to mouse click in this case. This is why I created a simple code to demonstrate this problem. I've already submitted a bug report.

MBachstein
09-26-2008, 12:13 AM
Hello,

I also have the problem that my application stops with the message


[object Object]
undefined


in the debug window. This message only occurs in SWF8 runtime using the application as a Web Archive in the tomcat.

With a tomcat running in the eclipse environment the application works fine in swf8 and dhtml runtime.

Now my question is how I can find out which object is undefined and makes the application stop. Unfortunately, the message in the debug window gives no information about that.

Does anybody have a clue how I can find this out?

Kind Regards,
Marc

senshi
09-29-2008, 01:42 AM
OK, I figured out what's happening:
The application is in proxied-mode (proxied is not set to "false" on the canvas), therefore the application does the following request for the image:

http://localhost:8080/trunk/my-apps/lzc/test.lzr=swf8.swf?lzr=swf8&proxied=true&ccache=true&cache=true&url=http%3A%2F%2Flocalhost%3A8080%2Ftrunk%2Fmy-apps%2Flzc%2Ftest.gif&lzt=media&timeout=30000


The "lzt"-parameter tells the LPS to respond with a transcoded swf-file (all images are converted to swf's in proxied mode). But the problem is the file-part:
"test.lzr=swf8.swf" - this path does not match the url-pattern (in web.xml) for the LPS-Servlet, so it won't be processed by the LPS at all, and you'll just get back the whole application. Bad, bad...

A simple, but working fix - define a "proxyurl" on your canvas which ends with ".lzx" (note: there is no file "foo.lzx", we just need something which matches the url-pattern).

<canvas debug="true" proxyurl="foo.lzx">