Skip navigation
Currently Being Moderated

Possible problem with NativeProcess in AIR 3.2

Apr 6, 2012 8:04 AM

Tags: #air_3.2 #native_process

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

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points