These days I tend to get an exception when I'm saving a backtest. I don't know whether the save was successful, but in any case when I exit NM, the backtest is saved and seems to be fine.
This bug seems to occur after I duplicate some chart objects and change their templates.
The relevant stack trace:
Code: Select all
#####-- 08/03/2024 14:37:08 --#####
System.Runtime.Serialization.SerializationException: Type 'NakedMarkets.Classes.GraphicsManagement.Charts.CrossUserGraphObject' in Assembly 'NakedMarkets, Version=1.0.8822.32405, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
at .(Object , Stream , Object , )
at NakedMarkets.Classes.BackTest.SaveBacktest(BackTest backtest)
at .(BackTest backtest, )
at NakedMarkets.MainForm.saveToolStripMenuItem_Click(Object , EventArgs )
at .(Object , Object , EventArgs , )
at NakedMarkets.Classes.Settings.HotkeyDelegate.SaveBacktestForm(Object , EventArgs )
at NakedMarkets.MainForm.(Object , Object , Object )
at NakedMarkets.MainForm.MainForm_KeyDown(Object , KeyEventArgs )
at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Form.ProcessKeyPreview(Message& m)
at System.Windows.Forms.Form.ProcessKeyPreview(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)