Well I updated my Flex Builder plugin from 3.0.1 to 3.0.2 looking to get all the goodness of AIR 1.5 and Flash Player 10. You might be thinking I'm a bit late on the scene with the update being out for about 3 months now but there appears to be a bug with the updater in Eclipse (See Matt Chotin's comment at 30 Jan). Anyhow I installed the update to find my AIR projects not doing anything when I run or debug them. Almost like they were crashing straight off the bat. I created a new AIR project to see if the updater had screwed my system but no the new AIR project worked fine. I then added the 3.0.1 SDK back in since 3.0.2 was the new default and set the project to use it I had no problems. This didn't sit right with me that my AIR projects couldn't use the updated SDK and AIR runtime. I had a look around and noticed the the XML config file for the AIR application was 1.0 I changed it to 1.5 and set the SDK to 3.0.2. The project ran and debugged fine now...
So what does this mean? If you change your SDK the Flex plugin does not update your AIR app config file to the correct version of AIR. Must admit I would expect if you complied an app with a previous version of the 3.0.* SDK that it would still run in the AIR 1.5 runtime. I think there is a little more to this story but I'll leave it here for the moment.
So it appears that changing your SDK version does not update your AIR config file so how to fix?
Change the second line in your myapp-app.xml file from:
<application xmlns="http://ns.adobe.com/air/application/1.0">
To:
<application xmlns="http://ns.adobe.com/air/application/1.5">
Showing posts with label AIR. Show all posts
Showing posts with label AIR. Show all posts
Sunday, February 1, 2009
Sunday, January 11, 2009
AIR String concatenation bug
Well the other day I was doing some file IO to tidy up some CSV files. I was trying to do this quickly and just was using a String to stored the data before writing it to file. I'm sure your thinking I should be using stream for this and I would agree with you. But at the time I didn't believe there would be an issue with the data size. Then I found my fairly simple AIR app crashing quite badly. OS X kill the app because of the following error.
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0
As you can see this is far from nice and most importantly this is a operating system error not a native AIR/AS3 error. So what is causing this fatal error? Well just concanate two large strings you will get this. I created a dummy programme to show the issue.
var myStr:String = new String("1");
for ( var i:int = 0; i < 100; i++) {
myStr = myStr + myStr;
}
On my machine it completed to the 29th loop before failing. So it could handle 2^29 but no larger.
Can you protect your app from this with a try/catch statement? No. This is a real pain in the neck. It's not like I'm writing the app in C/C++ where you can drive your app into the wall because you the developer are managing memory. With ActionScript I would expect the Flash player/runtime to return an error and not crash since it is managing memory.
I will add this as a bug or vote for this fix if it is already entered.
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0
As you can see this is far from nice and most importantly this is a operating system error not a native AIR/AS3 error. So what is causing this fatal error? Well just concanate two large strings you will get this. I created a dummy programme to show the issue.
var myStr:String = new String("1");
for ( var i:int = 0; i < 100; i++) {
myStr = myStr + myStr;
}
On my machine it completed to the 29th loop before failing. So it could handle 2^29 but no larger.
Can you protect your app from this with a try/catch statement? No. This is a real pain in the neck. It's not like I'm writing the app in C/C++ where you can drive your app into the wall because you the developer are managing memory. With ActionScript I would expect the Flash player/runtime to return an error and not crash since it is managing memory.
I will add this as a bug or vote for this fix if it is already entered.
Monday, November 3, 2008
New Flex 3 certification
Well looks like the Adobe certification people have come out with a Flex 3 with AIR certification which is the successor to Flex 2 exam. Interesting to see that they have coupled it will AIR so for those looking for an AIR certification will have to wait. I don't know of many HTML/Javascript developers working in the AIR space but it would nice to have something for them. But saying this Flex 3 and AIR 1.0 are closely tied products both having the same release date earlier this year. It will be interesting to see if Flex 4/Gumbo and AIR 2.o futures will continue to be close.
The big difference I noticed in the exam outline was that AIR has pushed back on most on the data services questions which is down to 16% from 25%. From the scores I have heard about data services usually ranked the lowest average out of the 4 sections in the Flex 2 exams. I imagine this change will now increase scores in the Flex 3 with AIR exam.
The big difference I noticed in the exam outline was that AIR has pushed back on most on the data services questions which is down to 16% from 25%. From the scores I have heard about data services usually ranked the lowest average out of the 4 sections in the Flex 2 exams. I imagine this change will now increase scores in the Flex 3 with AIR exam.
Thursday, July 3, 2008
Developing Secure AIR Applications
It would have been great to go to the onAir tour around Europe but can't go to all Adobe events. Though it is great to see that some of the events where recorded and are now available to everyone who couldn't attend. Go on ya Adobe for sharing this content because it is very useful!
I recently watched Ethan Malasky presentation on Developing Secure AIR Applications which goes over the security issues well, particular the issues around code injection attacks. Often security is an after thought but this gives you clarity on how this relates in an AIR environment. AIR gives the developer a lot of power and with that power comes responsibility. If you spend 30 mins watching this presentation you will come out with understanding of what you need to watch out for when developing your AIR application.
Also it was interesting to hear that Adobe are looking at code signing so that you be assured that the foreign you are running is actually that code and is not compromised.
I recently watched Ethan Malasky presentation on Developing Secure AIR Applications which goes over the security issues well, particular the issues around code injection attacks. Often security is an after thought but this gives you clarity on how this relates in an AIR environment. AIR gives the developer a lot of power and with that power comes responsibility. If you spend 30 mins watching this presentation you will come out with understanding of what you need to watch out for when developing your AIR application.
Also it was interesting to hear that Adobe are looking at code signing so that you be assured that the foreign you are running is actually that code and is not compromised.
Tuesday, February 26, 2008
Flex 3 & AIR is here
Well just come back form a cool user group meeting on the Flex 3 & AIR launch. I got a bag full of goodies which went down well with an Epic Beer.
I'm going to do the next presentation for NZFXUG meeting on Flex and the Flash Media Server. Hopefully Adobe have changed the trial version of FMS to 3 instead of 2. So in the meeting people will see the new version of FMS.
Well I'm just downloading the release version of Flex 3 & AIR. Will let you know how the release candidates go.
I'm going to do the next presentation for NZFXUG meeting on Flex and the Flash Media Server. Hopefully Adobe have changed the trial version of FMS to 3 instead of 2. So in the meeting people will see the new version of FMS.
Well I'm just downloading the release version of Flex 3 & AIR. Will let you know how the release candidates go.
Subscribe to:
Posts (Atom)