• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Air application not closing correctly

Guest
Mar 03, 2009 Mar 03, 2009

Copy link to clipboard

Copied

Hello,

I'm working on an AIR project for a client and I'm having a problem: some testers reported that after closing the application they can still see the application running in the task manager using about 50% of the cpu.

From what we where able to see, this problem is present only in Windows XP SP2. If the same application is run on XP SP3 or Mac the application exits as expected.

If the application is opened again, a new instance of the application is visible in the task manager. After closing it both the instances remain in the task manager.

We noticed also that this behavior happens only after the application starts loading data from a web server using a URLLoader. (so far the problem was reported if the application was closed after the request but before the reply of the server, but we are still looking into this)

We tried calling the Close method of the URLLoader before shutting down the application or calling explicitly the NativeApplication.nativeApplication.exit(), but this doesn't affect the outcome.

Can someone suggest a way for us to troubleshoot this?

Thank you very much
Andrea
TOPICS
Performance issues

Views

4.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 03, 2009 Mar 03, 2009

Copy link to clipboard

Copied

Could you file a bug at:
http://www.adobe.com/go/wish/
?
It would be very helpful if you can include a simple program that shows the problem.

Thanks,

ted

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Mar 04, 2009 Mar 04, 2009

Copy link to clipboard

Copied

I notice this in my own application quite often. After exiting, it sometimes takes upwards of 2 minutes before the system try icon will go away and its process is terminated. This even happens in ADL. Another weird thing with this is that sometimes just rolling the mouse over the system tray icon will remove it and terminate the process.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 05, 2009 Mar 05, 2009

Copy link to clipboard

Copied

Hello,

I've filed the bug. From our tests it appears URLLoader.close() is not really terminating the network load on XP SP2. On SP3 instead it's terminated immediately after calling the method.

After filing the bug is it possible to know if it has been accepted or rejected?

Thank you
Andrea Rincon Ray

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 05, 2009 Mar 05, 2009

Copy link to clipboard

Copied

Thanks for filing the bug.

The AIR bug database could not be seen from outside, not like the Flex bug database.

I will post here if I find out it is accepted or rejected.

-ted

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 01, 2009 Jun 01, 2009

Copy link to clipboard

Copied

Were there any further developments on this bug report? I am having the same issues, only from what I see it's also on XP Service Pack 3, and haven't really found any solutions.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2013 Feb 07, 2013

Copy link to clipboard

Copied

LATEST

Hi All,

Any updates on this ? i am facing same issue in Windows XP SP3 but this issue is not coming Windows 7 and 8, windows Server, MAC OS.

Please let me know if you have solution of this issue

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 01, 2009 Jun 01, 2009

Copy link to clipboard

Copied

I found out an another way to trigger this bug that does not terminate program correctly. Here a way to reproduce the bug:

Start an AIR application, let it load.

Go to your taskbar on the bottom of the screen and find you AIR application there.

Right click on that AIR application

Click Close

Open up your task manager and go to Processes

After you closed it as mentioned above, your AIR program is actually still running in the process list even tho it got closed. It should have been terminated but it never did due this bug.

I tested this bug on Window XP service pack 2 and Window Vista Service Pack 1. Both are affected.  I have not be able to test this on Mac OS X.

If you trigger this bug, your program wont be able to rerun again unless you reboot your computer or log off/log back in.

I have not report this bug yet.

No solution yet except tell the user not to right click -> close as mentioned above...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 01, 2009 Jun 01, 2009

Copy link to clipboard

Copied

I can't reproduce this problem.

-ted

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 01, 2009 Jun 01, 2009

Copy link to clipboard

Copied

What operating system are you running? In Window Vista service pack 2, it

doesn’t reproduce the bug anymore... Maybe same for XP service pack 3...The

test was based on Ajax made applications.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 02, 2009 Jun 02, 2009

Copy link to clipboard

Copied

I tried a SWF AIR app. on Vista.

I will take a look at a AJAX app.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 17, 2009 Jul 17, 2009

Copy link to clipboard

Copied

Use the following code to close the application properly.

        public function applicationExit():void
        {
            var exitingEvent:Event = new Event(Event.EXITING, false, true);
            NativeApplication.nativeApplication.dispatchEvent(exitingEvent);
            if (!exitingEvent.isDefaultPrevented()) {
                NativeApplication.nativeApplication.exit();
            }
        }

call this funciton by using the close event in <mx:WindowedApplication close="applicationExit()">


More details about this can be found here: http://help.adobe.com/en_US/AIR/1.1/devappshtml/WS5b3ccc516d4fbf351e63e3d118676a5d46-8000.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 17, 2011 Nov 17, 2011

Copy link to clipboard

Copied

Hi there, i had such problem too and the code given by coolkams didnt work for me.

Here is what i did :

First thing i want to know the the main app is activated:

NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, onAppactivation);

Then the callback function add a CLOSE event listener to the current active window wich is the main application window:

private function onAppactivation(e:Event):void

{

    NativeApplication.nativeApplication.removeEventListener(Event.ACTIVATE, onAppactivation);

    NativeApplication.nativeApplication.activeWindow.addEventListener(Event.CLOSE, applicationExit);

}

Finnaly in the CLOSE event callback function :

private function applicationExit(e:Event):void

{

    e.currentTarget.removeEventListener(Event.CLOSE, applicationExit);

     NativeApplication.nativeApplication.exit();

}

That did the trick for me, hope it will help other people too...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines