7 Replies Latest reply on Aug 22, 2011 10:52 AM by daperson0

    Intermittent (Seemingly time based) Error 2046.

    daperson0

      Hello. I'm a Linux user and I have started encountering a very odd problem relating to RSLs.

      I am making something using the Flex 4.5 SDK, and compiling it using ANT. A link to the thing in question is here:
      http://www.varagh.com/varaghftp/dev1/Games/Candidate1.swf

      Now, what will happen the majority of the time is the MochiAd will play, and then Flex will start doing it's thing, a login screen appears, and everything works fine. Sometimes - without me having recompiled the program, the program will cease to function as soon as the MochiAd finished (That is, as soon as Flex starts trying to do stuff). This error is printed to the terminal:

      Error #2046: The loaded file did not have a valid signature.
      Failed to load RSL http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/framework_4.5.1.21328.swz
      Failing over to RSL framework_4.5.1.21328.swz
      Warning: Ignoring 'secure' attribute in policy file from http://fpdownload.adobe.com/pub/swz/crossdomain.xml.  The 'secure' attribute is only permitted in HTTPS and socket policy files.  See http://www.adobe.com/go/strict_policy_files for details.
      Error #2046: The loaded file did not have a valid signature.

       

      At this point, it just displays a white screen, and right clicking shows "Movie not loaded..."

      This usually happens late at night. If I ignore it, when I wake up the following morning the problem no longer occurs. This problem does not seem to exist (At least at the same time as it does for me) for people using Windows - but others on Linux, when sent a link while it's happening to me, experience the same problem.

      I am using flash player version 10.3.183.5, apparently. The debug one. This problem exists seemingly irrespective of browser (Tested in FireFox, Chromium, and Konqueror).

       

      If I modify the compiler configuration to staticly link RSLs the problem does go away (But the compiled program is unacceptably large in filesize). If this problem cannot be resolved I guess I'll end up compiling a static and non static one, and offering a link to the static one for when the RSLs are being stupid. This does look quite a lot like a flash player bug, but I'm posting here first to check if I'm not doing anything enormously silly first. (But this seems unlikely since this problem happens and then goes away all by itsself without me actually changing the program).

       

      My ANT task:

      <target name="Main">
              <mxmlc file="${APP_ROOT}/Varagh/main.mxml" output="${OUT}/Candidate.swf" debug="true" incremental="false" static-rsls="false">
                  <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
                  <default-frame-rate>60</default-frame-rate>
                  <default-size width="800" height="598"/>
                  <default-background-color>0x712515</default-background-color>
                  <target-player>10.2</target-player>
                  <source-path path-element="${FLEX_HOME}/frameworks"/>
                  <source-path path-element="${APP_ROOT}"/>
                  <compiler.library-path dir="/home/chris/Flex/Flex3/ES5 Client/libs" append="true">
                      <include name="*"/>
                  </compiler.library-path>
              </mxmlc>
              </target>

       

      Upon compile, this prints:

      Required RSLs:
          http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/framework_4.5.1.21328.swz with 1 failover.
          http://fpdownload.adobe.com/pub/swz/tlf/2.0.0.232/textLayout_2.0.0.232.swz with 1 failover.
          http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/spark_4.5.1.21328.swz with 1 failover.
          http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/sparkskins_4.5.1.21328.swz with 1 failover.
          http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/mx_4.5.1.21328.swz with 1 failover.

       

      I have tried copying the RSL files to my server from the URLs shown there (And placing them in the same directory as the swf file). This doesn't seem to stop the problem from happening according to it's usual arbitrary schedule.

       

      Any ideas?

        • 1. Re: Intermittent (Seemingly time based) Error 2046.
          saisri2k2 Level 4

          I would merge the SWCs into the code and try, rather than loading them as RSL(I dont know how to do tha in the ant, we have it as an option in the FB under framework build path). Also, aren't those the framework Swc files rite? 

          • 2. Re: Intermittent (Seemingly time based) Error 2046.
            daperson0 Level 1

            Yes, that's right, those are the framework ones. I'm not using any custom RSLs. I was under the impression the Flex compiler automates management of the framework ones? (It certainly seems to).

            I'm not entirely sure what you mean - is your suggestion the same as specifying the static-rsls=true compiler option? This option staticly links the RSLs (Embedding them in your swf), and if I do this the program always works. The filesize also gets quite a lot bigger, and this is undesirable.

            The problem is that, when I don't do this, the filesize is smaller (Good), and it works perfectly most of the time - but at around 0200 it stops working (Without me recompiling the program - programs previously compiled by me in this way cease to work, when they did work earlier in the day). One obvious option is to go to bed at sane times and do my work at the same time of day as normal people, but this weirdness really shouldn't happen. How can this possibly be to do with time of day? It's as if Adobe are changing something on the RSL server which causes some weirdness at this late hour.

            • 3. Re: Intermittent (Seemingly time based) Error 2046.
              saisri2k2 Level 4

              Yeah, if loading them as RSLs are not working at 0200, then adobe is surely doing something at that point of time.My solution:move the framework libraries into your Libs folder and load them as RSLs, you dont have to depend on the adobe server, hopefully

              1 person found this helpful
              • 4. Re: Intermittent (Seemingly time based) Error 2046.
                daperson0 Level 1

                Okay, cool idea - this will probably fix my problem, but how on earth do I do this with ANT?

                 

                The best I can find by googling is this info for Flex 3 (Which might be out of date) explaining how to specify where to load the RSLs from using Flex Builder. For some insane reason Adobe haven't bothered to port Flex Builder to Linux - so how am I supposed to do this?

                http://livedocs.adobe.com/flex/3/html/help.html?content=rsl_09.html

                 

                (I'm using the Flex 4.5 SDK, by the way)

                • 5. Re: Intermittent (Seemingly time based) Error 2046.
                  daperson0 Level 1

                  Okay, after some looking around I came across this post:

                  http://www.fusioncube.net/index.php/flex-runtime-shared-library-path-solution

                  It turns out that there's no documented way of specifying the URL from which an RSL is to be loaded at runtime using the Flex ANT tasks, but you can cheat and use the ANT "exec" directive to invoke mxmlc and access all it's usual command line parameters. Messily.

                  So, my ANT build task now looks like this:

                   

                   

                  <property name="BASEDIR" value="/home/chris/Flex"/>

                       <property name="PROJDIR" value="${BASEDIR}/Flex3/ES5 Client"/>

                       <property name="FLEX_HOME" value="${BASEDIR}/SDK4.5"/>

                       <property name="RSL_HOME" value="${FLEX_HOME}/frameworks/libs"/>

                       <property name="LOCALE_HOME" value="${FLEX_HOME}/frameworks/locale/en_US"/>

                       <property name="SRCDIR" value="${PROJDIR}/src"/>

                       <property name="LIBRARY" value="${PROJDIR}/libs"/>

                       <property name="OUT" value="${PROJDIR}/out/production/Multiplayer Card Game"/>

                   

                  <target name="Main">

                            <exec dir="." executable="${FLEX_HOME}/bin/mxmlc">

                                 <arg value="${SRCDIR}/Varagh/main.mxml"/>

                                 <arg value="-source-path=${SRCDIR}"/>

                                 <arg value="-output=${OUT}/Candidate.swf"/>

                                 <arg value="-incremental=false"/>

                                 <arg value="-debug=true"/>

                                 <arg value="-target-player=10.3.183.5"/>

                                 <arg value="-default-frame-rate=60"/>

                                 <arg value="-locale=en_US"/>

                                 <arg value="-library-path+=${LIBRARY}/Electroserver5.swc"/>

                                 <arg value="-library-path+=${LIBRARY}/analytics.swc"/>

                                 <arg value="-runtime-shared-library-path=${RSL_HOME}/framework.swc,framework_4.5.1.21328.swz"/ >

                                 <arg value="-runtime-shared-library-path=${RSL_HOME}/textLayout.swc,textLayout_2.0.0.232.swz"/ >

                                 <arg value="-runtime-shared-library-path=${RSL_HOME}/spark.swc,spark_4.5.1.21328.swz"/>

                                 <arg value="-runtime-shared-library-path=${RSL_HOME}/sparkskins.swc,sparkskins_4.5.1.21328.swz "/>

                                 <arg value="-runtime-shared-library-path=${RSL_HOME}/mx/mx.swc,mx_4.5.1.21328.swz"/>

                            </exec>

                       </target>

                   

                   

                  Which compiles something that works, and it prints:

                   

                   

                  Required RSLs:

                      framework_4.5.1.21328.swz

                      textLayout_2.0.0.232.swz

                      spark_4.5.1.21328.swz

                      sparkskins_4.5.1.21328.swz

                      mx_4.5.1.21328.swz

                   

                   

                   

                  If I clear my RSL cache and don't put these RSLs in the same directory as the compiled file on my webserver then it doesn't work. So it seems to be working (It's now trying to load them from my server not Adobe's).

                  Hurrah! Hopefully this means it'll work all the time now, not just when Adobe choose for it to. Thank you!

                   

                   

                  EDIT: It appears the Adobe forums have mangled my quote there. Non-mangled ANT config:

                  http://pastebin.com/MLQK2hWj

                   

                  Message was edited by: daperson0

                  • 6. Re: Intermittent (Seemingly time based) Error 2046.
                    saisri2k2 Level 4

                    gr8! this is kinda good learning for me as well

                    • 7. Re: Intermittent (Seemingly time based) Error 2046.
                      daperson0 Level 1

                      AAAAAAAAAAAAAAAA

                       

                      It's come back! The file is being loaded from my server, and the problem has come back. Do the RSLs expire? Perhaps the problem is the  ones I previously downloaded from Adobe have now expired?

                      Any way to make them not expire? Perhaps a "DON'T GIVE ME ERROR 2046" compiler switch? Or perhaps Adobe would like to step in at some point and explain why they keep breaking their RSL system?