Exception on paste operation

When I do copy/paste operation on the node the exception throws
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at System.Runtime.InteropServices.ComTypes.IDataObject.GetData(FORMATETC& format, STGMEDIUM& medium)
at System.Windows.DataObject.OleConverter.GetDataInner(FORMATETC& formatetc, STGMEDIUM& medium)
at System.Windows.DataObject.OleConverter.GetDataFromOleHGLOBAL(String format, DVASPECT aspect, Int32 index)
at System.Windows.DataObject.OleConverter.GetDataFromBoundOleDataObject(String format, DVASPECT aspect, Int32 index)
at System.Windows.DataObject.OleConverter.GetData(String format, Boolean autoConvert, DVASPECT aspect, Int32 index)
at System.Windows.DataObject.OleConverter.GetData(String format, Boolean autoConvert)
at System.Windows.DataObject.GetData(String format, Boolean autoConvert)
at System.Windows.Clipboard.GetDataInternal(String format)
at System.Windows.Clipboard.GetData(String format)
at Northwoods.GoXam.CommandHandler.PasteFromClipboard()
at Northwoods.GoXam.CommandHandler.Paste()

You can reproduce it on the demo project with the Dynamic Ports sample. How can I avoid this exception?

This is with GoWPF, right?

I’m sorry, but I’m unable to reproduce any copy/paste problem using the Dynamic Ports sample.
Could you tell me how to produce the exception?

Yes

[QUOTE=walter]I’m sorry, but I’m unable to reproduce any copy/paste problem using the Dynamic Ports sample.
Could you tell me how to produce the exception?
[/quote]
I run the GoWPFDemo project from VS, select the Dynamic Ports sample, select any node (for example the Unit two), then enter Ctrl-C (copy) and Ctrl-V (paste). In the Output window in the VS I saw the exception. Note however the node copy was made.
In my project I need override the PasteFromClipboard() but I cannot because of this exception throws.

OK, I tried again, debugging GoWpfDemo with both our DLL and with our source/project.

I even tried setting Debug | Exceptions… to break on any throw of System.OutOfMemoryException.

But I’m sorry, it always worked without any exception.

So I can’t explain any error you are getting if you are using the unmodified Dynamic Ports sample of GoWpfDemo.

But I can guess that you might get that exception if your data class is not declared to be Serializable.