Hello! I made this program, and it crashes on second line.
[lua]print(“image load attempt”);
local imgtest = display.newImageRect(“data/monkey.png”, 1920, 2016);
print(“image load success”);[/lua]
Also tried this:
[lua]print(“start”);
local imgjnk1 = display.newImageRect(“data/10240.png”, 1024, 1024);
local imgjnk2 = display.newImageRect(“data/10241.png”, 1024, 1024);
local imgjnk3 = display.newImageRect(“data/10242.png”, 1024, 1024);
local imgjnk4 = display.newImageRect(“data/10243.png”, 1024, 1024);
imgjnk1:removeSelf();
imgjnk2:removeSelf();
imgjnk3:removeSelf();
imgjnk4:removeSelf();
collectgarbage();
print(“image load attempt”);
local imgtest = display.newImageRect(“data/monkey.png”, 1920, 2016);
print(“image load success”);[/lua]
It crashes as soon as it reaches the imgtest line.
It is interesting to say that in this case it generates lots of messages of growing heap.
Among other tests: Tried to load much more images in the memory (like 100mb) before trying to loading this image. Tried to swamp the memory with doubles (creating a arrays of NUMBERs) of about 256mb before loading the image.
Tried to load the image later, earlier, in other ways…
None of that worked, the thing just crash with out of memory error, always, no matter where or when I try to load it, or what image as long it is bigger than 1024x1024
And like I said, it worked fine with the Marmalade version of the app (in fact to make the Corona version I copied and pasted most of Marmalade code and edited to make the syntax fit Lua instead of C)