Bug 37221 - LinearGradientBrushTest crash in sysdrawing-coregraphics
Summary: LinearGradientBrushTest crash in sysdrawing-coregraphics
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Drawing ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: kenneth.pouncey
Depends on:
Reported: 2015-12-22 05:15 UTC by Chris Hamons
Modified: 2017-10-12 12:07 UTC (History)
4 users (show)

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

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 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.

Related Links:

Description Chris Hamons 2015-12-22 05:15:09 UTC
Note - This is for sysdrawing-coregraphics version of System.Drawing, not the libgdiplus version. This might not be in the right category.

While porting it to Unified, all of the samples ran successfully (from what I can tell), except one. LinearGradientBrushTest crashed in 3 of its cases, and all of the crashes appear to be in the same.

Steps to reproduce:

- Clone git@github.com:mono/sysdrawing-coregraphics.git
- Checkout unified
- Make to build the bindings
- open Samples/MonoMac/LinearGradientBrushTest/LinearGradientBrushTest.csproj
- Remove the three early return "returns" in Samples/MonoMac/LinearGradientBrushTest/DrawingView.cs
- Run. Press any key a few times to cycle to the "bad" samples (5,11,14) and you'll crash.
Comment 1 Chris Hamons 2015-12-22 15:52:16 UTC
The stack trace:

Comment 2 Miguel de Icaza [MSFT] 2015-12-23 03:39:54 UTC
I am unable to repro.

on a related note, should we merge unified into master?
Comment 5 Miguel de Icaza [MSFT] 2015-12-24 00:45:49 UTC
My bad, I did not follow the instructions.
Comment 6 kjpou1 2015-12-29 14:04:36 UTC
I have fixed the the three crashes but there are problems with the gradients in general.  Not even normal gradients are working correctly.  The code needs to be torn into to find the root of the gradient rendering.  This was working quite well before so not sure where the rendering problems are coming from.
Comment 7 kenneth.pouncey 2015-12-30 06:40:08 UTC
Commit applied and LinearGradient brush should be fixed now.  https://github.com/mono/sysdrawing-coregraphics/commit/b48472529c1f93f4e39f7f018156f23a61f69f11
Comment 8 Marek Safar 2017-10-12 12:07:48 UTC
Closing as the issue seems to be resolved.

Other sysdrawing-coregraphics issues are tracked at https://github.com/mono/sysdrawing-coregraphics/issues