[edit] Be very careful releasing apps using CoronaSDK daily builds

I recently released a minor bug fix to my app. Unfortunately I found out the hard way that the daily build is VERY buggy.

Use build 704, which is the last stable build. Do NOT use any build after that.

Specifically, the problem I found (from users complaining) is that the Documents directory is no longer working properly. I write my user data out to the Documents folder. This works properly with build 704, but on builds after that it appears to write it out to the TMP folder. This folder is DELETED when the app closes.

I reverted back to CoronaSDK build 704 and rebuilt my app and it works as expected. This is NOT an issue with my app, this is a BUG in the Corona Daily builds.

This is a good example of why we should NEVER use daily builds for release builds of our apps.

Ansca, please fix this ASAP and get a new stable build out with the other great features you’ve added recently. [import]uid: 16734 topic_id: 20846 reply_id: 320846[/import]

@Ken, MANY THANKS for this Advice mate!

BTW I am using only the latest STABLE version, better, specifically the version 706 mainly because that does still support OLDEST iOS devices and for me (my app, market) it`s good for sure and so I did not use any latest daily-builds for this reason (even the daily-builds getting better resources).

BTW, I was thinking about instal the latest 730 daily build now to make my Android builds, BUT after this bad-new from you regarding the daily-builds I will kepp my stable version as well.

PS: As Mrs. Peach says: “daily-builds are not fully tested”. :slight_smile: Now more than never for me, I`ll resist the temptation of the dailys. :\
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 20846 reply_id: 82106[/import]

I have an App in the Apple Store built with build 705 and haven’t had any issues.

I also stuck with this build to still support the older iOS.

I have an update waiting for approval that saves a text file. Are you saying this file will get deleted when the user closes their app? [import]uid: 22392 topic_id: 20846 reply_id: 82113[/import]

I re-tested my apps with no issue. I would double check that you’re specifically choosing to write to the documents directory. I am using 730.

With Corona, waiting for an official release is just not realistic. There are too many bug fixes and new features being pumped out, and official releases are few and far between (that’s not a knock on Ansca, most product life cycles are quarterly or worse).

If you notice a bug in the build your using, work around it. Always make sure to test before shipping something out, and you’ll be fine.

@RSCdev I hated moving from 706 for that reason, but I had no choice. I simply couldn’t leave my users stuck with OpenFeint when I can provide a superior, apple-friendly gaming experience with native GC :slight_smile:
[import]uid: 36054 topic_id: 20846 reply_id: 82118[/import]

I used Peach’s code from her tutorial:

--Save function  
function saveFile( fileName, fileData )  
 --Path for file  
 local path = system.pathForFile( fileName, system.DocumentsDirectory )  
 --Open the file  
 local file = io.open( path, "w+" )  
  
 --Save specified value to the file  
 if file then  
 file:write( fileData )  
 io.close( file )  
 end  
end  

I assume I am writing to the documents directory, no?
Is there any way to check your testing iPhone to see if this file is deleted or not? [import]uid: 22392 topic_id: 20846 reply_id: 82122[/import]

All I can do is report what happened to me. Your mileage may vary.

If you look at the last 4-5 daily builds you will see a TON of “Waypoint” check ins, primarily to do with Game Center.

You cannot expect stability in a daily build. Sure, some things may seem to work, but that doesn’t guarantee that the are 100% robust.

I did test it with the daily build I had built with, and sure enough it worked the first time, but then after that it wouldn’t write out the file. When I reverted to build 704, it worked every time.

Does that mean daily build 730 doesn’t work? I really don’t know. I tried it twice. One time it worked, another time it didn’t. Whether or not it is writing to the wrong location or accidentally deleting the file I have no idea. All I know is a user complained, I ran the released game again and saw the issue. I built with the latest daily build thinking that build 724 might have been buggy, and everything worked. Then I closed the game for the 2nd time, ran it, and the data was gone.

I don’t know of any way to actually get at the data file on the device, so I cannot verify if the file was still there, deleted, or in a different location. [import]uid: 16734 topic_id: 20846 reply_id: 82133[/import]

I’m using 722 to use the web popup functionally for email and twitter.
I have just uploaded for review.
But I can tell you that the documents folder is working just fine on my iPad.
I know this because I expose the documents folder through iTunes as a means of document exchange between the iPad and the Mac.
No mysterious losses so far.

Does your code perhaps delete the file or write an empty version, during the startup process?
[import]uid: 108660 topic_id: 20846 reply_id: 82149[/import]

@jeff,

I don’t delete the file anywhere in my code. I also always write out the same set of data using the same function on application shutdown.

