Brushes error

Topics: Bugs
Aug 8, 2013 at 6:43 PM
Edited Aug 8, 2013 at 6:43 PM
Hi,

I have been using GMap.NET for a while: it's great.

Recently I updated to the latest version, but I encountered a bug:


An exception of type System.ArgumentException occured in System.Drawing.dll but was not handled in user code.
Additional information: Changes cannot be made to Brush because permission are not valid.
There is a handler, the pogram maybe safely continued.



The program wasn't able to continue.

I have read online that the issue may be that some uses Brushes.Red for example, and some other part of the code wants to change a property of this immutable Bush.

Anyone got any idea how to fix this? My program became unusable after upgrading :-(
Aug 8, 2013 at 7:11 PM
After some debugging it appears to be in
"ScalePen.Dispose();"

In GMapControl
Aug 8, 2013 at 7:12 PM
Solved when I don't do
ScalePen = Pens.Black

Maybe something that can be fixed?
Coordinator
Aug 9, 2013 at 4:17 PM
i see, ok