Loading 3 resized images mess up going to new scene, on which tableView is.

Hello everyone this seems like a really ‘funny’ bug in corona atm.

So i am in scene1 and wishing to go to scene2 with this params : slideLeft", and some time above 300 doesn’t matter tbh.

on Scene2 i do this: generate newTableView with 3 rows in each row on rowRender i do this: 

—    while my rowHeight is exactly 80

display.newImageRect(file, system.DocumentsDirectory, 62.5, 80)

under file there is string for file, for each row i use different file, all of them got 1350x 500, for example anything above 1200 will show you this bug. All files look exactly the same, there are just individual files, copies of each other heres example:

       if event.row.index == 1 then

     file = “frst.png”

           elseif event.row.index ==2 then

        file = “frst-copy.png”

        else

           file = frst-copy2.png"

        end

— local newImg = display.newImageRect…

newImg.x = 5

newImg.y = rowHeight * 0.5

So my tableView would look exactly the same if i would just do:

     file = “frst.png” for all rows right?

But here is funny thing while i load 3 “diffrent” files for each row transition from going to scene1 to scene2 messes up, scene 2 and 1 are a bit onto each other.

Fix for this is only one so far, either load smaller files or do timer.performWithDelay(1,GenerateTableView)

so my tableView will be generated with delay.

Both solutions are awful and well i find it wrong that i have to do it this way.

My guess of the bug would be something like this:

either corona buffer for loading images is a bit to small ( loading 3 diffrent same files means 3 files in memory instead of 1 if i would load 1).

Would love someone experienced or from corona staff look in this matter.

Again while i do either load just 1 file for each row or even 2 files for example: 

       if event.row.index == 1 then

     file = “frst.png”

           elseif event.row.index ==2 then

        file = “frst-copy.png”

        else

           file = frst-copy.png"

        end

everything works perfectly fine.

Didin’t tried with more then 3 rows.

This is not a good description of your problem and the code is very hard to read. Please format it correctly using the <> button and post full sections of code so that the logic can be seen.

If you are attempting to load multiple large images you may be simply running into memory problems. Have you checked the texture memory usage?

What is the error reported in the console when the problem occurs?

Also, 62.5 is not a valid pixel width:

display.newImageRect(file, system.DocumentsDirectory, 62.5, 80)

there is no error in console, well 62.5 was just sample width i pasted in.

Tried to describe it as good as I could will make sample code then when will get to home and put whole code here.

can’t seem to reproduce that error in home and since i am not able to share code cos i don’t have rights for it marking this as solved

This is not a good description of your problem and the code is very hard to read. Please format it correctly using the <> button and post full sections of code so that the logic can be seen.

If you are attempting to load multiple large images you may be simply running into memory problems. Have you checked the texture memory usage?

What is the error reported in the console when the problem occurs?

Also, 62.5 is not a valid pixel width:

display.newImageRect(file, system.DocumentsDirectory, 62.5, 80)

there is no error in console, well 62.5 was just sample width i pasted in.

Tried to describe it as good as I could will make sample code then when will get to home and put whole code here.

can’t seem to reproduce that error in home and since i am not able to share code cos i don’t have rights for it marking this as solved