Highlighted

2038 Error on AIR Desktop App

New Here ,
Feb 22, 2016

Copy link to clipboard

Copied

Some users of a desktop app I publish often write to me saying they're getting a "2038" Error when they try to save a file or export a png of that file.

#2038 is tough to diagnose, though, as it's just an I/O Error without much detail. Has anybody else publishing to desktop had some of your users report this error?

When I export, for example, I'm just building a file by using the File object, like so...

exportFile = File.documentsDirectory.resolvePath(fname + ".pdf");

And then doing a browse for save...

exportFile.browseForSave("Export to pdf");

It seems like there's little room for something to go wrong, but I get this bug report quite often.

Thanks for any thoughts or suggestions.


- Daniel McQuillen

SimpleDiagrams.com

TOPICS
Development

Views

702

Likes

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

2038 Error on AIR Desktop App

New Here ,
Feb 22, 2016

Copy link to clipboard

Copied

Some users of a desktop app I publish often write to me saying they're getting a "2038" Error when they try to save a file or export a png of that file.

#2038 is tough to diagnose, though, as it's just an I/O Error without much detail. Has anybody else publishing to desktop had some of your users report this error?

When I export, for example, I'm just building a file by using the File object, like so...

exportFile = File.documentsDirectory.resolvePath(fname + ".pdf");

And then doing a browse for save...

exportFile.browseForSave("Export to pdf");

It seems like there's little room for something to go wrong, but I get this bug report quite often.

Thanks for any thoughts or suggestions.


- Daniel McQuillen

SimpleDiagrams.com

TOPICS
Development

Views

703

Likes

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
Feb 22, 2016 0
Adobe Employee ,
Feb 22, 2016

Copy link to clipboard

Copied

Hi Daniel,

I am unable to reproduce the issue at my end. Can you please provide us with sample project reproducing the issue? You can mail the project at nitanwar[@]adobe.com.

Likes

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
Reply
Loading...
Feb 22, 2016 0
New Here ,
Feb 23, 2016

Copy link to clipboard

Copied

Hi Nitanwar,

I wish I could reproduce exactly, but that's what mysterious about it. Many users have reported this issue to me over time, often saying they can't save their SimpleDiagrams document (even to their desktop) or they can't export a pdf version of their document (i.e. my application generates a pdf and tries to save it where then did a browse-to-save).

So are there some known conditions where an AIR desktop app will be denied by the OS when trying to save a file? Have others experienced this?

Very strange...

Thanks,

Daniel

Likes

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
Reply
Loading...
Feb 23, 2016 0
Adobe Employee ,
Feb 23, 2016

Copy link to clipboard

Copied

HI Daniel,

I was able to save the SimpleDiagrams document on my desktop both on Mac and Windows.

Without the exact reproducible steps from your side it would be difficult for us to find the real cause of this issue .

Can you please ask your users the scenarios/steps which reproduce the issue.

Also please provide the OS information and Adobe AIR version for which you are facing this error.

Thanks

Likes

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
Reply
Loading...
Feb 23, 2016 0
New Here ,
Feb 28, 2016

Copy link to clipboard

Copied

Hi Nitanwar,

Thanks for your help. This is a really pernicious bug. It seems to mostly occur to OSX users, and only a subset. It happens whenever they try to do a save operation (either of their document or of an 'exported' png or pdf).

The trace is unfortunately not very helpful:

Error: Error #2038

at com.simplediagrams.business::DiagramDelegate/exportDiagram()

at com.simplediagrams.business::FileManager/saveDiagramToFile()

at com.simplediagrams.business::FileManager/onSaveFileAsSelected()

In the exportDiagram() method, I'm using FZip (https://github.com/claus/fzip) to write out my file...

var libXml:XML = libDelegate.writeLibrary(library);

fZip.addFileFromString("library.xml", libXml, "utf-8", false);

var s:FileStream = new FileStream();

s.open(resultFile, FileMode.WRITE);

fZip.serialize(s);

s.close();

fZip.close();

Do you have any thoughts on how to resolve the bug, either by including extra log information or going about the operation in a different way?

Thanks for your help.


Daniel

Likes

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
Reply
Loading...
Feb 28, 2016 0
Community Beginner ,
Mar 30, 2017

Copy link to clipboard

Copied

More than a year later but I continually fight this. It appears like the file doesn't really close or something. If they use a different filename or delete the old file, it seems to work fine.

Likes

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
Reply
Loading...
Mar 30, 2017 0