Bug 17597 - UIScrollViewDelegate WillEndDragging broken in latest release
Summary: UIScrollViewDelegate WillEndDragging broken in latest release
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 7.0.6.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 7.0.7
Assignee: Alex Rønne Petersen
URL:
: 17442 17612 ()
Depends on:
Blocks:
 
Reported: 2014-02-04 10:01 UTC by BB
Modified: 2014-02-25 09:01 UTC (History)
9 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
SimpleCollectionView.zip (510.39 KB, application/zip)
2014-02-11 05:28 UTC, Rolf Bjarne Kvinge [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description BB 2014-02-04 10:01:59 UTC
Hi, 

I have an app which has been working fine for ages (up to Xamarin.iOS 7.0.5).

But since I upgraded to Xamarin.iOS 7.0.6.168 or it could have been the  "mono" upgrade I did today, but I can't remember what that was, UIScrollViewDelegate method "WillEndDragging" has stopped working on real devices (it still works in the simulator).

so code such as:

    public override void WillEndDragging(UIScrollView scrollView, PointF velocity, ref PointF targetContentOffset)
    {
        targetContentOffset.X = 198;
    }

works fine on the simulator and makes the scrollView jump to that point. But on an iPhone 5s and iPad mini (both on iOS 7.0.4), the value is ignored - the scrollView just decelerates as usual.

It really looks like this bug has been introduced in the latest release.

Regards,

Bill

VERSION INFO:

=== Xamarin Studio ===

Version 4.2.2 (build 2)
Runtime:
	Mono 3.2.6 ((no/9b58377)
	GTK+ 2.24.23 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302060000

=== Apple Developer Tools ===

Xcode 5.0.2 (3335.32)
Build 5A3005

=== Xamarin.iOS ===

Version: 7.0.6.168 (Business Edition)
Hash: 2ed9bc9
Branch: 
Build date: 2014-21-01 06:33:05-0500

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.10.1 (Starter Edition)
Android SDK: /Users/billbatchelor/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Build Information ===

Release ID: 402020002
Git revision: c5f82958ae7d9af652b44b87ceff777b3ad19b91
Build date: 2013-11-19 15:35:40+0000
Xamarin addins: a4044fee09138f6fd031a9944b7caaeb51e57e80

=== Operating System ===

Mac OS X 10.9.1
Darwin BB-Mac-mini.local 13.0.0 Darwin Kernel Version 13.0.0
    Thu Sep 19 22:22:27 PDT 2013
    root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
Comment 1 Rolf Bjarne Kvinge [MSFT] 2014-02-04 19:06:10 UTC
Is the WillEndDragging method called at all (you can easily confirm this by putting a breakpoint and see if it's hit)?
Comment 2 BB 2014-02-05 07:58:59 UTC
Yes WillEndDragging is called.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2014-02-05 09:47:48 UTC
I can reproduce this modifying the test case for bug #11047 a little bit.
Comment 4 BB 2014-02-05 09:55:19 UTC
OK, when will it be fixed?
Comment 5 Rolf Bjarne Kvinge [MSFT] 2014-02-07 10:53:34 UTC
This regressed in here:
https://github.com/mono/mono/commit/64732bae2740fde32c8641fb855e6fbea91236cc

BB, we're working on fixing it, but I can't say yet when we'll have a fix ready.
Comment 6 BB 2014-02-07 10:57:53 UTC
OK, thanks for the update, Rolf. Can you confirm that the bug was introduced in a recent Xamarin update (and which version?) and is it easy/possible for me to go back to an earlier release which won't have the bug (which release?).
Comment 7 PJ 2014-02-07 11:32:51 UTC
Hi BB,

You can download previous stable versions of the software at https://store.xamarin.com/account/my/subscription/downloads

You'll just need to hit the OSX dropdown under Xamarin.iOS like so: http://screencast.com/t/XsQMv7CL
Comment 8 Rolf Bjarne Kvinge [MSFT] 2014-02-10 06:55:58 UTC
Alex,

I believe this commit is not correct: https://github.com/mono/mono/commit/64732bae2740fde32c8641fb855e6fbea91236cc

In the commit message you say "Use d14 and d15 as scratch VFP registers." - however the ARM calling convention document [1] section 5.1.2.1 says: "Registers s16-s31 (d8-d15, q4-q7) must be preserved across subroutine calls", which means you can't use d14/d15 as scratch VPF registers.

Disassembly of broken method:   https://gist.github.com/rolfbjarne/2d200c0e8d3ed6531df8
Disassembly of working method: https://gist.github.com/rolfbjarne/a7ab236d6434866197b0

Note how s28 is used in line 75-76 in the broken version.

[1] http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf
Comment 9 Rolf Bjarne Kvinge [MSFT] 2014-02-10 07:13:56 UTC
*** Bug 17442 has been marked as a duplicate of this bug. ***
Comment 10 BB 2014-02-10 11:47:00 UTC
Since this is a regression and there is no workaround - can the importance be changed to something higher than "normal"?  Can you give some indication of when this will be fixed and make it into a release? This is potentially holding up out next app release if not fixed soon...
Comment 11 Zoltan Varga 2014-02-10 17:49:14 UTC
Rolf: Commited a fix as mono 620efd4c33099b477230397dbf109bbb83fabd77/mt 62dc43309cbf77063e303234a0cb93e59b8150eb.
Comment 12 Sebastien Pouliot 2014-02-10 21:42:38 UTC
QA: this was picked up into the 7.0.7 hotfix. Please verify.
Comment 13 Rolf Bjarne Kvinge [MSFT] 2014-02-11 05:28:36 UTC
Created attachment 6023 [details]
SimpleCollectionView.zip

Attaching my test project (which confirms this is fixed).

QA: to test this bug: run the app on device, and try to scroll/swipe sideways. If the scrolling stops the moment you lift the finger, the bug is fixed. If the scrolling continues smoothly, the bug is not fixed/regressed.
Comment 14 Rolf Bjarne Kvinge [MSFT] 2014-02-11 05:40:07 UTC
*** Bug 17612 has been marked as a duplicate of this bug. ***
Comment 15 Atin 2014-02-11 11:15:24 UTC
Today, we have checked this issue, using attached sample in Comment 13 but we are not able to scroll or swipe on device. We are getting same behavior on simulator as well as on device.

Screenacast: http://screencast.com/t/M3uNq5VyGNs

Environment details:
ML 10.8.5
XS 4.2.4(build 14)- d36f82139fd61a0cda68d5baabb1c7b8402116b9
MT 7.0.7
Xcode 5.0
Device info: iPhone 4 7.0.4
Comment 16 Rolf Bjarne Kvinge [MSFT] 2014-02-11 11:26:15 UTC
@Atin, the expected behavior is to not be able to scroll.
Comment 17 Atin 2014-02-11 11:51:29 UTC
Today, we have checked this issue with:

ML 10.8.5
XS 4.2.4(build 14)- d36f82139fd61a0cda68d5baabb1c7b8402116b9
MT 7.0.7
Xcode 5.0
Device info: iPad 7.0.4

Now this issue is working fine, the scrolling stops when we lift the finger from iPad screen. Hence marking this as Verified
Comment 18 Matt Jones 2014-02-25 08:58:47 UTC
Any danger of releasing MT 7.0.7 soon? We could really do with this fix.
Comment 19 Sebastien Pouliot 2014-02-25 09:01:25 UTC
7.0.7.2 is already in the beta channel. It should be promoted to stable soon.