Posts Tagged perforce

The Flex compiler doesn’t like the Unicode filetype for assets under Perforce

We’re using Perforce as our version control system. In one of our Flex – Java projects, our team recently encountered an unexpected issue with a couple of assets when compiling the Flex application on Windows machines.

A Flex developer working on a Mac commited a new asset in the assets folder and then referenced it in a MXML file. He compiled the application, tested, then committed the new code on the Perforce system. Soon after, our Hudson instance doing continuous integration on the project reported a build failure on the Flex application. The failure message was huge, as it seemed that the Flex compiler was not able to resolve any of the application assets. The error message was basically a list of assets reported as missing. Here’s an excerpt :


...
[java] D:\hudson_home\jobs\project\workspace\project-client\src\assets\stylesheets\common.css(144): Error: Invalid Embed directive in stylesheet - can't resolve source 'Embed(source = "/assets/chrome/BackgroundChrome.png", scaleGridLeft = "5", scaleGridTop = "5", scaleGridRight = "965", scaleGridBottom = "685")'.
[java] scaleGridLeft="5", scaleGridTop="5", scaleGridRight="965", scaleGridBottom="685");
[java] D:\hudson_home\jobs\project\workspace\project-client\src\assets\stylesheets\common.css(150): Error: Invalid Embed directive in stylesheet - can't resolve source 'Embed(source = "/assets/chrome/BackgroundBorderChrome.png", scaleGridLeft = "5", scaleGridTop = "5", scaleGridRight = "965", scaleGridBottom = "685")'.
[java] scaleGridLeft="5", scaleGridTop="5", scaleGridRight="965", scaleGridBottom="685");
...

It seemed like all of the assets were missing. I quickly checked the Perforce system and all of the assets were there. After taking a good look at the failure message, a specific part caught my attention :


Error: exception during transcoding: Failed to grab pixels for image D:\hudson_home\jobs\project\workspace\project-client\src\assets\icons\profil_icon.png

[java] [Embed(source="/assets/icons/profil_icon.png")]
[java] D:\hudson_home\jobs\project\workspace\project-client\src\com\project\user\presentation\view\renderers\UserListItemRenderer.mxml(16): Error: Unable to transcode /assets/icons/profil_icon.png.
[java] [Embed(source="/assets/icons/profil_icon.png")]

So one of the assets, a PNG file, was generating a different exception than the other resources. As I soon found out from this post, if one [Embed] directive is failing then all of the other [Embed] tags are reported as failing as well. So I just had to find out why the PNG resource was failing.

One thing caught my eye : the PNG file was marked in Perforce as of type Unicode, while the other resources were marked as binary, as it should have been. While this was just fine on Mac machines, on Windows machines this lead to the Flex compiler being unable to transcode the image. So what I had to do is simply change the Perforce filetype of that specific PNG file from Unicode to Binary. After doing this, the Flex compiler managed to finish its job properly and the build succeeded.

, ,

No Comments

downloadable adobe flash player 8 Buy SoundBooth CS4 adobe photoshop customer service adobe creative suite academic license Buy After Effects CS4 adobe photoshop for mac os torrent adobe illustrator web design library Buy Creative Suite 4 Master Collection copyright adobe photoshop 7 book adobe photoshop cs2 Buy Creative Suite 4 Web Premium adobe indesign cs2 torrent do not want adobe flash player Buy Dreamweaver CS3 adobe after effects cd adobe photoshop will not uninstall Buy Dreamweaver CS4 adobe photoshop elements 1.0 le release adobe photoshop and business cards Buy Adobe Fireworks CS4 adobe photoshop 7.0 serial code adobe flash programming tablet pen usage Buy Flash CS3 Professional adobe photoshop cs3 crack adobe after effects visually book Buy Flash CS4 Professional adobe premiere pro 1.5 crackz flash adobe occasion Buy Illustrator CS4 creating a city adobe after effects adobe premiere pack Buy InDesign CS3 adobe photoshop trial extension adobe premiere elements 2.0 export mov Buy InDesign CS4 adobe photoshop elements 2.0 driver update adobe photoshop style layer effects series Buy Photoshop CS3 Extended xp sp2 adobe flash problem download adobe after effects 6.5 pro Buy Premiere Pro CS4 adobe flash player8