Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging AIR: ADL fails to launch

I've hit a snag when trying to debug an AIR app using adl.

Although adl successfully launches, the application never appears on screen / starts up.

eg:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx"
                       width="400" height="400"
                       preinitialize="trace('hello')">
    <s:Label text="Hello, world" />
</s:WindowedApplication>

When launching this, the trace is never executed, and the application never appears on-screen.

Other points of interest:

  • The adl debugger does start (ie., I see it's icon in my dock)
  • I've tried this with adt from AIR 2.6 and AIR 2.7
  • This used to work on my machine, and has suddenly stopped (see below)
  • It makes no difference if I launch from Flash Builder, or by invoking the adt command line directly
  • I'm on a mac, running OSX 10.6.7
  • After this stopped working, I tried installing the FB 4.5.1 upgrade patch, in the hope that this would also update any local framework / SDK files to the latest version. This had no effect.

As I mentioned above, This used to work fine, and appears to have stopped.

Around the time that things stopped working, I was doing debugging on another app, which involved installing a firewall to block specific ports. I suspect it may be related to this.

However, I've since uninstalled all firewalls, and it still doesn't work. I'm not sure which port adt uses, but I don't see it attempting to connect when running lsof -i -n -P.

Any suggestions?

Update: I've also since uninstalled and reinstalled Flash Builder (and therefore, the AIR SDK), and it still doesn't work. I think this adds weight to the port conflict, but still leaves me unsure of where / how to proceed

Further update Compiling exactly the same codebase to a AIR installer, installing, and running the application works fine. (Ie., a production release). However, the codebase fails to launch with adl. This pretty much confirms the issue as a local machine config problem somewhere with adl, and not an issue with the codebase.

like image 432
Marty Pitt Avatar asked Sep 06 '11 22:09

Marty Pitt


3 Answers

I have finally (7 weeks later) solved this problem.

In my mm.cfg file, the following line had been placed there by a Firefox extension:

PreloadSWF=/Users/martypitt/Library/Application Support/Firefox/Profiles/vxtpdg3i.default/extensions/[email protected]/chrome/content/flashfirebug/flashfirebug.swf

Deleting this made things work again.

like image 91
Marty Pitt Avatar answered Oct 25 '22 09:10

Marty Pitt


I had a similar issue when debugging which was resolved by changing the encode settings from utf-8 to iso-8859-1 in the Debug Configuration Panel -> Common tab.

like image 41
mRader Avatar answered Oct 25 '22 10:10

mRader


since it still doesn't work after you've uninstalled and reinstalled, the only thing that make sense to me is that the ADL preferences file is what is persisting the issue. this preference file doesn't get uninstalled when uninstalling Flash Builder as it's not apart of Flash Builder. i would try deleting the preference file and then restarting Flash Builder.

on Mac OS X, you can find the preference file here:

Marty Pitt > Library > Preferences > com.adobe.air.ADL.plist

like image 41
Chunky Chunk Avatar answered Oct 25 '22 09:10

Chunky Chunk