AddSubmenuAt crashes the AIR app

...when attached to the system tray icon. If I add the menu, then click the tray icon, the app crashes. Check out the attached code. Looks like there's a workaround in that you can addSubmenu, then build menuitems after that. AIR v 1.5.0.7220 (Flash authoring) and 1.5.2.8900 (AIR SDK), Win XP.
code for a blank FLA frame 1 with simple button intance bb on the stage:
var ar:Array = new Array();
var bmp:BitmapData = new BitmapData(26, 26, false, 0x88FF0099);
ar[0] = bmp;
NativeApplication.nativeApplication.icon.bitmaps = ar;
var men:NativeMenu = new NativeMenu();
men.addItem(new NativeMenuItem("test1", false));
men.addItem(new NativeMenuItem("test2", false));
var sub:NativeMenu = new NativeMenu();
//men.addSubmenuAt(sub, 1, "subber"); // fail
//men.addSubmenuAt(sub, 0, "subber"); // fail
//men.addSubmenuAt(sub, men.numItems, "subber"); // good
men.addSubmenu(sub, "subber");
men.addItem(new NativeMenuItem("aftersub", false));
//men.addSubmenu(sub, "subber"); // good
this.setTrayMenu(men);
this.bb.addEventListener(MouseEvent.CLICK, this.onbb);
function setTrayMenu(mm:NativeMenu)
if (NativeApplication.supportsSystemTrayIcon)
  if (NativeApplication.nativeApplication.icon.bitmaps.length)
   var sys:SystemTrayIcon = NativeApplication.nativeApplication.icon as SystemTrayIcon;
   if (sys != null)
    sys.menu = mm;
function onbb(e:Event)
sub.addItem(new NativeMenuItem("sub1", false));
sub.addItem(new NativeMenuItem("sub2", false));

Air ow flash player for that matter won't detect camera added at runtime. It will detect if you remove the camera while you were capturing images from the camera. You can try to scan for camera suing a timer and see if it detects it then.
There is also a not so documented flash.media.scanHardware() method, which should force a hardware scan. I did not used it yet so can't vouch for it.

