0 Replies Latest reply on Jun 1, 2009 7:33 AM by provri

    Ajax Requests that Hang Cause Application to not Exit Properly

    provri

      Hi, all,

       

      We are using Adobe AIR with Ext-JS and jQuery and was having problems where sometimes if we tried to exit the application, whether by using air.NativeApplication.nativeApplication.exit() or closing the window while autoExit is on, the application process continues to run without any windows open.

       

      In summary, this is how we've been able to reproduce the problem:

       

      1.) Application opens

      2.) Application calls a slow http server via AJAX

      3.) While the AJAX connection is still waiting for response, application shuts down.

      4.) Windows close, application *looks* fully closed, but in fact there is still a process in the task manager.

       

      We've confined the issue to raw XMLHttpRequests, so it's not any Ajax framework or anything that is causing this hanging. If you run the application in ADL, we see that the terminal window remains open, and as far as I can tell, it will remain open until you explicitly close it, at which point Windows will inform you that either the app has crashed or is not responding.

       

      Does anyone have any ideas? I've tried aborting the connection on an exiting event, and that doesn't even work. I'll appreciate any help in the matter. What makes this a show-stopper issue is the fact that if you try to launch the application again, it will try to access files that are "in use" by the phantom process, and the application will not load.