Howdy, Stranger!

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

Version 2.8 (160)

edited June 2019 in Beta Posts: 1,717

@Simeon - just loaded new version and ran into problem with commenting. Lines commented green without — marks. But, still ran OK - this in old editor. Switched to new editor and not commented there. Also changed font size on right side panel only went up to 24. Then system slowed down, stuck and poor response to touch. Image of commenting attached.

Stopped Codea and restarted, the commenting uncommented lines had gone but right hand panel still slow.

Also, not just in the latest version, but also the previous one, I have had a few problems with editing. One when I have added some figures like a vector number. On trying to run then I get errors and when I go back to the code the numbers I typed are gone.

The other issue is when I try to close the running screen with controls bottom right on occasion it has dropped out of Codea. Not reproducible.

«1

Comments

  • SimeonSimeon Admin Mod
    Posts: 5,363

    The code editor was slow with a large font?

    Which iOS version are you on?

    Did the unsaved changes issue happen in the new editor or the old one?

  • Posts: 1,717

    @Simeon - it was the touch response in the settings window that gave the impression it was very busy and not responding to touches, it did eventually but there was a definite ‘delay’. Response also seen on buttons e.g. for recent versus alphabetic. Could it be tied to multiple taps on increasing font size, which locked at 24?

    IOS 12.3.1.

    Old editor, does the code overlap between editors or are they discrete packages?

  • SimeonSimeon Admin Mod
    Posts: 5,363

    The code overlaps quite a bit but there are differences relating to how they save your code

  • Posts: 505

    @Simeon with new code editor we've got back the old issue with renaming tabs/files. The renaming should be case sensitive, because otherwise same words, but different capitalization is not accepted as a valid new name.

  • SimeonSimeon Admin Mod
    Posts: 5,363

    @se24vad thanks for catching that regression

  • dave1707dave1707 Mod
    Posts: 8,389

    @Simeon With the latest code (153), if I open a shader that was created with Shade using the Codea shader lab editor, it doesn't show any vertex or fragment code and it flashes an error message that's hard to read in a window in the lower right corner. I don't expect it to show any code or work, but it probably shouldn't allow it to be opened, or maybe show a message that can be seen easily.

  • dave1707dave1707 Mod
    Posts: 8,389

    @Simeon Codea version 153 doesn't start with the project list screen, but with the Reference, Assets, ShaderLab, Air Code screen.

  • dave1707dave1707 Mod
    Posts: 8,389

    @Simeon The new code allows me to rename tabs, changing the case of the letters. It won't allow 2 tabs with the same name with different case letters. Not sure of the reason to allow upper/lower case names if the names with different cases are treated the same. Not that I would have different tabs with the same name anyways. But then I don't worry about the case of the tabs either.

  • SimeonSimeon Admin Mod
    edited June 2019 Posts: 5,363

    @dave1707 thank you for all those reports. I forgot about Shade shaders — I'll try hide them from the picker

    The initial layout issue is a bug I introduced last night. Will fix

    The tabs can't have the same name with alternate case, but someone reported not being able to change case of an existing tab so I figured I would add support for that.

    I guess if you accidentally name something "Myclass" but really wanted "MyClass" and then the lower case 'c' bothers you every time you look at the tab...

  • dave1707dave1707 Mod
    Posts: 8,389

    @Simeon I wasn't sure about the tab names. I figured since variable names can have the same name and work with different cases, then maybe the tabs names were supposed to also. I think whenever I had the wrong case on a tab, I would just copy the code, delete the tab and create the correct tab and paste the code back in. But it's good know the rename works.

  • edited June 2019 Posts: 1,717

    @Simeon - updated to 153, checking on the font issue - still 24 max but you probably have that upper limit set. The order of sorting alphabetic/recent still slow but realised that’s probably due to the number of projects I have in my project list. Do you have a buffer page created to show projects to speed up page change? The small/large icons is rapid switch now. New editor doesn’t respond to settings font size change.

  • SimeonSimeon Admin Mod
    Posts: 5,363

    @Bri_G how many projects do you have?

  • Posts: 1,717

    @Simeon - 464 plus examples and craft examples. Most in collections but about 50 showing project icons on the screen when Codea started. I’m not the most tidy person and tend to shelve things when I get stuck and have multiple copies (variants) trying different approaches. My bad!!!!

  • SimeonSimeon Admin Mod
    Posts: 5,363

    No that's fine, we should be able to handle it better!

  • dave1707dave1707 Mod
    Posts: 8,389

    @Simeon @Bri_G I have 565 projects plus whatever the examples are and it takes about 1 second to do the name/recent sort. I always keep it sorted by name so that doesn't matter. Sometimes when I scroll the projects fast, the scrolling pauses for a few seconds like its trying to catch up. That's been happening for several releases. I've just been scrolling slower to get around it.

  • Posts: 1,717

    @Simeon @dave1707 - most of my project files are in collections, I wonder if that contributes to the slow response. Scrolling through project files isn’t a problem though.

    Couple of things on an aside though - may be an iOS issue but I find when I run an app now a window opens from the bottom left corner of the pad zooming up to fill the screen. Part way through there is a definite pause when you can see the window set against the padtop background. Have you seen that?

    Second - has the Codea website been updated? I keep seeing little black messages in the bottom left corner. Usually about saving draft data, but one with a light bulb and saying can’t find that file. It hung up the browser and I had to restart Safari and lost the post (this one first time).

    Also I was logged out of the website and had to log back in. On that the buttons seem to have changed there is a login with a register immediately next to it - could you separate those a little.

  • edited June 2019 Posts: 1,717

    @Simeon - is the search implemented on the new editor? Can’t seem to get a search field loaded to identify criteria for search.

    Edit: Forget that - found it on the Do menu - dohhhh half asleep today.

  • Posts: 1,717

    @Simeon - just found another situation with the new editor, although I haven't been able to duplicate it yet. I was editing a project, 3 tabs, and had just edited a tab and run the program then used the cmd line editor to print out variable status. Having done so I the returned to the editor and made a few edits. Then I tried to run the project and it stayed in the editor. Couldn't see any errors so I tried to drop out of the editor but again it was not responding. I tried the two drop downs on the menus and they dropped down OK. Had to shut down Codea and restart and everything was back to normal. Will try to see if I can duplicate this.

  • SimeonSimeon Admin Mod
    Posts: 5,363

    @Bri_G oh you got that bug too! It happens when Codea can't save your changes. Can you check something for me?

    • Go to Settings app on your iPad
    • Choose "Codea"
    • What do you have listed under "Document Storage" — is it "On my iPad" or something else?

    (I'm trying to fix this at the moment.)

    On search: the plan is to move it to the "Do" menu and use the space on the keyboard for something else

  • Posts: 1,717

    @Simeon - it’s “On my iPad”.

  • SimeonSimeon Admin Mod
    Posts: 5,363

    @Bri_G thanks for checking!

  • Posts: 1,717

    @Simeon - daft question again - how do you delete tabs in the new editor?

  • dave1707dave1707 Mod
    Posts: 8,389

    @Bri_G Drag the tab list down from the top of the screen. Then from the right drag your finger all the way left on the tab you want deleted.

  • SimeonSimeon Admin Mod
    Posts: 5,363

    I think also Edit -> Delete Tab works now

  • SimeonSimeon Admin Mod
    Posts: 5,363

    (I'll be adding the long-press back as well when they are in tab bar mode)

  • Posts: 59

    Here I go again with dependencies:
    Codea 2.8 (160) iPad 12.9 iOS 12.3.1

    1) If you create a new project to use as a dependency and then go into another project to add it; it does not show up in the dependency list. Fully restarting Codea resolves the issue and allows the dependency to be selected.

    2) Using the Beta Setting: New Code Editor allows you to select a dependency, showing the check box as filled. However, the dependency is never loaded. Closing the project and opening it again, removes the check. The same is true for removing dependency. They are not removed in the New Code Editor.

    iPhone Codea Question:
    Codea 2.8 (160) iPhone 8 iOS 12.3.1

    I went shopping with the family today, so I got a chance to use the iPhone version of Codea...Awesome! When using the editor in a project and you touch the tab title, a dropdown menu appears. At the top of the menu there is a button that says “Open Quickly ...” I think it is meant to be a menu title, but it is clickable and flashes when it is clicked. I didn’t notice anything happen. Is there a purpose to the menu button?

  • SimeonSimeon Admin Mod
    Posts: 5,363

    @exomut is issue (1) a new bug for you?

    (2) is a known issue, the new dependency panel there is entirely non-functional still. Sorry for not documenting it

    The "Open Quickly..." menu item is also non-functional at the moment but the plan is to be similar to Shade's "Quick Insert" mode for nodes where you can type a name and fuzzy-match to the tab you want to open. But I might have to take it out for now.

  • Posts: 59

    @Simeon issue (1): I am not completely sure, but I feel like I noticed this issue before joining the beta as well.

    Open Quickly sounds great. Sorry for not knowing much after joining the beta.

    Is this the right place to report bugs for the beta? Should I use Test Flight’s report issue, Trello, or the beta forum (here)?

  • Posts: 1,717

    @dave1707 @Simeon - just to let you know the delete in the edit drop down menu worked but the drag to the left didn’t. Seemed to initially but came back. The drag to the left seemed to be working, the dragged item shrank about half way across then disappeared from the screen but was still in the menu. Closing and re-starting Codea had no effect except for the menu delete option which did remove the tab. Note I had moved all content from this tab to another before deleting. I left only two lines with comments (—) in at the top.

  • dave1707dave1707 Mod
    Posts: 8,389

    @Simeon Issue 1 has been a problem for awhile. I reported something similar when creating tabs. You had to exit Codea and reopen it before the tab was useable. Samething with dependencies. As for the Open Quickly menu, that works just fine. If you have multiple tabs, the Open Quickly shows a list of tabs and tapping a tab in the list opens it.

  • dave1707dave1707 Mod
    Posts: 8,389

    @Bri_G The delete by dragging to the left is a little tricky. You have to be moving to the left before you actually touch the screen. Apparently a touch BEGAN and a touch MOVING do different things.

  • Posts: 1,717

    @dave1707 - that sounds too finicky to be practical. The delete from the edit menu works I’ll stick to that.

  • SimeonSimeon Admin Mod
    Posts: 5,363

    Okay good to know that issue (1) isn't a new bug I've introduced! I've added it to the list to fix

    Yeah the swipe to delete is quite tricky to pull off. It was there as a shortcut, but I think I'll replace it with a long-press context menu in iOS 13

    @exomut there's a Trello here where you can add bugs and other stuff https://trello.com/b/TmqGUHgX/codea but I will track anything you report in the forum too

  • Posts: 1,717

    @Simeon - just encountered a funny, possibly a bug but need to trap error better. I had a function (spy) in a tab to print out variables I was monitoring. I had cut and pasted code from other functions deleting bits I didn’t need and didn’t spot the following error:


    print[touch]

    The call to the function said there was an attempt to call a nil value global ‘spy’’. I tried several approaches changing function name and placing the function in another tab. Still the same. At one stage some code was lost in the function with the cursor at the end of the code. On pressing return the lost code re-appeared. New editor. Hmmm upset Codea!!!

    Changed the brackets to the correct type and all was well again. Is this a bug?

  • edited June 2019 Posts: 1,717

    @Simeon - just noticed when I print a sprite at say 128,128 pixel size, then overprint with an emoji with fontSize(128) then the emoji is smaller than the sprite and not centred where the sprite is (slightly higher). Had noSmooth() and noStroke() set. Are emojis of varying size - they look like vector graphics?

    Edit: this is not consistent different emojis different sizes - need to check these if you intend to use them.

  • edited June 2019 Posts: 1,717

    @Simeon - tried pasting a tab from one project into a temporary page in another with commenting brackets —[[ and —]] encompassing the code. The code did include several — commented lines. But, the pasted code was completely unchanged. Switched into old editor and code was commented out, back to new editor and code was also now commented out correctly.

  • edited June 2019 Posts: 1,717

    p

  • SimeonSimeon Admin Mod
    Posts: 5,363

    @Bri_G thanks for the report on the new editor bug with print[touch] — will see what I can find

    Regarding emoji rendering: emoji are rendered more like text than images. They are vector but they will align to a baseline and follow text alignment settings. Font sizes do not correlate one-to-one with sprite sizes either.

    If you wanted a pixellated emoji you would do better using setContext to render an emoji at a specific scale then upscaling the resulting image and render it with sprite using noSmooth

  • edited June 2019 Posts: 1,717

    @Simeon - thanks for the reply, I've seen instances before when the errors seem to latch onto the function title rather than the specific line - it can just be a bit confusing.

    On the emoji front, after I played around with several different emojis I realised that I was being a little naive expecting the image size produced to fill the rectangular area allocated to it. Powerful though they are emojis do come with application issues if you want to use them. Thanks for the idea of pixelating it - could save the image from that to use as a sprite.

  • Posts: 1,717

    @Simeon couple of issues with new editor. Searching for rect in my code which were all commented (—) out, just to check. The comment lines were not present in the code listing hits on find - no big deal but, the last hit was quoted as on line 35 but was actually line 37. Looks like listing doesn’t count blank lines - two blank lines in code above the last hit.

    Note re-ran this and commented out all rect lines and the search was correct and included the comment lines in the hits ca’t explain. Photo to show this included.

  • SimeonSimeon Admin Mod
    Posts: 5,363

    Thanks for that find. Noted it for fixing

  • dave1707dave1707 Mod
    Posts: 8,389

    @Simeon Here's something that needs a little adjusting. Type the line a=b in setup like I have below and then hit the tab key multiple times to add a comment farther to the right.

    function setup()
        a=b                 -- comment here
    end
    
  • dave1707dave1707 Mod
    Posts: 8,389

    @Simeon Did you remove the automatic collectgarbage(). The below code shows the memory usage. Tap the screen to create a 5,000,000 occurance table and view memory usage. Tap again to clear the table. I was expecting to see memory decrease after awhile, but after 5 minutes memory usage wasn't cleared, but was still increasing. Tap the screen again to force a collectgarbage and memory returns to normal.

    function setup()
        tab={}
        fill(255)
        w=0
        print("tap screen to create table")
    end
    
    function draw() 
        background(40, 40, 50)    
        str=string.format("memory %20.6f",collectgarbage("count"))
        text(str,WIDTH/2,HEIGHT/2)
        text(os.date(),WIDTH/2,HEIGHT-100)
    end
    
    function touched(t)
        if t.state==BEGAN then
            w=w+1
            if w==1 then
                for z=1,5000000 do
                    tab[z]=z
                end
                print("table created, size "..#tab)
                print("tap screen to clear table")
            end
            if w==2 then
                tab={}
                print("table cleared, size "..#tab)
                print("tap screen to collectgarbage")
    
            end
            if w==3 then
                collectgarbage()
                print("collectgarbage")
            end
        end
    end
    
  • Posts: 1,717

    @dave1707 @Simeon - just ran this demo above and the error is obvious.
    Can you both tell me if any project running should hold at a steady memory usage level (as long as there is no interaction). I added an extra line with if w > 3 then collectgarbage() and the memory decreases to ~ 700 and then continues to rise. Repeated touches reduce it to ~700 and the process cycles again. Should the memory usage remain constant?

    This could explain some of the dropouts from Codea I have seen since 160 was introduced.

    If the memory usage continues to rise - what are the activities which cause it?

    My iPad has a lot of memory, is Codea allocated a fixed memory slot by iOS (or a fixed range slot?). The dropouts would be inconsistent - depending on machine memory size etc. Also does Codea free memory up if you switch from one project to the next?

  • dave1707dave1707 Mod
    edited July 2019 Posts: 8,389

    @Bri_G It used to be that memory usage would increase but after maybe 30 seconds there would be an automatic collectgarbage to reduce it. It would drop back down and then increase again. Collectgarbage would kick in again to reduce it. It would continue to cycle that way. I'm not sure in which version this stopped.

    PS. This does the same thing on version 148.

    PS. This does the same thing on my iPad 1 version 1.5.5 (21) .

    If I don't tap the screen and just watceh the memory usage increase, after it reaches a certain point, it start to go down. After awhile it increases again and then starts to decrease. So I'm not sure what's really going on when a large table is redefined.

    So the question is, should we manually collectgarbage when we think we need it or should Codea do an auto collectgarbage.

    If I modify the above code to redefine the table and create the table again when I tap the screen, the memory usage just increases each time until Codea crashes.

  • dave1707dave1707 Mod
    edited July 2019 Posts: 8,389

    @Simeon Run this code. Keep tapping the screen to double the numbers. Eventually Codea crashes.

    PS. The values of vec2, vec3, and vec4 cause Codea to crash at different values. vec4 crashes at the value after (524288.000000, 524288.000000, 524288.000000, 524288.000000).

    function setup()
        a=vec2(1,1)
    end
    
    function touched(t)
        if t.state==BEGAN then
            a=a*2
            print(a)
        end
    end
    
  • dave1707dave1707 Mod
    Posts: 8,389

    @Simeon Should this work or am I expecting something that shouldn't.

    function setup()
        a=vec4(1,1,1,1)
        b=vec4(1,1,1,2)
    
        a=a*b
    
        print(a)
    end
    
  • SimeonSimeon Admin Mod
    Posts: 5,363

    @dave1707 thank you for all the example projects. Will use them tonight to see what's going on memory wise

  • SimeonSimeon Admin Mod
    Posts: 5,363

    @dave1707 the vec types only support scalar multiplication, e.g.,

    number * vec or vec * number

    Are you expecting the a * b would do component-wise multiplication?

  • SimeonSimeon Admin Mod
    Posts: 5,363

    @dave1707 the memory behaviour is interesting. I believe the Lua VM decides when to collect garbage. I'm not sure exactly how it decides but it's supposed to trigger when necessary. The behaviour may have changed as we updated versions of Lua

Sign In or Register to comment.