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 3961 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
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 1533 [details]
resgen uses the Icon.InitFromStreamWithSize method to create a .resource file from a .resx file. If the Icon in the .resx file has a 256x256 PNG icon as one of its parts, the method will strip the PNG out. However, the method doesn't adjust the offsets in the Icon before writing it out. This causes the application to crash when it runs because it looks for the icon data in the wrong place. Attached is a patch to fix the issue and a C# project to test it.
To test error
1. Build the application normally
3. Receive an error when trying to load the image with the PNG in it
To test the fix
1. Apply the patch to the current Mono install.
2. Delete the Form1.resources file to force MonoDevelop to rebuild it
3. Build the application normally
5. The images should now appear properly regardless of which button is selected
Created attachment 1534 [details]
I think this has been fixed in master.