@Simeon the missing 'unpack' leads to an error in my app, but the error is not located in my code and i don't have any dependencies! See the attached image- I guess it must be some behind the scenes code- Does it ring a bell?
@dave1707 i don't know! Can it be the Codea code itself? As you can see in the image of the error message, the name of the class in which the error occurs is missing. Seems to be something connected to tweens.
If the error is in a dependency-will the class/function where the error is located be written in the error message? Anyway i don't have any dependencies.
@piinthesky I tried running all my tween examples and finally ran into one that gives the same error that you show. I’ll try to narrow it down and see what’s happening and get an example for @Simeon .
@piinthesky Here’s a speed test I did on the current and previous Codea versions. I used my pi program to calculate various digits of pi. Here’s the results in seconds. The new version is first. Looks like it’s about 1.7 times faster.
@Simeon I did speed tests on some other programs I have and on one there wasn’t any increase. On another there was a slight increase. So I guess the speed increase depends on what commands are being used. The pi program does a lot of calculations and table manipulation before it outputs an answer. The other programs just do simple calculations and screen displays throughout the run. So I would say there won’t be a speed increase for the average user doing graphic type output.
@Simeon - had a funny when installing latest version. Seemed to install OK but zwhen I ran it it fired up the project screen and froze with a whit dialogue box including the word Cancel present in it. Had to switch of iPad and re-run to get it to work OK. Also, then didn't get a crash on running first project. Wonder if it's associated with the latter but changes in your code has changed the response when first run?
Seems to run fine now, editing seems a little slicker and more robust. Thanks for the update now looking into changes you made.
@RonJeffries There’s just the one option so far. I guess there will be more in the future. loadstring should be replaced with load. Replace unpack with either string.unpack or table.unpack.
I'm seeing what appear to be crashes, sometimes. I'll be in Codea, in the editor, slide to a new app, typically Scrivener or Working Copy, then slide back and Codea is starting up and I have to re-select the program I'm working on. I don't think it's losing edits.
I have no solid reproduction: it just happens sometimes.
@RonJeffries that is most likely a memory management issue in your iPad, do you have background app refresh on and do you have many apps open at once when this does happen?
@RonJeffries thanks for the report, that is odd. You're on the release version?
When asked to share analytics with developers (I believe it's a question when you set up your iPad initially) did you choose to share? If so, I may have access to the crash logs
(I don't include any other crash logging in Codea due to wanting to maintain user privacy and ensure consent before collecting analytics, and what Apple collects on my behalf, with user consent, is very basic and completely anonymised so I feel comfortable using the data to improve the product)
@RonJeffries thanks for the report, I've been doing a lot of code editor updates so this is timely. I've also released 3.2.12 with an attempt to fix the crashes I think you are experiencing
@Simeon Since you’re updating the editor, here’s something to fix. If you try to place the cursor at the end of a line 2 lines above the keyboard, the code moves up and the cursor is one line down left justified. If you try to place the cursor at the end of a line just above the keyboard, the code moves up and the cursor is two lines down left justified.
@Simeon@fave1707 - this was an issue raised a while ago, amongst a number of issues. In addition I noticed when you paste code into a blank tab the corsor ends up in the middle of the last end statement. Also when trying to place the cursor at the end of the code is difficult the cursor seems to jump up a line. This makes pressing to get the exit menu difficult.
Also may be associated is placement of code in indented code - if you want to add extra code to the indented code it goes in without indentation so you have to tab out again.
It's almost like some formatting has been deleted from the code affecting cursor position. There should be blank lines after the bottom of any code tab.
@Simeon - on the subject of editor issues I have a problem sometimes with selection of code.
Example - in landscape I often want to select some functions which when selected reaches the bottom of the tab. The keyboard is usually present taking up half the screen. Scrooling the selection area from top to bottom when you reach the bottom the selection menu appears. Taking your finger off the selection handle the selection menu disappears. Trying to get it back by touching the bottom selection handle, more often than not results in deselection. May be tied to the problems at the bottom of the code - no blank lines, mentioned above.
Global Replace should be renamed to Global Destroy This Program. I makes random changes in random locations, reorders lines, something something impossible to predict or explain. Aside from that, if you want to destroy your program, it's great.
To duplicate: in a multi-tab program, open a Find, set up and execute some global replace. Change what's in the find, what's in the replacement, do another. Repeat a few times. Observe program is scrambled. I'll see if I can create a better example after I thank God for Working Copy and Git.
@RonJeffries sorry about that, it sounds frustrating and I'm glad you had everything in Git. I've added it to my list to audit the feature and see what the problem is
Comments
@Simeon the missing 'unpack' leads to an error in my app, but the error is not located in my code and i don't have any dependencies! See the attached image- I guess it must be some behind the scenes code- Does it ring a bell?
@piinthesky See my above post for unpack.
@dave1707 using your prescription i fixed the unpacks in my code, but this in not in my code but elsewhere.
@piinthesky Where or what is the code you’re using that you can’t fix.
@dave1707 i don't know! Can it be the Codea code itself? As you can see in the image of the error message, the name of the class in which the error occurs is missing. Seems to be something connected to tweens.
If the error is in a dependency-will the class/function where the error is located be written in the error message? Anyway i don't have any dependencies.
@piinthesky I tried running all my tween examples and finally ran into one that gives the same error that you show. I’ll try to narrow it down and see what’s happening and get an example for @Simeon .
I had a small example, but I guess I don’t need it now.
@dave1707 did it happen with tweens which have a callback on completion? That's where I can see the old code
Also in Lua 5.4 there are some new variable types.
Const variables:
And to-be-closed variables
@Simeon Yes, it was caused by the callback. When I removed the callback it didn’t crash.
@Simeon thanks look forward to the fix.
I read Lua 5.4 is faster. Did you notice any speed up?
@piinthesky I'll have to reload the previous Codea version and run a speed test to see if there’s a difference.
@piinthesky Here’s a speed test I did on the current and previous Codea versions. I used my pi program to calculate various digits of pi. Here’s the results in seconds. The new version is first. Looks like it’s about 1.7 times faster.
digits
That's an impressive performance boost
Codea ver 255. Tween crash fixed.
@Simeon tween works good for me now.
@Simeon I did speed tests on some other programs I have and on one there wasn’t any increase. On another there was a slight increase. So I guess the speed increase depends on what commands are being used. The pi program does a lot of calculations and table manipulation before it outputs an answer. The other programs just do simple calculations and screen displays throughout the run. So I would say there won’t be a speed increase for the average user doing graphic type output.
Seems to run fine now, editing seems a little slicker and more robust. Thanks for the update now looking into changes you made.
are there supposed to be editor options? i just see format on paste.
codeaunit crashes looking for loadstring??
now "load". and table.unpack, grr
@RonJeffries There’s just the one option so far. I guess there will be more in the future. loadstring should be replaced with load. Replace unpack with either string.unpack or table.unpack.
curiously, but perhaps not surprisingly, myVec:unpack() works.
Wrong, my bad
I'm seeing what appear to be crashes, sometimes. I'll be in Codea, in the editor, slide to a new app, typically Scrivener or Working Copy, then slide back and Codea is starting up and I have to re-select the program I'm working on. I don't think it's losing edits.
I have no solid reproduction: it just happens sometimes.
@RonJeffries that is most likely a memory management issue in your iPad, do you have background app refresh on and do you have many apps open at once when this does happen?
a few but i also have a huge ipad memory. it rarely if ever happened on the previous version
@RonJeffries thanks for the report, that is odd. You're on the release version?
When asked to share analytics with developers (I believe it's a question when you set up your iPad initially) did you choose to share? If so, I may have access to the crash logs
(I don't include any other crash logging in Codea due to wanting to maintain user privacy and ensure consent before collecting analytics, and what Apple collects on my behalf, with user consent, is very basic and completely anonymised so I feel comfortable using the data to improve the product)
Yes, I have Share with App Developers turned on.
@Bri_G Go into Settings, about 3 groups down look for Privacy. There’s different analytics there.
@RonJeffries I've attempted a fix for these crashes in 3.2.12
@dave1707 - found privacy and list of apps that have requested analytics but Codea is not present.
@Bri_G possibly because you are on the beta version — I get your crash logs through TestFlight
@Simeon thanks!
lines with
self._foo
references do not highlight the_foo
butself.foo
does highlight.@RonJeffries thanks for the report, I've been doing a lot of code editor updates so this is timely. I've also released 3.2.12 with an attempt to fix the crashes I think you are experiencing
@Simeon Since you’re updating the editor, here’s something to fix. If you try to place the cursor at the end of a line 2 lines above the keyboard, the code moves up and the cursor is one line down left justified. If you try to place the cursor at the end of a line just above the keyboard, the code moves up and the cursor is two lines down left justified.
@dave1707 is this a new bug in 3.2.12?
@dave1707 I see what you mean though, I'll see what I can do
@Simeon Thats was an existing bug for awhile. I just kept forgetting about it until you mentioned you were working on the editor.
Also may be associated is placement of code in indented code - if you want to add extra code to the indented code it goes in without indentation so you have to tab out again.
It's almost like some formatting has been deleted from the code affecting cursor position. There should be blank lines after the bottom of any code tab.
@Simeon - on the subject of editor issues I have a problem sometimes with selection of code.
Example - in landscape I often want to select some functions which when selected reaches the bottom of the tab. The keyboard is usually present taking up half the screen. Scrooling the selection area from top to bottom when you reach the bottom the selection menu appears. Taking your finger off the selection handle the selection menu disappears. Trying to get it back by touching the bottom selection handle, more often than not results in deselection. May be tied to the problems at the bottom of the code - no blank lines, mentioned above.
exported apps seem not to be exported with the icon (corrected). we can test that by loading the program on another tablet.
@RonJeffries do you mean your projects don't carry across when you install Codea on another device?
no, i mean that the saved project icon does not come over when i load a project on another ipad via a zip file.
Oh that's odd, I'll give it a try
Global Replace should be renamed to Global Destroy This Program. I makes random changes in random locations, reorders lines, something something impossible to predict or explain. Aside from that, if you want to destroy your program, it's great.
To duplicate: in a multi-tab program, open a Find, set up and execute some global replace. Change what's in the find, what's in the replacement, do another. Repeat a few times. Observe program is scrambled. I'll see if I can create a better example after I thank God for Working Copy and Git.
@RonJeffries sorry about that, it sounds frustrating and I'm glad you had everything in Git. I've added it to my list to audit the feature and see what the problem is