Bug 57260 - Random crash when binding
Summary: Random crash when binding
Status: ASSIGNED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-06-07 23:04 UTC by Jim Bennett
Modified: 2017-06-12 22:42 UTC (History)
2 users (show)

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


Attachments
Stack trace of crash (9.82 KB, text/rtf)
2017-06-07 23:04 UTC, Jim Bennett
Details
Stack trace of crash on Android (4.65 KB, text/rtf)
2017-06-12 22:42 UTC, Jim Bennett
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 for Bug 57260 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
ASSIGNED

Description Jim Bennett 2017-06-07 23:04:53 UTC
Created attachment 22758 [details]
Stack trace of crash

We've seen a crash happen in our app just on iOS a couple of times when binding happens during a UI update. It looks like the binding tries to get a value and crashes, maybe because the binding context is not there as the UI is changing. It's not reproducible, just has happened a couple of times during testing.

A stack trace is attached - it would be good if a binding operation was able to fail without killing the app.
Comment 1 Jimmy [MSFT] 2017-06-08 20:29:41 UTC
My initial thought after seeing the crash log is that there might be a handler attached to an object that is still receiving events and trying to access an object that might already be collected.

What version of Xamarin.Forms are you using? Did you start seeing the crash after updating to this version? Have you noticed any patterns of when it does occur, such as after navigating to another page? Also, are you only seeing this on iOS, or on the platforms as well?
Comment 2 Jim Bennett 2017-06-08 21:41:47 UTC
That was my thoughts as well - just a bad timing issue, a property change was raised but the object was GC'd before it could get the value.

We've seen it twice so far, just on iOS using 2.3.4.247. It's a rare crash and not reproducible so it may have been an issue with older versions but we didn't see it. It happens when navigating to a different page.
Comment 3 Jim Bennett 2017-06-12 22:42:53 UTC
Created attachment 22841 [details]
Stack trace of crash on Android

I'm also seeing a similar crash on Android - same thing, data update when navigating. It's impossible to ensure data is not updated when navigating so it would be good for the binding to not crash the app if the widget is disposed.