a7mdfm / flexpaper

Automatically exported from code.google.com/p/flexpaper
1 stars 0 forks source link

Adding FlexPaper.swc as component to Flex App freezes FlexBuilder3 on WinXP (SP2) #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Has anyone experienced this ?

Steps to reproduce:

1. Open FlexBuilder3

2. Create new flex app project. (File->New->Flex Project. Give it name
'p1'. Click on 'Finish')

3. Follow instructions under 'Using FlexPaper in Adobe Flex' listed at 
http://flexpaper.devaldi.com/docs.html and do following
   a. Add FlexPaper.swc to bin-debug dir of project 'p1'. Also add test SWF
 (Paper3.swf) file created using PDF2SWF to bin-debug 
   b. Edit and change p1.mxml (under src of 'p1') code to following (as
shown under Using FlexPaper in Adobe Flex)

   <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" width="100%" height="100%" 
   xmlns:fp="com.devaldi.controls.flexpaper.*">
    <fp:FlexPaperViewer width="520" height="450" Scale="0.6"
SwfFile="Paper3.swf" /> </mx:Application>

   b. Just to be sure, rebuild project in FlexBuilder3 by clicking on
Project->Clean and Build Project (if build-automatically is not set)
   c. Double click on p1.mxml or right click on p1.mxml and select 'MXML
Editor'.

