2 Replies Latest reply: Apr 9, 2012 10:36 AM by flextnet RSS

    Possible problem with NativeProcess in AIR 3.2

    flextnet Community Member

      Hi

       

      This problem just appeared a few days ago in our app and for now I'm assuming it's related to AIR 3.2, which some of our users installed.

       

      We have some code to auto update the app by running a native process that runs the installer:

       

      var updateFile:File = File.applicationStorageDirectory.resolvePath("updates/update.exe");

      var info:NativeProcessStartupInfo = new NativeProcessStartupInfo();

      info.executable = updateFile;                

       

      _process = new NativeProcess();

      _process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);

      _process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onErrorData);

      _process.addEventListener(NativeProcessExitEvent.EXIT, onExit);

      _process.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_ERROR, onIOError);

      _process.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ERROR, onIOError);

       

      _process.start(info);               // FAILS ON WINDOWS (XP, and Vista)

       

      It seems to fail to start the process and the app crashes at that point. I need to check for sure that one of the error events aren't called but I don't think they are. Also the fact that it used to work before 3.2 leads be to believe that's the problem.

       

      Does anyone know of a related reported issue?

       

      -rich