• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Writing to files fails on release builds.

New Here ,
Apr 01, 2014 Apr 01, 2014

Copy link to clipboard

Copied

Hello,

I've been attempting to save the state of my game to disk.  I've tried using both SharedObject and just writing my own file using File.applicationStorageDirectory.  Both of these work fine with a debug build.  However, both fail to write files if I use release build.  What gives?  Do I have to have a certificate from Microsoft or Android to save files from a release build AIR application now?

I'm using Windows 8.1, Android 4.4.2, AIR SDK 13, Flash Builder 4.7, .  Both Windows and Android will save files from a debug build.  Both will not save files from a release build.  I am using a self signed digital signature, it has been around a while.  Do I need to generate a new one?  Or is there a different problem?

Update

I created a fresh Actionscript Desktop (Adobe AIR) project, imported the previous projects code, and got it running.  Same problem.  I tried native installer and application with captive runtime.  Release builds cannot write to the applicationStorageDirectory or the documents directory.

Update 2

So, the issue appears to be a serialization problem with the builtin JSON.  JSON.stringify is throwing an error in the release build, but not in the debug build.  Admittatly I was throwing a fairly complex object at it, however the behavior change between the builds seems poor on adobe's part.  To get around this I downloaded the ac3corelib, gutted, and refactored the object serialization component to fit my needs.  The complex object is handled in a more simple manner and it works.  Disappointed in adobe's serialization, but from what I see around the net that is pretty common.

Views

490

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
community guidelines
Community Beginner ,
Jun 16, 2014 Jun 16, 2014

Copy link to clipboard

Copied

LATEST

Hi

I've exactly the same problem, any news on that side?

Thanks in advance

Luca

Votes

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
community guidelines