Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Apache Flex 4.11.0, Apache Flex 4.12.1
-
None
-
None
-
Maven 3.0.5, flexmojos 7.0.0, windows and linux, jenkins and without jenkins
Description
Hi,
I'm having the same problem as described in [1].
When i compile our maven project, i get random errors like:
Cannot resolve attribute 'implements' for component type spark.components.BorderContainer.
It happens only with the biggest module we have, so it seems to correspond to project size.
It's not always for the same source file and eventually, the build will succeed.
I'm using flexmojos-7.0.0 and flex-sdk 4.12.1, but this happened before with earlier versions.
To investigate this further, i compiled and debugged my own version of mxmlc from the current apache flex sdk sources.
i was able to track down the error to the following code:
Line 54 in flex-sdk/modules/compiler/src/java/flex2/compiler/mxml/lang/AttributeHandler.java
"if (isSpecial(namespace, localPart))"
When localPart is "implements", this condition should return true.
And it does, most of the time. But sometimes, it doesn't.
This all leads to a "contains" check on the QNameSet "specialAttributes2009" in DocumentBuilder.java, which seems to occasionally return false even if an attribute exists in the Set.
Since this felt like a race condition, i replaced the optimized way QNameSet handles the contains-check and marked the method as synchronized.
The result is a mxmlc compiler, which doesn't have the error anymore.
However, i'm not sure this is the correct fix, since no other thread should modify the QNameSet...
So please take a look into this error and decide how to fix it.
Attachments
Attachments
Issue Links
- is related to
-
FLEX-23815 Compiler error with large project
- Closed