Bug 57963 - Using BindingList in DataGridView crashes (TargetException)
Summary: Using BindingList in DataGridView crashes (TargetException)
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Community
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-06 02:04 UTC by Leo
Modified: 2017-09-01 11:55 UTC (History)
1 user (show)

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


Attachments
Program file (2.65 KB, text/plain)
2017-07-06 02:04 UTC, Leo
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 57963 on GitHub or Developer Community 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: GitHub Markdown or Developer Community HTML
  • 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:
NEW

Description Leo 2017-07-06 02:04:10 UTC
Created attachment 23318 [details]
Program file

The attached sample program throws exception when running on Centos 6.5 with Mono.
It looks like using base/derived classes to construct BindingList and passing it to DataGridView as a BindingSource makes Mono framework to throw System.Reflection.TargetException. Interestingly first object in the list determines if the exception is going to be thrown or not. If the first object is of base class type everything is fine, if the first object is of derived type the application crashes. For example, in the attached example changing the type of the object to 'Knight' in line 19 makes the application run.