Similar Messages

  • Received e-mail in Chinese character which I can't delete. It's crashing the mail app. What to do?

    Received e-mail in Chinese character which I can't delete. It's crashing the mail app. What to do?

    In addition to deleting the errant email from the email provider's web page (using a PC):
    1. Close the Mail app from Multitasking: Double-tap the Home button which will bring up the running apps icons (Multitasking) along with an app screenshot "card" above the icon. Tap-drag the icons left/right to find the particular app. Tap-drag the app's "card" (NOT the icon) up and off the screen.
    2. Wait about 30 seconds
    3. Reset the device:
    Device Reset (won't affect settings/data/music/apps/etc)
    1. Press and hold (& continue to hold) BOTH the Sleep/Wake button & the Home button.
    2. Continue to hold BOTH (ignoring any other messages that may show) until you see the Apple logo on the screen.
    3. Release BOTH buttons when you see the Apple logo and allow the device to boot normally.

  • The air app cannot detect the new added camera

    i made a desktop air-app. the problem is when i unpluged my usb camera and start the air app . the app detect the existed cameras with Camera.names.length = 2; and then i pluged another usb camera and use the Camera.names.length to detect the new camera, but the result is still 2 , not the 2 existed camera with the new added one which the total is 3. then i close the air-app and start it again ,this time the camera.names.length is 3. why ? the air-app just cannot detect the new added camera? the only way the air-app can detect the new added camera is restart the app?

    Air ow flash player for that matter won't detect camera added at runtime. It will detect if you remove the camera while you were capturing images from the camera. You can try to scan for camera suing a timer and see if it detects it then.
    There is also a not so documented flash.media.scanHardware() method, which should force a hardware scan. I did not used it yet so can't vouch for it.

  • Ipad 1 crashes the music app

    need help with my ipad 1 which all of a sudden crashes the music app (that comes with it) as soon as i try to open it

    Hi adossantos,
    Is your iPad software up to date (settings --> general --> software update)? Also, when did you last sync and backup your iPad with your iTunes on your computer? Make sure you do this as it may sort it out, and will allow you to backup your iPad incase you need to restore it. This is prusiming you use a computer, if not, make sure you back up everything via iCloud.
    Hope you manage to solve this problem,
    iAnima.

  • Having trouble with the Air/app crashing after 3 or so hours on Win 7.

    Heya.
    I have been battling with this issue for a few days now, trying to debug what might be the root cause. The application is a reaction game with organic creatures and movement via Bezier Splines and some physics. It uses some really intense calculations while the game is running. Anyhow, the game is being ran on a dedicated machine with Win 7 and AIR installed. It should be able to function about 13-16hours in a row, since it is a part of a science centers show, and it should be touring europe in the near future as well. Needless to say having the app crash every few hours isn't really an option.
    So, after about 3 hours (checking from Win 7 error log) Windows notifies me that the application has stopped working and it just freezes the whole thing. I've been running it over nights to see when this error happens, and it seems to happen pretty consistently after around 3-4 hours of runtime with constant games. (having the game play itself)
    This is what Windows error log says
    Faulting application name: APPLICATIONNAME.exe, version: 0.0.0.0, time stamp: 0x4b66b0f3
    Faulting module name: Adobe AIR.dll, version: 1.5.3.9130, time stamp: 0x4b66b06a
    Exception code: 0xc0000005
    Fault offset: 0x00256e29
    Faulting process id: 0xaf8
    Faulting application start time: 0x01cae2f060312579
    Faulting application path: C:\Users\Muffinssi\Desktop\APPLICATIONNAME.exe
    Faulting module path: C:\Program Files (x86)\Common Files\Adobe AIR\Versions\1.0\Adobe AIR.dll
    Report Id: 2b358e12-4efb-11df-84f7-64b9e8d85ac7
    Now from what I've tested from extended running of the game by itself, it doesn't leak memory, and it doesn't seem to throw any Flash based error at all. I set the Debug flag on the installed AIR app, and checked the trace log for any errors, there were none. Also no flash/air specific modal window about an error, only the Win 7 error about it stopped working.
    I am at a loss here, what could be causing this error? Any ideas on how to fix this? I would really appreciate it!
    Cheers
    Niilo

    If you get any form of strange behaviour from your BB then, with the power-on, remove the battery and leave it out for a couple of minutes.
    If that doesn't sort the problem then post again or use the search facility above.
    Blackberry Best Advice - Back-up weekly
    If I have helped you please check the "Kudos" star on the right >>>>

  • Native extension to unzip a file crash my air app

    Hello,
    I have a problem with a native extension for android
    I want to unzip a file
    my java code
    File f = new File("my zip file");
    File outputDir = new File ("output folder");
    ZipHelper.unzip(f, outputDir);
    and
    import java.util.zip.*;
    import java.io.*;
    import java.util.Enumeration;
    import org.apache.commons.io.IOUtils;
    import android.util.Log;
    public class ZipHelper
    static public void unzip(File archive, File outputDir)
    try {
    Log.d("control","ZipHelper.unzip() - File: " + archive.getPath());
    ZipFile zipfile = new ZipFile(archive);
    for (Enumeration e = zipfile.entries(); e.hasMoreElements(); ) {
    ZipEntry entry = (ZipEntry) e.nextElement();
    unzipEntry(zipfile, entry, outputDir);
    catch (Exception e) {
    Log.d("control","ZipHelper.unzip() - Error extracting file " + archive+": "+ e);
    static private void unzipEntry(ZipFile zipfile, ZipEntry entry, File outputDir) throws IOException
    if (entry.isDirectory()) {
    createDirectory(new File(outputDir, entry.getName()));
    return;
    File outputFile = new File(outputDir, entry.getName());
    if (!outputFile.getParentFile().exists()){
    createDirectory(outputFile.getParentFile());
    Log.d("control","ZipHelper.unzipEntry() - Extracting: " + entry);
    BufferedInputStream inputStream = new BufferedInputStream(zipfile.getInputStream(entry));
    BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(outputFile));
    try {
    IOUtils.copy(inputStream, outputStream);
    catch (Exception e) {
    Log.d("control","ZipHelper.unzipEntry() - Error: " + e);
    finally {
    outputStream.close();
    inputStream.close();
    static private void createDirectory(File dir)
    Log.d("control","ZipHelper.createDir() - Creating directory: "+dir.getName());
    if (!dir.exists()){
    if(!dir.mkdirs()) throw new RuntimeException("Can't create directory "+dir);
    else Log.d("control","ZipHelper.createDir() - Exists directory: "+dir.getName());
    i copy the file commons-io-2.4.jar (I get at http://commons.apache.org/proper/commons-io/download_io.cgi) in the lib folder of eclipse.
    in a native android app, this code work fine
    in a native extension for air, my air app crash
    LogCat in eclipse return
    NoClassDefFoundError: org.apache.comons.io.IOUtils.copy
    IOUtils class is not in commons-io-2.4.jar ???
    thanks

    Hello,
    I have a problem with a native extension for android
    I want to unzip a file
    my java code
    File f = new File("my zip file");
    File outputDir = new File ("output folder");
    ZipHelper.unzip(f, outputDir);
    and
    import java.util.zip.*;
    import java.io.*;
    import java.util.Enumeration;
    import org.apache.commons.io.IOUtils;
    import android.util.Log;
    public class ZipHelper
    static public void unzip(File archive, File outputDir)
    try {
    Log.d("control","ZipHelper.unzip() - File: " + archive.getPath());
    ZipFile zipfile = new ZipFile(archive);
    for (Enumeration e = zipfile.entries(); e.hasMoreElements(); ) {
    ZipEntry entry = (ZipEntry) e.nextElement();
    unzipEntry(zipfile, entry, outputDir);
    catch (Exception e) {
    Log.d("control","ZipHelper.unzip() - Error extracting file " + archive+": "+ e);
    static private void unzipEntry(ZipFile zipfile, ZipEntry entry, File outputDir) throws IOException
    if (entry.isDirectory()) {
    createDirectory(new File(outputDir, entry.getName()));
    return;
    File outputFile = new File(outputDir, entry.getName());
    if (!outputFile.getParentFile().exists()){
    createDirectory(outputFile.getParentFile());
    Log.d("control","ZipHelper.unzipEntry() - Extracting: " + entry);
    BufferedInputStream inputStream = new BufferedInputStream(zipfile.getInputStream(entry));
    BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(outputFile));
    try {
    IOUtils.copy(inputStream, outputStream);
    catch (Exception e) {
    Log.d("control","ZipHelper.unzipEntry() - Error: " + e);
    finally {
    outputStream.close();
    inputStream.close();
    static private void createDirectory(File dir)
    Log.d("control","ZipHelper.createDir() - Creating directory: "+dir.getName());
    if (!dir.exists()){
    if(!dir.mkdirs()) throw new RuntimeException("Can't create directory "+dir);
    else Log.d("control","ZipHelper.createDir() - Exists directory: "+dir.getName());
    i copy the file commons-io-2.4.jar (I get at http://commons.apache.org/proper/commons-io/download_io.cgi) in the lib folder of eclipse.
    in a native android app, this code work fine
    in a native extension for air, my air app crash
    LogCat in eclipse return
    NoClassDefFoundError: org.apache.comons.io.IOUtils.copy
    IOUtils class is not in commons-io-2.4.jar ???
    thanks

  • Symbolicating Crashes in AIR App

    Hi,
    We recently created a game in Adobe AIR app for three platforms (ios, android & fb) & it is in Live in App Store. But we are seeing quite a few app crashes in Crittercism. By crash I mean app crash not the flash stack traces as mentioned in
    http://forums.adobe.com/message/5286130#5286130
    We did not find any docs , tutorial on how to symbolicate these crashes. We tried the steps as mentioned in the link
    http://stackoverflow.com/questions/1460892/symbolicating-iphone-app-crash-reports
    But it did not help.
    We have also gone through the link
    http://blogs.adobe.com/rajorshi/2011/11/18/debugging-native-extensions -for-air-ios/
    This will not help in our case as it only talks about setting up live debugging which is not helpful in our case. Can you please point us to some ways of making some sense of those crash reports? This is a major concern for us.
    Hoping to get some quick response.

    Did anyone figure this out?

  • Whether the AIR app support create some formats of rich media (besides html5) and share to others within the app?

    I want to develop an app that have some features like
    user can create animation content in some public or  proprietary format
    user can share the content to others within the app
    HTML5 is a choice but not the best for performance reason
    May I use AIR  or any other suggestions? thanks a lot!

    I think the real reason they choose INDesign is because it a first a layout tool. Which is what magazine's use for the content. They know the this is where the distribution sector is. You get the Magazine corporations to adopt it, then you add the Multimedia capabilities that provides these same corporations the ability to use their existing layouts as a base then build the interactivity from there.
    My issue is that I can't be the only one who saw this need arising. A tool that incorporates layout, multimedia and publishing to various platforms which has power and ease of use is so badly needed. I am amazed that Apple did not partner with someone, especially Adobe to create a tool of this nature.
    Creating great applications, apps, and multimedia documents in my opionion should not be developed only by those with great technical skill. Anyone who can conceive of an idea, has good knowledge of Adobe and Apple Professional tools should be able to easily create apps and multimedia documents. Yet no one has developed a good WYSIWG tool. You still need so much coding to get anything done.
    All I can say is... the labs division said that September was the release date for the tools they used for the Wired App. So where are they?

  • I have been unable to view the content of any messages since installing OS X Mavericks.  I can send and receive mail, but viewing message content crashes the mail app.

    Need assistance accessing mail message content.  Message display in inbox, but content cannot be viewed.  I have attempted reindexing without success.  Send, compose and receive all work fine.  When opening content of message, the mail app crashes.

    Mail: Troubleshooting sending & receiving email messages

  • Renaming the air app

    Hi,
    We are building the default installer for installing our Air application. After many installs and version upgrades, we want to change the application name which means changing the <filename> attribute in the descriptor file. We would like the installer to un-install the version of the app with the old name. I haven't found a way to do this. Is it possible to do without a custom installer? I wish there was an <oldfilename> field I could set
    Claire

    I believe (and you should double check this) that so long as you leave the <id> and <publisherID> tags the same, the new app should be recognized as an update to the old one and install over it. In that case it will still be in the old install location, though. I don't think there's any way to move the install location of your app without using a custom installer to uninstall the old one
    Why do you need to do this anyway? There's also a <name> tag that will let you call your app whatever you want. <filename> is only used for install location and a few other things mostly invisible to the user

  • Detecting if the Air App is already running when clicking on start shortcut

    I have a question . Is it possible when starting up an air application to get  info if this Application is already opened  ? And if it is posssible how can I send notification or any kind of invocation to that opened application about that the user tried to start up the application . In my scenario I have got the Application that will run most time in minimized mode ,so it will happen that the user ,after some time , will not pay attention that the Application is already opend and will try to start it again . I want that when he attempts to do so the minimized  Application will reopen .
    Any Advice will be very appreciated !!!!
    Michael

    AIR app can register for Invoke event. This event is dispatched when the app is started initially . Also, when you try to start an already running app, the running app would get an invoke event, indicating that the app was tried to be started again. You can use this to achive the functionality you desire.

  • How to compile the AIR app to android emulator

    How to compile the AIR application to run on emulator ?
    May be use the 'adb' command line ?

    -target The type of package to create. The supported package types are:
    air — an AIR package. “air” is the default value and the -target flag does not need to be specified when creating AIR or AIRI files.
    airn — a native application package for devices in the extended television profile.
    native — a native desktop installer. The type of file produced is the native installation format of the operating system on which the command is run:
    EXE — Windows
    DMG — Mac
    DEB — Ubuntu Linux
    RPM — Fedora or OpenSuse Linux
    apk — an Android package. A package produced with this target can only be installed on an Android device, not an emulator.
    apk-debug — an Android package with extra debugging information. (The SWF files in the application must also be compiled with debugging support.)
    apk-emulator — an Android package for use on an emulator without debugging support. (Use the apk-debug target to permit debugging on both emulators and devices.)
    Use the value as per your need. The you can use adb to push the packaged apk to your emulator.

  • I updated the Facebook app now it crashes every time it open it rebooted and tried again to open facebook and it opens then crashes the Facebook app after the update don't work now

    I updated my Facebook application thru iTunes update system,once I did this and it finished the update I tried to log onto Facebook it opens then closes .. I rebooted my iPad and tried to open facebook again and it still did the same thing. What can I do ???? I don't want to reinstall it I'm scared it will wipe out all the game levels I'm at.

    Do a search on the site and you will find many posts.
    I deleted the FB app, power cycled the device (home and reset button until Apple logo appears), then reinstalled the app. Worked for me.

  • Install AIR app + native app simultaneously

    Hi everyone,
    I'm developing an Adobe AIR app but since AIR doesn't provide
    all the functionality that I need, I'm also developing a native app
    that does some system-level stuff and writes a XML file that then
    the AIR app reads. Since I want this to be as painless as possible
    for the end user, I'd like to make an installar that:
    - Installs the native app and sets it to autorun when the
    system starts (it's a background app).
    - Installs the AIR app, detect Flash version, etc (launch
    the Badge?)
    I think I'd need a separate installer solution for each OS
    (Windows and Mac) that, after installing the native app and adding
    it to the autorun list of the OS, launches the .air so that the
    badges continues with the installation.
    I don't really know if what I want to accomplish is doable at
    all, so any hints or links that may help me would be really
    appreciated.
    Best regards,
    Manuel F. Lara

    Hi Daniel,
    Could you post or send me ([email protected]) the entire crash log?  I'll at least need the binaries section so I can properly symbolicate the log.
    Thanks,
    Chris

  • API key compromised on AIR app?

    I have made a small AIR app using kuler (and my API key).
    (this is what it's like:
    http://www.locus-delicti.com/test/kuler_colors/)
    I was about to publish it at my website but i just thought
    that this app includes my API key in the code and that probably it
    would be compromised. Is that so? Does it even matter if it is?
    (worst case it will be banner, right?)
    Thanks,
    Mitsos

    Hi Chris,
    Thanks a lot for your reponse. I tried the thing you suggested, but strangely no folder by that name (in the other thread you linked) existed, before or after the app crashed. I tried a few other things, like running the AIR app through the ADL, to see if that would produce the error log you were describing.
    I got an error when using the ADL, 'initial content not found'. I thought maybe some of the assets weren't being loaded correctly, so I went through and put in loads of logging, using the SOS Max Logger. Whilst doing this, I decided to remove a trace() statement I had, or rather change it so it used the logger. This is what I changed:
    From this:
    trace("Load Progress: " + event.target.progress);
    To this:
    logger.debug("Load Progress: " + event.target.progress);
    The event is a LoaderEvent, from the LoaderMax lib. After this change, the app worked after installation. I had to then back-track through all my changes to see what caused it, and found that this was it.
    I'm a bit dumbfounded as to why this caused the problem. I still have other trace() statements in there, that cause no problems at all. Seemingly it's having the event.target.progress thing in there that makes the difference.
    Anyway, thanks for your help Chris.

Maybe you are looking for

  • How to use a radio button in enabling/disabling a text box in report progra

    Hi,     Could any please let me know, how to use a radio button in enabling/disabling a text box in report program.

  • Why are my email alerts not being sent?

    My SP 2010 server is also the SMTP server and it works.  I can drop the email.txt file in the pickfolder and that gets squirted out as expected, and successfully received at the other end. But I simply can't get email alerts from sharepoint to work.

  • Using XML Export to create dynamic Spry data sets

    I'm following this tutorial http://www.adobe.com/devnet/dreamweaver/articles/spry_xml_export_03.html And the final output is like this http://www.adobe.com/devnet/dreamweaver/articles/spry_xml_export/fig04.gif mine just looks like this http://76.163.

  • Why does Premiere Pro stop, or drop frames when using the Timecode Effect.

    The Timecode Effect is gpu accelerated, the render bar is yellow and it still drops frames. If it drops frames on a yellow bar, how can I ever trust it to print to tape? It wouldn't be a problem if I could say render the yellow sections of my edit, b

  • Iphoto crashes during import from drive.

    I have a new macbook air with iphoto 9.1.5.  I've imported pictures directly from an sd card out of my camera and it works fine.  I transferred all my old pictures onto the computer, but every time I try to import them into iphoto, it unexpectedly qu