Debugging AIR: ADL fails to launch
Asked Answered
O

5

5

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.

Ot answered 6/9, 2011 at 22:38 Comment(4)
Did you restart your computer 3 times? :PObliquity
Did you try to make a clean rebuild of your project? Does it concern another projects?Arenicolous
@Arenicolous - Yes, it breaks all projects. Yes, I've tried clean builds.Ot
@Obliquity Yep. I even restarted the magical 7 times.Ot
O
6

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.

Ot answered 26/10, 2011 at 22:27 Comment(1)
Man... this saved me. adl kept failing with return code 138, and I couldn't find why.Beckham
S
2

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.

Sexdecillion answered 22/10, 2011 at 22:46 Comment(0)
G
1

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

Geronto answered 10/9, 2011 at 17:37 Comment(1)
Great suggestion, and I hadn't thought to try this! However, I tried, and it didn't work.Ot
B
1

I had the exact same issue. Tried everything above, and a few other items. What finally made it display was changing the command line arguments. Wow, who'da thunk it.

./adl -profile mobileDevice -screensize iPhoneRetina webapp/Main-app.xml

Black answered 23/7, 2013 at 17:53 Comment(0)
K
0

I have the same Problem, but in fdt not flash builder. It works when launching with -nodebug parameter, but not when debugging. It seems to have to do something with flex 4.5.1, because when compiling with flex 4, everything works as expected!

edit: it is fixed in the latest flex sdk 4.6.0

Kachine answered 26/9, 2011 at 18:55 Comment(2)
I have a similar problem but I get a "Bus error" and adl exits. -nodebug lets me run OK. I'm using flex 4.1.0 though.Ascendant
it is fixed in the latest flex sdk 4.6.0!Kachine

© 2022 - 2024 — McMap. All rights reserved.