Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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
GitHub or Developer Community 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.
Description of Problem:
When using .net localization, a call to TableLayoutPanel.ColumnStyles.Clear() or TableLayoutPanel.RowSyles.Clear() raises
System.NullReferenceException: Object reference not set to an
instance of an object
at System.Windows.Forms.TableLayoutStyleCollection.Clear ()
[0x00000] in <filename unknown>:0
at Test_TableLayoutPanel.Form1.button1_Click (System.Object sender,
System.EventArgs e) [0x00000] in <filename unknown>:0
Steps to reproduce the problem:
1. Create a new windows application project in Visual Studio (I tested only
with .net 2)
2. Add a TableLayoutPanel to the form
3. Add a button that calls tableLayoutPanel1.ColumnStyles.Clear()
4. Enable Localizable property of Form
5. Compile in Visual Studio
When clicking the button the above exception is raised.
Same behavior like without localization enabled: No exception.
How often does this happen?
Always (when localized)
No need to actually add a second language - the behavior can be seen after setting Localizable to true.
Tested with following envorinments:
- Windows 7 32 bit / Mono 2.20.4
- Linux Ubuntu 10.04 32 bit / Mono 2.4.4
- Linux Ubuntu 11.10 alpha 32 bit / Mono 2.10.3
Created attachment 234 [details]
Please attach a test case next times.
Created attachment 710 [details]
patch that fixes crash.
Nit: shouldn't it be an ArgumentNullException?
Otherwise, looks good to me, please commit.
Thanks for the review.
done commits b8fb0fe96fe3fccdb3a3f40defc89b04c43bc4d9 in b67c792ec351d47fe354764ca349220faaefa374
Sorry for the two commits :(
Thanks. And sorry it took me so long to check out your patch (missed the notification mail somehow).
Marking as fixed.