Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://go.sap.com/community.html
Thank you,
The SAP Community team.
The SAP Community wiki will be closed to new content submissions from December 7 6:00 p.m. CET to December 11 6:00 p.m. CET.
All content created during this period will not be available/restorable after December 11.
We apologize for the inconvenience, but we need to take this action to improve and maintain the SAP Community wiki performance.
Please plan your tasks accordingly.
Skip to end of metadata
Go to start of metadata

Byte limits

There are 2 kinds of byte limits depending on operating system and Flex version.

32K Byte limit

Question: You receive a log message after deploying my application similar to this one:

Error in compiling Flex application:
Error: Branch between 8479 and 41869 around line 0 exceeds 32K span.
If possible, please refactor this component.
Failed to compile AAD8T3.mxml

Solution 1

This is the well known 32K limitation from Adobe Flex 1.x. The compiled applications are not allowed to be larger than 32K. That usually happens with larger models.

In order to solve this issue, you need to redesign your application and use nested iViews (basically splitting the model into multiple smaller models)

Solution 2

Multiple users have reported that one of the following activities also overcomes this problem:

  • Under Tools -> Options -> Compiler select and then unselect(!) (or simply unselect) the checkbox Add Flash debugging console, this error disappears.
  • Add one or multiple layers to your model and delete them
  • move objects on the storyboard

Analysis: it looks like Visual Composer sometimes piles up more model tags than necessary and periodically deletes them after an activity like described above. When you are close to the 32K limit, being slightly over or under seems to depend on your activity.

Solution 3

  1. Add an empty layer to the Main iView in the VC Model and make it invisible(!). Removing the layer again as described in the note doesn't help also I had problems deploying when the Layer was visible.
  2. Add a layer to every nested iView in the Model too.
  3. Please be sure to un-tick the glasses column for the layer.

More solutions

  1. Optimize each model to reduce the number of elements that it contains:
    • Reduce the number of signals by merging signals of the same name.
    • When your application updates forms with read-only fields, use expression boxes and a data store instead of signals.
    • Minimize the use of animations in your models, including form sliding and chart animation effects
    • Use a data store to store variables, instead of invisible forms. To display messages, use a simple text rather than a static dynamic expression.
  2. For on-the-spot, temporary workarounds, you can try dragging an empty layer onto the Design board. This sometimes solves the problem adhoc, but is not recommended as a best practice.

Final Solution

The Fix for this issue will be delivered within an enhancement package in February 2008. It comes with Flex 2.0 server which solves the 32k bug.

64K Byte limit

Question: While deploying the VC model , i m getting this error:

Error in compiling Flex application: Error: A function in the code exceeds the 64K byte limit (actual size = '65557'). Since the problem occurs in the compiler-generated deferred instantiation code, please refactor/componentize portions of this document.
(/usr/sap/NW2/JC00/j2ee/cluster/server0/GUIMachine_Business_Packages/Contribution_Margin_36461/FLEX_COMPILATION_FOLEDR/AAD15VY.mxml:19)
Failed to compile AAD15VY.mxml

Solution

The 64k problem refers to a single function or statement that is too long for the Flex compiler, be a bug or not. Unlike the 32k error, the message is a bit clearer. (...A function in the code exceeds the 64K byte limit... ).

Remove the longer statements from the model and the message will vanished.

Probably the part of the message:

...AAD15VY.mxml:19

gives a better information where the problem can be found in the XML-file.

References:

  • No labels