roubachof / Sharpnado.CollectionView

A performant list view supporting: grid, horizontal and vertical layout, drag and drop, and reveal animations.
The Unlicense
245 stars 30 forks source link

Droid: suspend-resume cycle freezes Sharpnado or the entire app #62

Closed mkrnic closed 1 year ago

mkrnic commented 2 years ago

We have encountered a problem on actual devices. Emulators are fine.

SHCV is in grid mode.

After the app is resumed (either through Android app switch or device lock-unlock), Sharpnado likes to freeze. It's dead, won't respond to scrolling. Rebinding it may throw a blank screen, or freeze the app entirely.

I have tried many things after the app is resumed, such as forcing a rebind through ItemsSource = null, then ItemsSource = something, resetting and restoring CurrentIndex, changing the layout to vertical and back to grid... There's either an app freeze (Android offers to wait or kill the app), or a Sharpnado freeze, where it won't respond to scrolling, after it takes 15 seconds to rebind to an actual ItemsSource (initial bind on app load is quick). Tried Device.BeginInvokeOnMainThread. Task.Delays. Etc. Nothing works. :(

Have you encountered anything like that, and what are we doing wrong?

roubachof commented 2 years ago

Never heard of that....

mkrnic commented 2 years ago

Oh boy. :D

We'll see tomorrow if there's something silent thrown in the Output window...

mkrnic commented 2 years ago

OK, so it happens on a Galaxy Tab A7. We have a couple more devices, everything is fine there. It's also fine in all the emulators I tried.

But we have no idea why it happens. The Tab A7 is currently unavailable to connect via cable (covid, remote work, etc). We'll see if anything pops up then.

It's probably something akin to what I mentioned in #54 - when I tried using SHCV on a special phone page, and the mere presence of two databound labels made the renderer go crazy if SHCV is also present.

roubachof commented 2 years ago

yeah, since it's not supported I wouldn't use this property if it causes any issue... Or if you really wanna use it, you will have to fix it through a PR