RicoSuter / MyToolkit

MyToolkit for .NET
http://mytoolkit.io
Microsoft Public License
339 stars 76 forks source link

ScrollableHtmlView random scroll jumps on Windows Mobile 10 #42

Open ovinix opened 8 years ago

ovinix commented 8 years ago

I'm having scrolling issue with ScrollableHtmlView then setting a big amount of HTML. It's connected with usability. So then slowly scrolling up a huge HTML page in ScrollableHtmlView from the page bottom, it's randomly jumping to the top of the page, like there is nothing in between (finger should be "on the screen" while scrolling).

I've found there is #region Scroll jumping fix in ScrollableItemsControl.cs file applied to WP8 || WP7. Maybe something similar for WinRT/WM10 is needed?

ovinix commented 8 years ago

I've recorded some video on which it's easier to see the problem. Page there is without images, with images scroll performance even worse.

Video is here - https://www.dropbox.com/s/ra41myk3jpcxvc1/P1010911.MOV?dl=0

RicoSuter commented 8 years ago

This is the issue, but i dont think this is the same problem.

https://blog.rsuter.com/jumpy-listbox-while-scrolling-in-windows-phone-7-5/

RicoSuter commented 8 years ago

Do you also encounter this issue when no header and footer template is set?

ovinix commented 8 years ago

It seems yes, problem is not the same. I tried without header and yes, issue is still the same.

ovinix commented 8 years ago

I can copy/paste my cleaned html with and without images, if needed.

ovinix commented 8 years ago

Oh, and one more thing. On really long pages with images sometimes I can't scroll to the bottom, then scrolling fast. So it's going to some edge and after that it's jumping a bit upper. Further efforts to scroll down repeating previous algorithm and after some time app randomly can crash.

ovinix commented 8 years ago

I've just achieved crash described above and there is no error message at all. App crashing and debug just stops. Only message is The program '[1920] PlayUA.mini.exe' has exited with code -1073741189 (0xc000027b). in Output window.

ovinix commented 8 years ago

I set debugger type to 'Native Only' and what I had in Output:

Exception thrown at 0x76C7E243 in PlayUA.mini.exe: Microsoft C++ exception: _com_error at memory location 0x03CF7558.
Exception thrown at 0x76C7E243 in PlayUA.mini.exe: Microsoft C++ exception: _com_error at memory location 0x03CF8038.
Exception thrown at 0x76C7E243 in PlayUA.mini.exe: Microsoft C++ exception: _com_error at memory location 0x03CF81D8.
Unhandled exception at 0x76F4E031 (combase.dll) in PlayUA.mini.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x0A8FFF78, 0x00000001).

Call Stack - http://i.imgur.com/tr75g7H.png

I think crash is separate issue more connected with memory management. I had similar error for HtmlView with large amount of html ( I asked about that here - http://stackoverflow.com/questions/32954696/mytoolkit-reduce-memory-usage )

RicoSuter commented 8 years ago

Maybe its only a problem when in debug mode? Do you see the same behavior in release mode with .NET Native?

RicoSuter commented 8 years ago

I think its a bigger problem to improve the perf... Ill also look into it as soon as possible...

ovinix commented 8 years ago

Sorry, but I don't know how to set release mod with .Net Native for Windows Phone WinRT application. I set debugger type here - http://i.imgur.com/LBqNcxi.png

I deployed my app in Release mode and scrolling behavior is the same as on video.

As for crashes, they are rare on my 920 and happening just in few big html posts with images. They are not really critical for now. Scrolling performance is much more important..

ovinix commented 8 years ago

Because my current app version in Windows Store using ScrollView with HtmlView and scrolling is perfect but there are a lot of app crashes due to lack of virtualization for big posts. So I decided to change to ScrollableHtmlView and 'scrolling jumps' issue is almost the only I have now.. Thank you for trying to improve this!

ovinix commented 8 years ago

I've recorded a new video with some other kind of 'scrolling jumps' issue. You can see on the video that there is no bug on the top of HTML page, but there is one on the bottom, similar to the previous scrolling issue.

Link to video - https://www.dropbox.com/s/ld614r6mgvhwr39/P1010912.MOV?dl=0