Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows crash when uploading file #3621

Open
Policy56 opened this issue Dec 23, 2024 · 4 comments
Open

Windows crash when uploading file #3621

Policy56 opened this issue Dec 23, 2024 · 4 comments
Labels

Comments

@Policy56
Copy link

Policy56 commented Dec 23, 2024

Problem Description

Since upgrading to AIR SDK 51.1.1.5, I have encountered a critical issue when attempting to upload files to certain websites using the File.upload method. The problem causes my Windows application to completely crash without any error message.

  • Which AIR SDK did you use?
    AIR Flex 50.2.3.8 -> OK
    AIR Flex 51.1.1.5 -> Fail
    AIR Flex 51.1.3.1 -> Fail

Steps to Reproduce

Code Example:
Here is the code I am using that triggers the crash:

var _urlRequest:URLRequest = new URLRequest(_url);
var _localFile:File = null;
var doss:File = File.createTempDirectory();

_localFile = doss.resolvePath("test.xml");

var fs:FileStream = new FileStream();
fs.open(_localFile, FileMode.WRITE);
fs.writeUTFBytes("TEST TEST");
fs.close();

_urlRequest.method = "POST";
_localFile.upload(_urlRequest);

Observations

The crash behavior differs depending on the website I am uploading the file to:
Uploading to https://httpstat.us/500 does not cause a crash.
Uploading to https://httpbin.org/status/500 causes the application to immediately crash.
The crash occurs both when using Visual Studio Code and Flash Builder as the IDE.

Crash Report

Below is the crash report generated by Windows:

Faulting application name: adl.exe, version: 51.1.3.1, timestamp: 0x6749ba57
Faulting module name: Adobe AIR.dll, version: 51.1.3.1, timestamp: 0x6749bcb7
Exception code: 0xc0000005
Fault offset: 0x0051fe71
Faulting process ID: 0x4d4
Faulting application start time: 0x01db55166785c358
Faulting application path: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.16.1 - AIR 51.1.3.1\bin\adl.exe
Faulting module path: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.16.1 - AIR 51.1.3.1\runtimes\air\win\Adobe AIR\Versions\1.0\Adobe AIR.dll
Report ID: 2b540114-890b-4b52-9ef0-ccd0f5cda636
Faulting package full name: 
Faulting package-relative application ID:

Steps to Reproduce:

Use the provided code to upload a file to https://httpbin.org/status/500.
Run the code in an application built using AIR SDK 51.1.1.5.
Observe the crash.

Expected Behavior:

The application should handle the HTTP 500 response gracefully, without crashing.

Actual Behavior:

The application crashes immediately without displaying any error messages or exceptions.

Environment Details:

AIR SDK Version: 51.1.1.5
Operating System: Windows 10
IDE: Visual Studio Code and Flash Builder
Tested Websites:
Does not crash: https://httpstat.us/500
Crashes: https://httpbin.org/status/500

@Policy56 Policy56 added the Bug label Dec 23, 2024
@ajwfrost
Copy link
Collaborator

Thanks for finding this one .. the first one doesn't crash because it returns a body in the response, "500 Internal Server Error". The second one though doesn't return any data, and the win32 AIR runtime code doesn't handle that case properly, it assumes a buffer was created for the data and crashes when trying to null-terminate it...

@Policy56 Policy56 changed the title Windows Windows crash when uploading file Dec 23, 2024
@Policy56
Copy link
Author

Thank you for your feedback @ajwfrost .
Has the correction been made in the new version deployed today? (AIR 51.1.3.2) Or, do you have any workaround while waiting for a fix?

@ajwfrost
Copy link
Collaborator

Not in 51.1.3.2 I'm afraid! And I don't know that there's a workaround (other than trying to ensure the server always sends back a message). If you're in need of an urgent update though, let me know and we can do an interim build...

thanks

@Policy56
Copy link
Author

No it's ok thanks.
While waiting for a next update, I will first detect if the status is not in error 500, before uploading the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants