@Simeon This also causes the problem. So it doesn’t matter where the loop is, setup() or draw(). It seems to be related to a loop and closing the program by sliding right from the left side of the screen.
@Simeon - had two crashes with 280 today. One when I was editing, deleting a variable. The other just randomly. Couldn’t tie in any actions to the crashes.
@Simeon - this is a bit off the wall, it involved using Air Code and a browser.
I set up to use Opera on my Mac and connect to Codea. I opened a Craft project, the Catalogue Cube latest from @dave1707 and tried to paste some of the scene definitions in another project into it to a change the scene colouring. My iPad threw up an error 'Main:9: attempt to index a nil value (global ‘scene’) stack traceback: Main:9: in function ‘setup’ '.
After disconnecting and running the exact same project (unchanged) on my iPad there was no error.
I’m know that you may not be interested in the Aircode issue, but I thought it may give a pointer into current issues with 280.
@Simeon this seems very strange to me, maybe it’s a clue to something?
Start a new project, do a select all, and then paste this code on top of it, so that there is nothing else at all in the project.
This code runs a loop that you can escape by tapping q on the on screen keyboard, and every time it loops it calls background() with a pink color.
Run it and tap q very quickly, or else there’s a memory overload or something and it crashes.
The screen is all black until you tap q, at which point you’ll see the screen flash pink and black over and over and over. It’s like each background() command got saved up and was trying to execute all at once.
But the weirdest thing of all, to me, is that all this drawing is occurring even though there’s no draw() function in the project.
-- Delayed Drawing Bug
function setup()
runLoop()
end
function runLoop()
local buffer = ""
viewer.mode = OVERLAY
showKeyboard()
while buffer ~= "q" do
background(236, 67, 201)
buffer = keyboardBuffer()
bufferLength = string.len(buffer)
buffer = string.sub(buffer, string.len(buffer))
end
hideKeyboard()
end
…it seems like weird behavior to me, maybe it’s a clue to what might be going on with loops?
@UberGoober That’s probably not a bug, but just the screen refreshing. This code below does the same thing. Slide the screen from the left edge to the right to exit the code.
@Simeon - posted several times with a problem crashing 280 when trying to run an old project by @JMV38 which dealt with demonstrating Blend Modes. Crashed after loading and trying to run. Then subsequently crashed whilst trying to save & Run before the Save&Run menu was visible.
@dave1707 - thanks for the info. Did you go through the lines one by one to find them? I started trying to block out routines to try to localise the cause but ran out of free time. I’ll dig into that to see if I can find the root cause. Thanks again.
It’s the top slider that causes the problem. Played with the others to good effect but when I used that an error message was given. Also changed some of the colours of the images.
@Bri_G I finally got the error. I was constantly sliding the top slider back and forth. Without any line numbers or anything else, there’s probably no way to find the error.
@dave1707 - thanks for checking in out. Must be a particular combination of changes or possibly too rapid change causing an issue. @Simeon may be able to identify the cause from the error reports.