No clue why it was doing it and I am not exactly sure of the Corona Build I was using. I know it was after 704, and before 730. For whatever reason 730 has now worked properly on 5 different ad hoc install/run/shutdown/startup/uninstall cycles.

Given that our code isn’t actually compiled on the local machine this could have been an issue on Ansca’s side that they fixed. [import]uid: 16734 topic_id: 20846 reply_id: 82153[/import]

I believe there are scenarios were developers don’t have any choice but to release apps with the daily builds. Here are 2 examples.

  1. There were audio problems in iOS 5. These required the CoronaSDK to pick up fixes from Apple or implement some work arounds (maybe both). When iOS 5 was released to the general public, these fixes were only in daily builds.

  2. Openfeint made a change in their SDK that was causing apps to be rejected by the Apple app store. The CoronaSDK needed to incorporate a new OF SDK to correct this problem. This was only available in the daily builds for several weeks.

In these 2 cases the problem wasn’t with our apps or the CoronaSDK, but if you were impacted you had no choice but to release an app built with a daily build or wait an unknown amount of time for an official release.

I’m eager to use some new features in the daily builds, but I’ll really beat on my apps before releasing them to try and catch any problems. [import]uid: 67839 topic_id: 20846 reply_id: 82165[/import]

Hey Ken,

Can you tell me if you are having these issues on iOS or Android? There were some recent changes to different directory locations on Android and this may be part of the problem but I’d like to confirm.

Thanks,
Peach :slight_smile: [import]uid: 52491 topic_id: 20846 reply_id: 82190[/import]

Just want to chime in here.

Daily builds are a work in progress, and your results may vary. With the nature of programming a lot of the time you fix one thing and break another. It’s an ongoing battle.

I wouldn’t say don’t use daily builds for releases, I would however strongly suggest extensive testing. [import]uid: 84637 topic_id: 20846 reply_id: 82199[/import]

I would chime in. Daily builds are a work in progress and we do mention that milage may vary especially when there are a lot of checkins and moving parts.

I would concur with @Danny that the onus is also on you to do extensive testing. The daily builds are fresh off the build machine and even though it goes through its automated testing, there are cracks and bugs and what not to happen.

It is kind of a bummer that you got bitten by a bug or caught a unstable build.

C. [import]uid: 24 topic_id: 20846 reply_id: 82273[/import]

@carlos,

Agreed. This was not Ansca’s fault at all. It was my fault for making a minor change, testing in the Simulator, and releasing the app. My change didn’t cause the bug, but I had inadvertently updated my Mac to the latest daily build (at the time of release) and that introduced the problem.

I’ll edit the title of this Topic to “Be Careful when using Daily builds”. [import]uid: 16734 topic_id: 20846 reply_id: 82308[/import]

Thank you

question: the temp directory bug still there?

can you guys help me out and let me know if writing out user data out to the Documents folder works properly with build 704, but on builds after that it appears to write it out to the TMP folder

is this still true?

if so, let me know so i can escalate a bug fix.

c. [import]uid: 24 topic_id: 20846 reply_id: 82313[/import]

I am having hard time building for Nook Color ( and other flavors of Android OS). I am getting this :
Invalid memory access of location 0x44 eip=0x57002

I have downgraded to the stable build 704 and still doing it! I can’t build my apps for publication. It started doing last night, and still on the same boat.

Anyone knows what’s going on? Any help, suggestions would be highly appreciated at this time.

Thank you. [import]uid: 75258 topic_id: 20846 reply_id: 82372[/import]

@pdichone,

I just built my app for the Nook using build 730 and didn’t see the crash you mentioned.

Make sure you are using your signed key store.

Ansca:
I noticed the “Build As” changed from “Nook Color” (in previous Corona Builds) to just saying “Nook” now. Does Corona no longer create a Nook Color build? [import]uid: 16734 topic_id: 20846 reply_id: 82380[/import]

Nook is nook color and nook tablet. which are the same tablets but nook tablet is faster.

c. [import]uid: 24 topic_id: 20846 reply_id: 82382[/import]

@Carlos,

Thanks for the response. When I filled out the Nook Developer form it let me sign up for Nook dev without any hitch, but for Nook Color I had to fill out another form and “wait” for approval. Since our game wouldn’t be much fun without color I didn’t submit for Nook, but also have no idea how long it takes to get approved for Nook Color (it’s been over a week). [import]uid: 16734 topic_id: 20846 reply_id: 82383[/import]

they have slow response time.

c. [import]uid: 24 topic_id: 20846 reply_id: 82387[/import]

Where to be the link to download of the version 730? [import]uid: 133197 topic_id: 20846 reply_id: 107967[/import]