Howdy, Stranger!

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

V3.4.3 (298) (299) (300)

edited September 17 in Beta Posts: 2,428

@Simeon - are the statements/commands LANDSCAPE_LEFT and LANDSCAPE_RIGHT functional? I tend not to use them as I try to fix orientation myself. If they are variables which you can detect and respond to - fair enough. Otherwise the only thing they seem to do is temporarily lock out the control buttons.

I think an alternative would be to use ASPECT which could be used to determine orientation > or < 1, but also device type if you build a list of device aspects for phone, pad or Mac which could help developers.

I think I may have raised this before.

«13

Comments

  • Posts: 1,379

    @Bri_G theres a fix that restores orientation lock in the WebRepo, will that help, or are you talking about something else?

  • dave1707dave1707 Mod
    Posts: 9,584

    @Bri_G This is how I use them to force the device into a particular orientation. By doing this, you can bypass running code until the device is in the orientation you want.

    viewer.mode=FULLSCREEN
    
    function setup()
        fill(255)
        count=0
    end
    
    function draw()
        background()
        if CurrentOrientation~=PORTRAIT_UPSIDE_DOWN then
            text("rotate device to portrait upside down orientation",WIDTH/2,HEIGHT/2)
            text("I won't increment count until you're in portrait upside down orientation",WIDTH/2,HEIGHT/2-50) 
        else
            count=count+1
        end
        text("count  "..count,WIDTH/2,HEIGHT/2-100)    
    end
    
  • Posts: 1,379
    @dave1707 that’s an elegant solution.
  • SimeonSimeon Admin Mod
    Posts: 5,714

    I deprecated this function because it was a little too buggy at runtime. Best practice is to support any and all orientations — as the user can even split-screen multitask and squash the Codea window into a portrait aspect when in landscape, or make it skinny like an iPhone display

  • edited August 30 Posts: 1,379

    Just lost code again, and this time I wasn’t writing to tabs, or reading from tabs, or doing anything with any read or write function at all.

    In point of fact I was working inside a copy of Physics Lab.

    In addition to losing code I saw other behavior I’ve never seen before. Here’s what happened:

    • I wrote a bunch of code on one tab, let’s call it tabA
    • I switched to another tab, tabB
    • I switched back to tabA and everything I’d written was gone
    • In place of tabB was a tab I couldn’t switch to, and in place of tabB’s title it read “Loading...”

    I was also not in a project using WorkingCopy.

    This really is bad. It isn't happening to anyone else?

    update

    When I closed and reopened the project tabB was gone altogether.

  • dave1707dave1707 Mod
    Posts: 9,584

    So far the only time I lose code is when I make a change and the project cancels when I run it. Normally I’ll do the save and run option if I have a lot of code changes or I think the code will crash.

  • Posts: 2,428

    @Simeon - just plugged my iPad into my Mac, I was looking for a way to transfer data from Mac2Pad and back. Post on net shows how to add to finder then click on show in finder. Voila, my Pad is there. The post says to see files etc go to files in the button bar, and there were most of my iPad installed apps.

    But, no Codea. Is there a reason for this, or a way of including it, it would be an ideal way of transferring data/resources ?

    Also, on the latest beta I note projects are listed as project.codea and tapping on them runs them. Would it be possible to add a long press to open the project so we can exchange files as needed? Or is there another way of opening them.

    A little explanation of the modifications incorporated with the new Documents (ie root) folder could be useful.

  • SimeonSimeon Admin Mod
    Posts: 5,714

    Really sorry about that @UberGoober, it sounds very frustrating. This has been happening ever since I adopted the iOS Document model and relied on its "autosaving" behaviour instead of just writing the files directly. I'll spend some time tonight trying to reproduce and debugging it

    @Bri_G good point on being able to look "inside" a Codea project. This is something we are doing for Codea 4.0, where projects behave much more like folders when opened

  • SimeonSimeon Admin Mod
    Posts: 5,714

    @UberGoober do you recall if you ran the project at any time while performing those steps? I'm trying to figure out how the error came about

  • SimeonSimeon Admin Mod
    Posts: 5,714

    @UberGoober I have some ideas about what is going on in this case and will try fix it in a new beta

  • edited September 2 Posts: 2,428
    @Simeon - nice to hear 4 will be more file orientated rather than purpose built filing. Very used to the latter but filing is ingrained in me (old git).

    Funny I noted recently, trying to set up a timer with socket() and the project hung up on me - that was in the editing mode, run button didn't respond. Think it was after running. Does repeated calling for socket() cause problems with Codea.
  • Posts: 1,379
    @Simeon I’m trying to remember… I don’t think I did… I was switching back and forth between two tabs a lot, because I was doing Unit tests and I kept forgetting what the names of my methods were, and I noticed the bug when I had gone to the tab I was testing and then tried to go back to the tab with the test code…
  • SimeonSimeon Admin Mod
    Posts: 5,714

    @UberGoober I think I've tracked it down to how Codea is loading projects. I'm uploading a new build of 3.4.3 with a lot of underlying changes and hope that it fixes the bug

  • Posts: 1,379

    @Simeon just happened again, lost code, although the weird “loading…“ thing didn’t happen. This time I think I did run the project before losing the code.

  • dave1707dave1707 Mod
    Posts: 9,584

    @Simeon Version292 doesn’t keep the sort by name. If you do sort by name, sometimes it works but if you exit Codea and go back in it sorts by recents even though name is still selected.

  • edited September 3 Posts: 2,428

    @Simeon - 292, loading of projects on initial boot of Codea takes ages.

    After rebooting getting projects selecting project editor screen locked out - no response to touch.

  • Posts: 2,428

    @Simeon - 292, loading of projects on initial boot of Codea takes ages.

  • dave1707dave1707 Mod
    Posts: 9,584

    @Bri_G Are you saying when you start Codea and then load a project, it takes ages to show in the editor. The largest project I can find is Cargo-Bot and that loads/runs immediately.

  • edited September 4 Posts: 2,428

    @dave1707 - no in a word. What happens is when I run Codea it goes to the project page with a semitransparent side window on the left and the two icons for settings and assets at top right with the background image there. At that point it takes quite a while before you see the collection icons and then further long time before you see the project icons appear.

    I have been playing around with the files/assets in the Codea root to try to resolve my Dropbox problem. I think there may be a clash there or I may have too many files in the root. Had to transfer some files from Dropbox to Mac then to Codea from Mac into the root so that I could run my projects. Now Dropbox is nearly empty but working. Think I may have to empty the Codea root next.

    @Simeon does Codea keep a separate list of files in the Codea root for checking on boot up or does it just build a dierectory when booting?

    p.s. I did have some folders in the Codea root which were named like folder.assets which I renamed to folderAssets as I wasn't sure that the original naming was valid in the latest Codea versions since projects moved from 'project' to 'project.codea'

  • SimeonSimeon Admin Mod
    Posts: 5,714

    @UberGoober it happened with 292?

  • SimeonSimeon Admin Mod
    Posts: 5,714

    @dave1707 next version should resolve the sorting issue, thank you for finding it

  • dave1707dave1707 Mod
    Posts: 9,584

    @Simeon Codea version 293 project sorting now works the way it should..

  • dave1707dave1707 Mod
    Posts: 9,584

    @Simeon I just realized that Codea loads immediately. I don’t have the 7 second delay anymore. I guess I was sidetracked with the project sort problem and didn’t notice the speed increase being fixed in the last release.

  • SimeonSimeon Admin Mod
    Posts: 5,714

    @dave1707 glad to know it's fixed! I am not sure why it's fixed as I didn't really do anything that should impact it

  • dave1707dave1707 Mod
    Posts: 9,584

    @Simeon I’ll reload version 291 and see if it’s still in that version or if there was something else that might have affected it.

  • dave1707dave1707 Mod
    Posts: 9,584

    @Simeon I loaded version 291 and it took about 7 seconds for Codea to load. Reloaded version 293 and Codea loads immediately. Don’t know what you fixed by accident, but I like it.

  • SimeonSimeon Admin Mod
    Posts: 5,714

    That's very interesting, thank you for testing that. I'll have to compare the code changes and see if anything stands out

  • Posts: 2,428

    @Simeon - Just linked up my iPad by USB to my Mac. I can see the iPad in Finder. Open the link in Finder and select the button bar 'Files' option and The apps on my iPad are listed - but not Codea. Is there an option I need to set up to see Codea in Finder or is it something that needs setting up at your end ?

  • Posts: 1,379

    @Simeon neither 292 nor 293 have appeared in my TestFlight.

    iPad Pro 12.9” 4th generation, 14.4.1

  • edited September 4 Posts: 2,428
    @Simeon - could you describe the file format for the latest betas of Codea. Tried to backup to external drive but project.codea files aren't openable on my Mac. If I change them to zip files will their content be accessible?
  • dave1707dave1707 Mod
    edited September 4 Posts: 9,584

    @Simeon

    Something is wrong with Codea. When I start some projects, all I get is a black screen and nothing responds. I have to close Codea. When I restart it, I get the Codea crashed popup. I sent a crash report. Some projects work, but some don’t.

    This is with version 294.
    I reloaded version 293 and getting the same thing.

    Loaded version 291 and everything works OK.

    Locks up on my iPhone 8 SE with version 294.

    The editor frequently locks up and about 10 seconds later I get the crash popup.
    It seems that backspacing to a previous line causes the editor hang.
    Deleting a blank line causes a hang.

    I was able to get down to this code to cause a black screen that hangs Codea. If I comment out the a= line, it runs fine.

    viewer.mode=STANDARD
    
    function setup() 
        a=asset.documents.all
    
        fill(255)
    end
    
    function draw()
        background(0)
        text("this doesnt show",WIDTH/2,HEIGHT/2)
    end
    
  • Posts: 2,428
    @dave2707 - sounds a bit like what I am seeing. I'm convinced it's because I have a lot of projects and collections. I have been trying to backup by transferring projects etc. Can copy the root files with recognised file types but codea.projects just transfer as a file. Are Codea.project files just plist files pointing to the relevant internal files which are not visible?

    The change in the resource filing may be causing this. My Dropbox is not working right - am trying to rebuild it.
  • Posts: 1,379

    @Simeon My iPhone 8 is receiving the updates just fine, by the way, while my iPad still isn’t.

  • dave1707dave1707 Mod
    Posts: 9,584

    @Bri_G @Simeon Bri, are you seeing any crashes. What I’m running into is constant hanging/crashes, either running some code or trying to use the editor. See my comments above.

  • edited September 4 Posts: 2,428
    #dave2707 - I'm seeing lots of crashes, when they are novel I report them by the system crash dialogue otherwise I skip them as I didn't think repeated data would help.

    I have seen:
    slow loading the Codea screen
    Locking of the editor screen
    Crash reports when I have shelved Codea and using other apps (usually filers).

    I have been able to run code.
    This has been occuring for last two or three updates.

    I still think this is filer related.
  • dave1707dave1707 Mod
    edited September 4 Posts: 9,584

    @Simeon Just trying to type a=asset.documents.all hangs the editor. Once I key the period before the word all, the editor is hung up. So I would say things having to do with asset is causing a problem.

  • Posts: 2,428
    @dave1707 - I would be careful with Dropbox with this beta, I wouldn't sync it. Could be my playing around that's messed up my system but filing problems may be difficult to resolve. Made me rethink how I work in future.
  • dave1707dave1707 Mod
    Posts: 9,584

    @Bri_G I don’t use Dropbox that often. I just keep my Codea backups there. That’s once every couple of months.

  • SimeonSimeon Admin Mod
    Posts: 5,714
    Thank you for reporting this, will reproduce and fix! Sorry about the bug, lots of underlying changes were made
  • Posts: 1,379
    @Simeon I feel dumb, I just needed to update iOS, and it works fine on my iPad now. I love the new undo button on the phone. I think the dark mode menus look great. And I love that the edit menu now says “paste and preserve formatting“.
  • edited September 5 Posts: 2,428

    @Simeon - I have gone back over the beta versions installing them and running to check the delay in loading issue. All were slow until I installed 291. That returned to screen up very quickly. Did you find anything when @dave1707 reported the loading issue?

    p.s. After using 291 for a while I remember the issue of the juddering screen associated with it. Perhaps the problem started before 291.

  • dave1707dave1707 Mod
    Posts: 9,584

    @Bri_G I’m confused with your comment, maybe I’m not reading it right. For me, version 291 took about 7 seconds to load from the time I tapped the Codea icon until the list of projects showed. For versions 292, 293, 294, it loaded immediately. Right now I’m back on version 291 because the later version crashed so much I gave up on them.

  • Posts: 2,428
    @dave1707 - worked back from 294 and all versions slow. I'm wondering if there was residue left in the latter installations that could clash with earlier versions. My system took minutes not seconds with latter versions. I can't explain it unless it's to do with the network which might have drop outs, but that would imply that Codea links up with Dropbox on initially running.
  • dave1707dave1707 Mod
    edited September 5 Posts: 9,584

    @Bri_G If you think it’s a Dropbox issue, have you tried unlinking Dropbox and see if it goes faster. Or maybe taking you iPad off line and trying that way also.

  • edited September 6 Posts: 1,379

    @Simeon @John OK I have just spent hours and hours and hours trying to find a bug, and you’ve probably seen crash report after crash report after crash report from me, usually referring to CodeaUnit and an abundance of iterations.

    I think I finally tracked this down, and it puzzles the heck out of me, and I have no way to reproduce it.

    Do you know how Codea won’t let you just put “return“ in the middle of a function if it has code after it?

    It makes an error, right? If I need to truncate a function for testing purposes, I usually put “if true then return end” as a temporary measure.

    For some reason, there was a section of my code where I written just “return“ in the middle of a function—not “if true then return end”, just “return”—and yet it was not throwing an error. In fact it seems like it was ignoring the line all together, and executing code after the return statement.

    It took me hours to realize, hey, it should be throwing an error here! When I changed it to “if true then return end” the crashes stopped happening.

    The only other tidbit of information I can supply is that when I tried to write a print statement just below the misfit “return” statement, an error did appear, but that error said it was expecting an “end” statement, and when I removed the print statement that error went away.

    In the attached image you can see that section of code in the editor, with no error flagging the incorrect “return” statement.

  • SimeonSimeon Admin Mod
    Posts: 5,714

    @dave1707 this is really odd. No matter what I do, I can't seem to reproduce your hanging/crashing issue. I can't even see any of your crashes in the TestFlight feedback (I see yours, @UberGoober, and will look into them)

    I'll keep trying, I wonder if there is a specific set of circumstances around your installation

    Is anyone else seeing the editor crash when typing the line:

    a=asset.documents.all

  • dave1707dave1707 Mod
    edited September 6 Posts: 9,584

    @Simeon I reloaded version 294 and keyed in the a=asset line again and it hung and then crashed.

    I type the a=a and selected asset from the autocomplete. I typed the period then d and selected documents from the autocomplete. I then typed the period and that’s when Codea was unresponsive. It eventually crashed after about 10 seconds. I sent another crash report too. This was on an iPad Air 3 latest iOS.

    I tried it again. Codea became unresponsive but didn’t crash. I had to force close it and then a crash popup showed.

    I tried keying the a=asset line without using autocomplete and it still hung when I keyed the period after documents.

    Tried it on my iPhone and it didn’t hang.
    It also didn’t hand on an iPad Air 4 or iPad Pro 1.

    Version 293 also hangs on the iPad Air 3.

    Version 292 also hangs on the iPad Air 3. This time the only thing that was responsive was that I was able to slide the autocomplete bar to show things that were in my project list.

  • edited September 6 Posts: 2,428

    @Simeon @dave1707 @UberGoober - in my installation I don’t get a crash with

    a = asset.documents.all
    

    Not; I tested that after stripping loadsa files from my Dropbox and root. Could it be related to file types?

    @UberGoober - I also found that an error is posted when return is followed by code (see the attached image).

  • SimeonSimeon Admin Mod
    Posts: 5,714

    @dave1707 this is frustrating. I can see your crashes (2 of them) in the crash feedback, but yours download as corrupt zip files. This is a problem with Apple's crash reporting and appears to be only affecting your crashes

    I've tried doing another build (295) where I have fixed some more bugs and added another feature (long press on a project on the main screen to show its assets)

  • dave1707dave1707 Mod
    Posts: 9,584

    @Simeon It appears to only affect documents. If I do asset.builtin or asset.downloads or assets.all it doesn’t hang.

Sign In or Register to comment.