The FlexBuilder3 freezes. The only way out is kill the process and restart.
This happens every time and there is no way to proceed further.
(I don't have any other projects in FlexBuilder3 as its a brand new install)

More info about the setup:

1. SDKs tried under FlexBuilder3: 3.2.0 & 3.5.0.12683

2. FlexBuilder3 (trial) version: 3.0 (build 3.0.2.214193)

3. Contents of FlexBuilder.ini:
-vmargs
-Xms256m
-Xmx1024m
-XX:MaxPermSize=512m
-XX:PermSize=256m
-Djava.net.preferIPv4Stack=true

4. The problem seems to be the Design View of MXML editor. You can view
p1.mxml as text (right click->open with->Text Editor) without freezing
FlexBuilder3.

Also, if I just try to run the project p1, I get following runtime error
in the browser (FireFox 3.6.2)

Error: Error #2118: The LoaderInfo class does not implement this method.
    at Error$/throwError()
    at flash.display::LoaderInfo/dispatchEvent()
    at
com.devaldi.streaming::ForcibleLoader/ioErrorHandler()[C:\Users\Erik\Documents\F
lex
Builder 3\FlexPaper\src\com\devaldi\streaming\ForcibleLoader.as:217]

Thanks & Regards,
-Darshan

Original issue reported on code.google.com by darshanm...@gmail.com on 27 Mar 2010 at 3:10

GoogleCodeExporter commented 8 years ago
why are you adding FlexPaper.swc to your debug-bin directory? Just add it as a 
library 
to your flex project and it should work fine (Right click your 
project->Properties-
>Flex Build Path->Library Path->Add SWC...)

Original comment by erik.eng...@gmail.com on 27 Mar 2010 at 8:32

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi Erik,

Have tried adding it to library path too. Adding FlexPaper.swc  directly to 
'lib' 
under project also adds the library path automatically. But that also doesn't 
help.
Its the same situation ... it freezes.

Can you please tell what environment you are using to test ? This surely sounds
like a nasty FlexBuilder3 problem and nothing to do with your component. But
I have tried all possible combinations and searches on the web but couldn't 
find a solution.

-darshan

Original comment by darshanm...@gmail.com on 27 Mar 2010 at 9:00

GoogleCodeExporter commented 8 years ago
I am using Flex Builder 3 Professional together with Flex SDK 3.2.0 on Windows 
Vista 
when debugging. 

The only thing I have done in terms of configuration is to set up support for 
the 
different languages supported in FlexPaper. You can do that by going to your 
bin 
directory in your SDK dir and execute the following command

C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\bin>copylocale.exe en_US fr_FR

for each language you want support. Try that and see if it makes any difference

Original comment by erik.eng...@gmail.com on 27 Mar 2010 at 9:07

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi Erik,

Tried copylocale.exe as suggested by you in the last msg. Still no luck.
It still freezes when I switch to design view. 

Has anyone else reported this FB3 behavior ? This is supposed to be pretty
basic stuff. FB3 freezing prevents me from doing anything further.

Just to recap, now the status is:
- FlexPaper.swc  is now under 'lib' folder of project 'p1'. When I copied
FlexPaper.swc  to 'lib', FB3 automatically updated 'build path libraries' and
I can see FlexPaper.swc under lib in the project properties. 

Also, do you have any pointers for the runtime error I mentioned in the
original post ? This error is still thrown when I run the application.
If I click on 'continue' in the runtime error window, I do see FlexPaper 
component
rendered in flash player but it loops forever for loading the SWF (Paper3.swf)
file. I have copied the SWF file in bin-debug as well as under 'lib', just in
case, while resolving this issue.

Thanks,
-Darshan

Original comment by darshanm...@gmail.com on 31 Mar 2010 at 3:14

GoogleCodeExporter commented 8 years ago
I have the same issue, even in the text mode, the flex builder freezes when I am
trying to include the FlexPaperViewer, I looked at the source code and deleted
components one by one, find out that GradientLabel causes this issue. Any idea?

Original comment by Space...@gmail.com on 1 Apr 2010 at 6:59

GoogleCodeExporter commented 8 years ago
Freezing issue resolved! Possible Workaround below:

Based on info provided about GradientLabel by Space.FD and issue FB-11252 
mentioned 
in the release notes of FB3
(http://www.adobe.com/support/documentation/en/flex/3/releasenotes_flex3_fb.html
#knownissues),
I found that following workaround
seems to resolve the freezing issue:

- In class GradientLabel.as (package com.devaldi.skinning) add following method 
which
just calls method of super class:

protected override function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void
{
    super.updateDisplayList(unscaledWidth, unscaledHeight);
}

Rebuild FlexPaper and copy fresh FlexPaper.swc in your 'lib' directory.

But the runtime error issue still remains. 

thanks.

-darshan

Original comment by darshanm...@gmail.com on 1 Apr 2010 at 8:25

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
runtime error issue also resolved.

It was related to the input SWF (SwfFile). Rebuilt SWF and now it loads fine.

It would help debugging runtime issues if original error (number/msg) 
is made available while printing the stack trace.

Thanks Erik and Space.FD for your help.

-Darshan

Original comment by darshanm...@gmail.com on 1 Apr 2010 at 11:05

GoogleCodeExporter commented 8 years ago
How do you open the class file 'GradientLabel.as' to actually edit it?

Original comment by abickh...@gmail.com on 2 Apr 2010 at 11:40

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
You need to download the source code of FlexPaper for changing files and
building. You can either use FlexBuilder (current version is 3) or just use SDK 
for
the dev environment.

The source code can be downloaded from the Google Code (click on Source tab at 
the
top of this page) and import it into FlexBuilder.

-darshan

Original comment by darshanm...@gmail.com on 2 Apr 2010 at 1:43

GoogleCodeExporter commented 8 years ago
I'm having a bit of trouble building the file in Flex, could you upload the 
ammended
file as a zip to this forum?

Original comment by abickh...@gmail.com on 5 Apr 2010 at 10:56

GoogleCodeExporter commented 8 years ago
abickhoff,

Can you post the errors you are getting while building flex ? 
I had faced errors related to locale which can be fixed by 
copylocale.exe as mentioned by Erik in the earlier post.

Uploading my current binary (FlexPaper.swc) may be an issue 
as I have added test codes to the source. I will have to create 
new project in FB3 for building the native SWC with changed 
GradientLabel.as. Pl let me know.

-darshan

Original comment by darshanm...@gmail.com on 6 Apr 2010 at 1:34

GoogleCodeExporter commented 8 years ago
Hey darshan,

Sorry for the long lul...been on holidays. I'm no expert on compiling so I 
haven't
the faintest idea how to compile/ make a swc file after I make the changes to
"GradientLabel.as".

If you could upload a native swc with the changes it would be much appreciated.

I'm actually quite surprised it hasn't been done in an official release yet :P

Original comment by abickh...@gmail.com on 4 May 2010 at 8:37

GoogleCodeExporter commented 8 years ago
Fixed in code repository. Fix will be available in next build.

Original comment by erik.eng...@gmail.com on 18 May 2010 at 3:39