Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Losing code, Editor quirks

2»

Comments

  • SimeonSimeon Admin Mod
    Posts: 5,363

    @brianolive hmm you should be on 3.1 (208), which is the last beta and also the release version

    Thank you for posting this, though.

    Do you find the editor loses it's auto-indentation behaviour when this happens?

    If you long-press on the play button you can choose "Save & Run" which forces a save of the project

  • Posts: 95

    Updated to build 208. I’ll let you know if I still see the issue.

    Yes, I lose auto-indentation during this! Fingers crossed that that means you have some idea as to the cause.

    Long-press didn’t seem to help last time, but I’ll try to use it if I see the problem again today.

  • Posts: 95

    Updated to 208, and still having the problem. Long-press save seems to ‘save’ my changes in the editor, but they do not get applied - that is, what I see in the editor is not the code that gets run. I will recognize the program behavior as something from a previous state of my code. If I close my project and reopen, sure enough, it shows the older version of my code. Auto-indent still gets lost.

  • SimeonSimeon Admin Mod
    Posts: 5,363
    How often would you say it happens? Does it happen from when you first open the project?
  • dave1707dave1707 Mod
    Posts: 8,390

    @brianolive What device are you running on. How many tabs and how much code in each tab. Is the code within Codea or in Files or somewhere. I’m trying to cause your problem on my iPad but I’m not having any luck.

  • edited March 22 Posts: 95

    It was happening very consistently this morning. I don’t have many changes to make right now (on the bright side I am happy that my Kanji learning project is coming together), so I’m not sure if it is acting up right now.

    This is on build 208, iPad Pro 12.9 - the older one. 5 tabs, code actually is only around 500 lines total. One large Data.plist file (~7mb). Project is in the Codea directory. I am using the project zipping feature to get my changes over to Working Copy. I’ve deleted the project and copied it back in from Working Copy (all from within the Files app).

    If I exit my project, and then reopen it, I am safe to make one set of changes and then run my project. If I return to the editor after running the code, then I’ve become leery of making any important changes. I usually have to exit out of the project again, and come back in.

    OS: 13.3.1

  • dave1707dave1707 Mod
    Posts: 8,390

    @brianolive You’re on a 12.9” iPad Pro 1. Your code is in the Codea directory. You have 5 tabs with a total of about 500 lines of code. You make changes and run the code. Sometimes your changes work and sometimes it doesn’t. When it doesn’t and you edit the code, your changes are gone. I have a 12.9” iPad Pro 1 and I can create a project with 5 tabs and put about 100 lines of code in each tab and try things. Are you always doing the Save and Run option. If so are you having the problem when doing it. So is everything I say above about right.

  • edited March 22 Posts: 95

    I have tried using and not using the long-press save. I will also say this: I have gone for weeks now with only occasional programming in Codea, with no issues. Yesterday I put in a few hours in Codea, with the first 1.5h also having no issue. It was only towards the end, that I started to see the issue manifest. So, yes, you are correct in all of the above, but I’ve also done all of that with no issues. It is also the same behavior that I saw a few months ago, and then I had some longer projects, smaller projects, projects stored outside of Codea...so many variables. I appreciate you looking into it, but I am just not sure how to reproduce the issue with consistency. @Simeon mentioned the auto-indent not working when this happens, and that is true, so I would look there.

  • dave1707dave1707 Mod
    Posts: 8,390

    @brianolive I set up a project on my iPad Pro with 5 tabs and about 100 lines of code per tab. I haven’t been able to cause any problems changing some code. Of course my program doesn’t really do anything so that might be a reason. How much memory does your iPad have and how much is being used. It might be that when you run your code, something in Codea isn’t working right. Then when you make changes they’re not being saved like they should. It could also be the constant edit, run, edit, run, cycle might be causing something in the editor to malfunction. When I was trying things, I closed a project and tapped another project, but the one I tapped didn’t open, but some other one did. That was reported in another version.

  • edited March 22 Posts: 1,719

    @brianolive - I have had a few recent crashes, one of them involved a massive texture which I tried to build - I think it was 512 x 48 x 512 x 48. What memory intensive routines/command are you using? Also are you cleaning up with collectgarbage() ?
    The other incident occurred after running some file/text handling the starting another project and pasting copied code straight into draw - on running Codea crashed but reset after closing Codea manually (reported on March 17) in Codea 3.1.1 (280) thread.

    Oh, the other issue with wrong project opening after a closure has been reported. It seems to be down to project shuffling after project closure - when the latest project run house to the top of the pile - all others shuffle down and you run one of the ones next to the one you was targeting. You can often see the shuffling of project icons.

  • SimeonSimeon Admin Mod
    Posts: 5,363
    Thanks for all the details. That 7mb Data.plist file is an interesting point. I'll try reproduce
Sign In or Register to comment.