Exception in Demo1's CollapsingRecordNode

Hello Walter.
I am trying to call “Collapse()” on an itemList which was added to the collapsing record node, but after I exit the “Collapse()” method, I get “Parameter not valid” exception with the following stack trace:
at System.Drawing.Drawing2D.GraphicsPath.AddArc(Single x, Single y, Single width, Single height, Single startAngle, Single sweepAngle)
at Northwoods.Go.GoRoundedRectangle.MakeRoundedRectangularPath( GraphicsPath path, Single offx, Single offy, RectangleF rect, SizeF corner)
at Northwoods.Go.GoListGroup.GetPath(Single offx, Single offy)
at Northwoods.Go.GoListGroup.PaintDecoration(Graphics g, GoView view)
at Northwoods.Go.GoListGroup.Paint(Graphics g, GoView view)
at Northwoods.Go.GoGroup.Paint(Graphics g, GoView view)
at Northwoods.Go.GoLayer.Paint(Graphics g, GoView view, RectangleF clipRect)
at Northwoods.Go.GoView.PaintObjects(Boolean doc, Boolean view, Graphics g, RectangleF clipRect)
at Northwoods.Go.GoView.PaintView(Graphics g, RectangleF clipRect)
at Northwoods.Go.GoView.onPaintCanvas(PaintEventArgs evt)
at Northwoods.Go.GoView.OnPaint(PaintEventArgs evt)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEve ntArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(M essage& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Mes sage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MS G& msg)
at System.Windows.Forms.Application.ComponentManager.System.Win dows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMes sageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoo pInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoo p(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Demo1.MainForm.Main(String[] args) in C:\Program Files\Northwoods Software\GoDiagram Win 2.4.1\Samples\Demo1\MainForm.cs:line 1554
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssem bly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Perhaps I’m going about this the wrong way – if so, how can I collapse/expand certain lists of the collapsing record node (just like double clicking does).
Thank you.

P.S. to test this, I have added a menu item with the following handler in the view:
public void item_collapsed(object sender, EventArgs e)
CollapsingRecordNode node = null;
foreach (GoObject obj in this.Doc) {
node = obj as CollapsingRecordNode;
if (node == null)

That sounds like a GDI+ bug. We have updated DLLs that work-around that and fix a few other bugs.

I’m afraid that this didn’t really help. I still get the crash - I have checked that the updated DLL is the one being used, however I still crash upon collapsing.

How did you check that the newer DLL is being used?

You might want to use ILDASM to make sure your EXE is referring to the correct four-part version number.

Hello Walter.
Sorry, couln’t reply yesterday.
Anyway, I’ve ran the demo on a clean machine (without any previous installation of GoDiagram), linked to the Northwoods.Go.DLL locally, and with license.licx file updated to v2.4.2.2 .
Unfortunately I’ve had the same result - it crashed upon collapsing and painted the document white with big red cross.
Please advise :)
Thank you.

Well, I can’t reproduce this. Can you get any more information about the GoRoundedRectangle that can’t be painted? Or any information in the debugger regarding the arguments being passed to Graphics.AddArc?
The GDI+ bug is that very small positive arcs cause it to raise an exception, just as you have seen. We added a work-around, basically to not call Graphics.AddArc, in such cases. But perhaps we didn’t catch all the cases of this, or perhaps there’s a different GDI+ bug that we don’t know about.

Well, good news.
I was able to solve this, even with v2.4.1.1 of GoDiagram.
After debugging and reading the reference manual for quite a while, I solved the problem by calling ComputeBounds() after LayoutChildren(null) at the end of Collapse() and Expand() functions, and it worked - no exception.
Anyway, Walter, thank you for all the help. Hopefully this problem is solved for good :)
edit: P.S. I have sent an e-mail with my findings about the bug. Hope you got it.

I have updated the kits (ZIP files containing DLLs) listed above.
Thanks, hmemcpy, for your help in tracking down the problem!

My pleasure, Walter.