Codea 3.5 version (327)

@jfperusse Perfect, the warning’s gone now. Thanks! :smile:

@Simeon With version 326, it takes a long time for dependencies to open. Once it opens, scrolling thru them is very slow.

The other things under Do open immediately.

Checked different iPads.

On the iPad Air 4 it opens immediately.
On the iPad Pro 1 it takes 5 seconds.

@dave1707 please let me know if the dependencies behave better for you in the latest beta

@Simeon

The search/replace seems to work OK.
The yellow leftover from a search doesn’t hang around anymore.
The dependency list and scrolling looks like it’s back to normal.
Dragging a running project from the left side to the right and then back again doesn’t crash Codea.

Not sure what the Codea reference problem was, didn’t test that.

@Steppers - bingo, the changes you listed enabled the installation to proceed, there was a very quick alert that followed with an Updating message that seemed to go on and on. Also when I touched the screen and moved my finger the text was repeated blurring the screen.

Closing WebRepo down with the top left corner X and rerunning worked OK. Thanks.

@Bri_G Glad that helped.

The project does usually seem to go a bit dodgy after the update so that’s nothing out of the ordinary. I should probably just close the project instead.

Latest version crashes on launch on jailbroken devices, it seems, at least on iOS14.6.

Edit: My post is incomplete, even though I typed a lot of stuff that I won’t type again.

Edit2: I realized I can’t use emojis here. Everything I typed after an emoji, didn’t get posted.

I’m a noob, so Obj-C is stuff I won’t learn in the near future. Just wanted to let you know about the crash on launch for us, “rogue” users of the iOS ecosystem.

Thanks for this tool! I’ll stick to 3.4.7 for now and see what I can learn and might as well start posting here as I make some progress, if any.

@sebgo that’s odd! We didn’t really do anything to change the way Codea starts up. I don’t suppose you had access to a crash log or anything we could trace with

@Simeon - had a number of crashes today with latest beta. They were all tied to memory in that I was continually loading images in the draw function.

But, Codea/iPad didn’t issue a crash report. Do you expect that from excessive memory demands?

@Bri_G iOS doesn’t consider an ‘Out-Of Memory’ crash a crash per-se.

As far as iOS is aware, the App just uses too much memory so it kills the process. No crash report is created for that.

The only thing Codea could really do about that is to identify at launch if the app was closed in an unexpected way during the previous session. I’ve spent a lot of time in the past working on something like this for some resource heavy iOS games and it’s not the most reliable.

iOS issues ‘Low Memory’ events to an application when they near the limit but often with games it’s difficult to process and react to those in time when the memory usage spikes during resource loading. By the time the app processes the event it can already be too late and the OS has killed the process.

@Stepprrs - thanks for the reply, thought that was probably the case - just my bad programming. IOS must allocate each app a fixed memory size (dependent on system memory) to be able to survive that. Could it be possible to hold the free memory in a variable and stop processing when it gets down to say last 10% and fir up an error. We could monitor it then in development to help tidy up our processing,?

@Simeon I grabbed this file from the analytics section under iOS’s privacy settings. It’s not like I’m hoping you’ll fix it, though, as I don’t know if that’s even useful.

Thanks @sebgo! I’ll see if I can symbolicate it

I don’t think it’s up to you to figure anything out, though, since I’m the one running a modified OS, which developers aren’t meant/obliged to support. If it runs on stock OS, then everything’s fine.

Ps: I don’t use cracked apps, just in case the thought crosses your mind.

@sebgo that’s totally fine. I think it might be more of an issue of Codea not running on iOS 14 than on jailbroken devices (though I’d like it to work on both)

@sebgo it was an iOS 14 incompatibility. Now fixed in version 3.5.1 on the App Store

i’m still playing around with shaders and i came across an issue where arrays can only be 200 in length? @John is that a hard set configurations that you can increase? i think the max should be 16000? https://stackoverflow.com/questions/28921126/opengl-use-large-100k-uniform-array-in-shader

but also it looks like texel functions are missing in the shader implementation, will these be available in Codea 4 or any plans on adding them?
https://www.khronos.org/opengl/wiki/Sampler_(GLSL)#Direct_texel_fetches

@John @Simeon actually i was able to get a minimum repro working here - looks like the limit is 1020 and then the image doesn’t render anymore, i had other arrays before so it seems like a cumulative limit for number of shader variables? if i tally up all the uniforms with the array it’s 1024


function setup()
  parameter.number("xVal", 0, 100, 0)
  parameter.number("yVal", 0, 100, 0)  
  m = mesh()
  m:addRect(WIDTH/2,HEIGHT/2,600,600) 
  m.texture = asset.builtin.Cargo_Bot.Codea_Icon
  m.shader = shader (vert, frag)
  numInstances = 150
  xValTable = {}
end

function draw()
  background(118, 33, 125)
  for i =1, 200 do
    xValTable[i]=xVal*i
  end
  m.shader.xVal = xValTable
  m.shader.yVal = yVal
  m:draw(numInstances)
  FPSOverlay.draw()
end

vert=[[
#extension GL_EXT_draw_instanced: enable     
uniform mat4 modelViewProjection;
attribute vec4 position;
attribute vec2 texCoord;
varying vec2 vTexCoord;
uniform float xVal[1019]; // set 1020 to trigger render error
uniform float yVal;
varying lowp float index;

void main() {
  index = float (gl_InstanceIDEXT);
  vTexCoord = texCoord;
  float xOffset = ceil(float(xVal[gl_InstanceIDEXT]));
  float yOffset = yVal;
  vec4 offset = vec4(xOffset, yOffset, 0, 0);
  gl_Position = modelViewProjection * (position+offset);
}
]]

frag=[[
#extension GL_EXT_draw_instanced: enable     
precision highp float;
uniform sampler2D texture;   //diffuse map
varying vec2 vTexCoord;
varying float index;

void main() {
   gl_FragColor = texture2D(texture, vTexCoord);
}
]] 




@skar - works when you comment out FPSOverlay.draw(). Impressive effect.

@Simeon - when you tap on edit and do menu items the respective windows stay open and only disappear if you use a command from them. Tapping the menu item does work but it is difficult to find. Tapping within the tab doesn’t close the window (which should be the default). Is this a hangover from the latest iOS three dot menu at the top of the screen?