Open rubiomiguel06 opened 3 years ago
@rubiomiguel06 I've been moving these cats around for awhile now and I'm not getting any crashes
I'm testing on an S9 and not seeing anything. Do you see this issue on any simulator versions? Can you try the latest 5.0 prerelease to see if you are having issues there?
@PureWeen thanks for trying to get the error. Unfortunately I'm just starting my vacation days, so until I come back I won't be able to test with the latest 5.0 prerelease. But please, don't close this issue for inactivity. This will be the first thing I'll focus on as soon as I am back. Anyway, did you try it using UXCam? I'll also try to make a sample where the use of UXCam is not needed, since it makes it difficult to test.
Hi @PureWeen, I've tested the latest 5.0 release and the problem persists.
One thing I've just found out is that the exception occurs only for Android 10 devices (or at least I wasn't able to reproduce it on other Android versions, excepting Android 11 which I could not test yet because I don't have a device or simulator with this version).
Please try the example I attach below where I added a UXCam key and updated the Xamarin.Forms version to the latest available one (v5.0.0.1874). Running it on Debug mode on an Android 10 device or simulator (connected to internet, so UXCam works), after some drags and drops, the exception should arise.
I've tested on the Android simulator Pixel 2 Q 10.0 - API 29 with the expected results (exception occurring after moving containers around).
Thanks for the attached repro sample!. I have not managed to get the crash dragging several times in Android simulator Pixel 2 Q 10.0 - API 29. @PureWeen Could you try the attached repro sample?
@jsuarezruiz thanks for trying to reproduce it on your side! One question, did you run the sample on Debug mode and with an internet connection? I ask you because I didn't get any new sessions on the UXCam analytics dashboard.
Hi @rubiomiguel06 i tried to reproduce and frag and drop the cards a lot of times and i wasn't able to make it crash. Anything special ? tested Pixel 2 simulator API 29
Hi @rmarinho, thanks for giving it a try. I ask you the same I did to @jsuarezruiz : did you run the sample on Debug mode and with an internet connection? I haven't seen any activity log on the UXCam analytics. I attach a video showing the crash I get.
The steps are:
Hi, @rubiomiguel06 - thanks for elaborating. Confirming that I'm able to reproduce this on XF 5.0 on visual studio. Interestingly (although perhaps irrelevant), I was unable to reproduce the issue on VSMac. As you mentioned, I do think this may be a performance issue related to the speed and # of times in which the drag-and-drop is performed
Hi, we've had a customer come to us with this particular issue. The stack traces are pointing to the setting of the onTouchListener. Any updates on this? Thanks!
I'm now running into a similar issue too
This ended up being an issue related directly with UXCam Android. They have fixed it and the issue is gone. I will close it
I'm still getting a similar issue on a page that contains a Listview, and some users one some devices seem to be able to trigger the issue repeatedly, but I've not been able to do it on any device I've tried so far. The google play store automated test does trigger this failure on one of their test devices (but not always), and viewing the video and trying to reproduce their interaction yelded no results :( there's no drag and drop, no fancy behaviours, just a list that can be tapped on to call a command.
This is not an issue related with UXCam Android, the SDK is just adding a onTouchListener to views and it throws this exception. To avoid crashing apps we have disabled one of our features on the latest version of our Xamarin SDK. This is still a Xamarin issue, the views should not be throwing this exception on a simple onTouchListener.
I think I may have reproduced the app hanging/crashing on my own device (very little details on what is actually going on). The trick was going onto the accessibility settings on my android 11 device toggling "Remove animations" to ON. Then, when I'm triggering an action which will dismiss my current page (built with rg plugin popup) the app stops working with the dreaded "unable to activate instance" error. So, disabling animations makes things go bang...
ok, a bit more information - it seems that the popup page goes bang when animations are disabled and you replace the contents of the page, eg setting this.Content
to a blank grid (or whatever you may want, we had an activity indicator) made it explode. this then bubbles up to the default renderer constructor failure that ultimately takes down the application.
Description
I created a custom control called DragAndSwapContainer which implements two custom behaviors: DragBehavior and DropBehavior.
DragBehavior basically adds a PanGestureRecognizer to the View and emits an event when the View is being 'dragged' (and also translates the view according to the Pan done by the user). On the other side, DropBehavior listens to this events and emits other events when a View is passing over the container or when a View is dropped inside.
DragAndSwapContainer acts as a container that can receive other views, and as a draggable and droppable view at the same time. The goal of this container is to enable the user to swap between two views by dragging and dropping one into the other one.
When a View is dropped inside this Container what I do is, basically, to swap the Children Views that both containers have (the one with the view that was dragged, and the one receiving the dropped view). Here's a piece of code for the DragAndSwapContainer (which inherits from Grid):
Since each View can have only one parent, this works fine: Child View is exchanged by the DragAndSwapContainers.
Everything works fine as respects to iOS and Windows, but I am facing some problems with Android.
I am getting the following error https://github.com/xamarin/Xamarin.Forms/pull/8888 when swapping two views. After some debugging I conclude that the problem arises because while swapping the children Android native renderers are disposed, so I lose track of the View.
Also it is something that doesn't happen always, seems that there's some timings issues. If I attach my Analytics service (which reports to a cloud server and adds some overhead) the issue happens way more often.
The error mentioned seems to be fixed in the Xamarin.Forms version I have (since it was merged already in v4.4.0) but I'm still having the exact same error call stacks.
I managed to recreate this problem in a separate project (see attached) but only if using UXCam Analytics.. Unfortunately I couldn't reproduce it (at least in a fast reproducible way) without the use of UXCam, and I'm unable to share the AppKey I use to start a UXCam session through here.
Here's the error I get when the app crashes:
Steps to Reproduce
Expected Behavior
App shouldn't crash and should work as it does on UWP and iOS
Basic Information
Reproduction Link
DragAndDrop.zip
Screenshots