Use of EAP with Flex/Air

Hi,

Last week i tried to use the 90.94 EAP release to do some Flex/Air development on an enterprise project. First, i have to say, the actionscript/mxml editing features are superior to those available in Eclipse/FlexBuilder. No doubt about that.
Despite this i had to stop it because of the following reasons :

  • After some time in the IDE (10+ minutes..) it starts some code checking (mxml, as, java) in the background. You can recognize it by the small spinning wheel in the upper right corner of the project explorer window. Unfortunately, on my modest laptop this takes a rough 50% of my cpu and it makes further editing very difficult (the UI is just not responding immediately anymore, cursor does only appear after 5 seconds, characters don't follow as you type...) Most of the time i had to restart the IDE to get rid of this.
  • Debugging an AIR application gives serious problems. Sometimes the debugged application just hangs, I've the impression that something goes wrong in the communication between Idea and the AIR app. I've been debugging to check out where it went wrong but could not find the cause. One of the situations was a breakpoint on a 'dispatchEvent'. After the event was dispatched the IDE never came to the next line. Another one was a trace statement that never returned. Obviously this was a showstopper. In FlexBuilder this same application can be debugged without any problem.


I now solve the problem for me by combining IDEA 8.1.3 and Eclipse/FlexBuilder thereby using idea for all the coding stuff and FlexBuilder for the running/debugging.
Not an ideal situation but the best i can think of right now.

I hope you'll be able to solve this before releasing 9.

Roger.

18 comments
Comment actions Permalink
  • After some time in the IDE (10+ minutes..) it starts some code checking (mxml, as, java) in the background. You can recognize it by the small spinning wheel in the upper right corner of the project explorer window. Unfortunately, on my modest laptop this takes a rough 50% of my cpu and it makes further editing very difficult (the UI is just not responding immediately anymore, cursor does only appear after 5 seconds, characters don't follow as you type...) Most of the time i had to restart the IDE to get rid of this.


It's very easy to capture a CPU snapshot - it's the rightmost icon on
the application toolbar in EAP builds. A JIRA ticket with an attached
CPU snapshot greatly increases the chances for a fix.

0
Comment actions Permalink

Please, run IDEA with idea.is.internal property set and attach console
debugger trace in order to diagnose your debugger problem

Roger Laenen wrote:

Hi,

Last week i tried to use the 90.94 EAP release to do some Flex/Air development on an enterprise project. First, i have to say, the actionscript/mxml editing features are superior to those available in Eclipse/FlexBuilder. No doubt about that.
Despite this i had to stop it because of the following reasons :

  • Debugging an AIR application gives serious problems. Sometimes the debugged application just hangs, I've the impression that something goes wrong in the communication between Idea and the AIR app. I've been debugging to check out where it went wrong but could not find the cause. One of the situations was a breakpoint on a 'dispatchEvent'. After the event was dispatched the IDE never came to the next line. Another one was a trace statement that never returned. Obviously this was a showstopper. In FlexBuilder this same application can be debugged without any problem.



I now solve the problem for me by combining IDEA 8.1.3 and Eclipse/FlexBuilder thereby using idea for all the coding stuff and FlexBuilder for the running/debugging.
Not an ideal situation but the best i can think of right now.

I hope you'll be able to solve this before releasing 9.

Roger.

---
Original message URL: http://www.jetbrains.net/devnet/message/5247971#5247971



--
Best regards,
   Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Hi,

After I added idea.is.internal=true into the idea.properties file I've started the AIR app in debug mode.
After opening the main window it hangs (no contents is displayed in the window).

Only the following was logged to the console :

Adobe fdb (Flash Player Debugger) [build 3958]
Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
Waiting for Player to connect
[AIR Debug Launcher]: "Z:/Program Files/Adobe/Flex Builder 3 Plug-in/sdks/3.2.0\bin\adl.exe" -runtime "Z:/Program Files/Adobe/Flex Builder 3 Plug-in/sdks/3.2.0/runtimes/air/win" C:/temp/tasklist/core/desktop-portal/src/main/flex/DesktopPortal-app.xml C:\temp\tasklist\core\desktop\target\air\contents
Player connected; session starting.
[SWF] desktop-portal.swf - 3.852.893 bytes after decompression
[trace] warning: unable to bind to property 'globalDispatcher' on class 'com.ducroire.clientportal.mate::MainEventMap'
[trace] warning: unable to bind to property 'globalDispatcher' on class 'com.ducroire.credelnet.tasklist.maps::MainEventMap'
[trace] TypeError: Error #1034: Type Coercion failed: cannot convert Object@f0ce1c9 to com.ducroire.credelnet.remoteservices.domain.language.Language.
[trace] warning: unable to bind to property 'name' on class 'com.ducroire.credelnet.remoteservices.domain.taskflow::Priority'


Starting the same app without the debugger works fine. Starting the app in debug mode from eclipse works also fine.

Pls tell me if there is anything i can do to further investigate this issue.

regards,

Roger.

0
Comment actions Permalink

Hi,

Just out of curiosity. Is anybody investigating or going to investigate this issue at JetBrains ?
An application freeze while debugging an AIR app is not a minor thing IMO.

I'm willing to assist in this if there is anything i can do. Pls let me know.
Is there maybe another better suited channel to escalate this ?

grtz.

0
Comment actions Permalink

Hi Roger,

Is anything better with IDEA 9 Beta?
Are you able to run your application in Debug mode if no breakpoints set?

To help us to investigate please do please do following:

- remove old logs from [idea.system.path]/log/*.* (idea.system.path property is set in the file [IDEA installation]/bin/idea.properties)
- edit file [IDEA installation]/bin/log.xml and add following category there:

  <category name="com.intellij.lang.javascript.flex.debug">
    <priority value="DEBUG"/>
  </category>
...

- launch IDEA, reproduce debugged application hang.

After that please attach generated logs. Thank you.

0
Comment actions Permalink

Hi Alexander,

In attachment you can find the contents of the log directory after the debug-level has been activated.
The file idea.log is the situation where i still had some flex breakpoints set. After i noticed this, i disabled these breakpoints are restarted the air app, this is reflected in idea.log.1

What happens is that the app starts and shows the initial frame without any contents, and it hangs. In the debugger panel nothing is shown that indicates that he is waiting on a breakpoint. Only 'connected' is shown.

grtz,

Roger.



Attachment(s):
log.zip
0
Comment actions Permalink

Thank you for the logs. Unfortunately they do not contain anything wrong.
Logs show as if everything is ok:
- debugging startup (takes about 15 seconds)
- breakpoints are resolved
- looks like the debugged application is running. Some [trace] messages are printed
- In 3-4 minutes the debuging is stopped (probably by the 'Stop' button from Debug tool window)

How is the application hanging? I mean is the only problem is that nothing shown or the window is totally unresponsive (i.e. can't even be closed normally)

You say that there are no problems with running the application without debugging. Can you please manually try scenario that is rather similar to what IDEA does:
- Launch from command line <Flex SDK>/bin/fdb (fdb.exe on Windows)
- In fdb console type 'run' and press Enter
- Run your application from IDEA (non-debug mode)
- Look in fdb console. You'll be asked to type 'continue' few times (it's enought just to type 'c' and press Enter)

The question is: will the application be running normally after all? Fdb console content might be interesting, please attach it fully.

0
Comment actions Permalink

The application is hanging in the sense that nothing is shown in the main window.
It's just blank. I'm not sure if i can close it (will try this tomorrow together with the fdb stuff because today is a holiday here).
I effectively pressed the close button in the debugger window after a few minutes, normally the UI comes up in 15-20 seconds.

0
Comment actions Permalink

Hi Alexander,

I've started the app and closed it with the 'window close' button after 40 minutes (same problem as before).
Then I launched the app with fdb connected and everything worked well.
I've attached the fdb console log.

regards,

Roger.



Attachment(s):
fdb.log.zip
0
Comment actions Permalink

I'm confused, since everything seems to be going in the same way as using IDEA debugger... The only difference I see is that in fdb logs the last warning ('warning: unable to bind to property 'name' on class 'com.ducroire.credelnet.remoteservices.domain.taskflow::Priority') is shown 9 times, but in IDEA logs - only twice.

Are you using latest Beta (90.193)? If not - please try it and attach IDEA logs as few posts above (without breakpoints)
May be using latest official Flex SDK release (3.4.1) makes any difference?

One more thing I can imagine to investigate the issue is to 100% reproduce IDEA behaviour manually. I.e. launch fdb.exe and the application in the same way as before and type following commands in fdb console:
(fdb) run
[launch application]
you see [SWF] desktop-portal.swf and other stuff
(fdb) continue
Additional ActionScript code has been loaded...
(fdb) show files
Mega spam (1156 classes)....
(fdb) continue
[SWF] client-portal.swf
(fdb) show files
Mega spam (1178 classes)....
(fdb) continue
Additional ActionScript code has been loaded...
(fdb) show files
Mega spam (1282 classes)....
(fdb) continue
[trace] warning: unable to bind to property 'globalDispatcher' on class 'com.ducroire.clientportal.mate::MainEventMap'
[SWF] styles/ducroire.swf ...
[SWF] client-portal.swf ...
[SWF] Tasks.swf ...
(fdb) show files
Mega spam (1304 classes)....
(fdb) continue
Additional ActionScript code has been loaded...
(fdb) show files
Mega spam (1439 classes)....
(fdb) continue
[trace] warning: unable to bind to property 'globalDispatcher' on class 'com.ducroire.credelnet.tasklist.maps::MainEventMap'
[trace] warning: unable to bind to property 'name' on class 'com.ducroire.credelnet.remoteservices.domain.taskflow::Priority'
[trace] warning: unable to bind to property 'name' on class 'com.ducroire.credelnet.remoteservices.domain.taskflow::Priority'

that' s all IDEA does and sees. Any difference with manual debugging?

0
Comment actions Permalink

Hi,

I emulated IDEA debugging by manually entering the fdb commands.
Everything worked fine.
The log (partial, first part is missing but everything was ok there) is attached.

When the main screen loads it shows a datagrid with 9 rows, for each row the '[trace] warning: unable to bind to property 'name' on class 'com.ducroire.credel
net.remoteservices.domain.taskflow::Priority' is generated twice. That's why you see them 18 times in the log.
When using the IDEA debugger it shows (like you already noticed) this warning just 2 times, corresponding with 1 row of the grid.

It looks like something is suspended/waiting.... after the first row when the app is started from within IDEA in debug mode.

I'll see if i can further test with the latest EAP release and 3.4 sdk.



Attachment(s):
fdb2.zip
0
Comment actions Permalink

When debugged application is suspended/waiting - you can neither resise the window, nor close it normally. So the reason is some other. But I'm completely lost....
Is it possible to create some free of intellectual property project that reproduces the issue and attach here or send directly to me: adoroshko [@] swiftteams [.] com?

0
Comment actions Permalink

Hi Alexander;

Creating a free version that reproduces the problem will be no easy thing (if possible at all). The problem is that i currently don't have the time to even try it.
What i will try to do is upgrade to the latest flex/air version and the latest IDEA EAP release and see if the problem still exists.

I'll keep you informed with the results.

tx,

Roger.

0
Comment actions Permalink

All,

I am using 9.0 and get hangs when I use trace(). Some trace statements are being logged to the console window, then on the next one it hangs. I have a complex application with many trace() statements. I changed all trace() to a static Debug.message() with Alert.show(message) statement. This does not hang and produces correct output.

Any ideas?

Lewis

Message was edited by: Lewis Henderson to add log file.



Attachment(s):
flex hang idea.log.zip
0
Comment actions Permalink

The issue with AIR debug hanging is reproduced and filed as http://youtrack.jetbrains.net/issue/IDEADEV-42206.Will be fixed soon.

0
Comment actions Permalink

Great, pls let me know if a new build is available. I'll be glad to try it out asap (want to get rid of eclipse ).

0
Comment actions Permalink

oeps, forgot about this thread.

Just to confirm, Air debugging is working perfectly now ! Thx for fixing this.

0

Please sign in to leave a comment.