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 for Bug 40237 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
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 15658 [details]
XenAdmin main project compile log
Operating system: Ubuntu 14.04 i386
Mono version: Mono JIT compiler version 4.2.3 (Stable 126.96.36.199/832de4b)
MonoDevelop version: 5.10
I am in the process of building XenAdmin project ( https://github.com/xenserver/xenadmin ) for Linux. I managed to download all the third part dependencies and configured in MonoDevelop. All of the library projects was able to build (at least for Debug target). Finally I tried to build the main project. There was no C# syntax or dependency problems, but one of the fixed and was able to successfully compile al the different dependency projects, but it seems like there is a dependency check done on Mono libraries that failed. The compiler reported 1 error and from the compiler output I could find this line that seems to be the culprit:
Tool /usr/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "Dialogs/ConfirmVMDeleteDialog.resx,obj/Release/XenAdmin.Dialogs.ConfirmVMDeleteDialog.resources"
/usr/lib/mono/4.5/Microsoft.Common.targets: error : Tool exited with code: 1. Output: Error: Exception has been thrown by the target of an invocation.
Inner exception: Member 'ListViewItemCount' was not found.
I attached the full compiler log.
I have an update on the this bug. I have installed mono version 4.5.1 (f959605 / Thu Apr 28 2016). Now I get a System.NullReferenceException in the build of XenAdmin project. I tried to comment out all references to ListViewGroup (which occurs only in two .cs files), but it does not seem to solve the problem even on a rebuild of the project. I have attached a new log containing stack traces.
Created attachment 16173 [details]
XenAdmin main project compile log (mono 4.5.1)
The stack trace does seem to pinpoint the null reference quite clearly. Even thought the exception stack trace is listed several times, they seem to be the same (on a quick glance).
I had a look at the source - I hope I have the correct web page ( https://github.com/mono/linux-packaging-mono/blob/master/mcs/class/System.Windows.Forms/System.Windows.Forms/ListViewGroup.cs ) and I could spot a bug (although it might not be the cause of the exception). If you look at the "items" property, it is initialised by all but one (private) constructor. Yet there is no check ever to determine if it is null when it is used. I suggest that "private ListView.ListViewItemCollection items" is initialized in all constructors irrespective of constructor parameters.