I have a new prototype I’m putting together using your build “Daily Full Production 9.0.0.125”. This program uses 2 instances of your WinForm map, and I’ve got the first of the two working well enough for now, so moved onto the second map. I have a brand new otherwise empty UserControl, and all I’ve done is add a WinformsMap and resize it using the designer. With nothing else, no other properties changed, simply running the application results in an exception in the InitializeComponent of the UserControl when trying to set the size. The exception message is as follows:
BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress
StackTrace:
at System.Drawing.BufferedGraphicsContext.Dispose(Boolean disposing)
at System.Drawing.BufferedGraphicsContext.Dispose()
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.fRQ=(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException:
This exception always stops the debugger on the line setting the Size property. I also deleted all the designer generated property setting code and the application will run without error. Simply resize your map in the designer, and I get the error again. Going to the designer generated code and removing the Size property setting code, and the error does not occur.
I’m afraid it’s too late in the day for me to try to create a reduced repro, and I will not be working tomorrow, so I wanted to get this reported for your review before I call it a day. I’ll try to check in tomorrow during the day just in case there is something I can answer. Good luck, and have a great weekend!
BufferedGraphicsContext exception on build 125
Hi Russ,
It’s proved to be a bug which has been fixed in version 9.0.0.129 or later.
Thanks,
Peter