Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Black bars around image
Started by davidgmonical Apr 17 2019 03:05 PM

4 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

davidgmonical

[GLOBAL: userInfoPane.html]
davidgmonical
  • Enthusiast

  • 93 posts
  • Corona SDK

I have a very large tableview (almost 1000 rows) and in each one I'm displaying an image and some text.

 

About 2/5 of the way down the tableview, the images begin to display with black rectangles (maybe 10 pixels wide) on each side.

 

Given that the images are no different than the ones displaying correctly (same format, same size), and that the code for displaying them is the same too, I'm a little lost as to what it could be.

 

My gut tells me it has something to do with the texture memory of such a large tableview, but I'm not sure.

 

Anyone experience something similar or have ideas how to solve this?

 

Thanks!



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,913 posts
  • Enterprise

The widget.newTableView() only renders the rows that are on screen and maybe a couple of screen to keep memory resources down, so I doubt it's texture memory. 

 

But my question is do you really need 1000 rows in your tableView? Are your users really going to scroll through that many rows? You may be hitting other memory limits trying to build a table that big.

 

Rob



[TOPIC: post.html]
#3

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 2,110 posts
  • Corona SDK

I have many tableViews of 500 rows (fed from a remote DB) and can confirm they work as expected



[TOPIC: post.html]
#4

davidgmonical

[GLOBAL: userInfoPane.html]
davidgmonical
  • Enthusiast

  • 93 posts
  • Corona SDK

@Rob The app is a port of an existing app that has these massive tableviews. So unfortunately I do at least for now need them.

 

@SGS if it's working with 500 for you I'm not sure what would be different. I suppose I do have more than 500 rows so maybe as Rob said, I'm hitting some sort of memory limit while you are not?

 

This is just such an odd bug. For now I've placed white rectangles over the black bars that appear, but it's sort of a hacky fix.



[TOPIC: post.html]
#5

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 2,110 posts
  • Corona SDK

Are your images getting corrupted?  Are they local or remotely loaded? Is this on device or only on sim?

 

Are you tracking your memory usage when this happens?

 

Have you tried 500 or 250 rows?


  • sporkfin likes this


[topic_controls]
[/topic_controls]