Exception occurs when trying to import a *.ten file
Posted: Tue Dec 04, 2007 8:40 pm
Exact exception:
System.Reflection.TargetInvocationException was unhandled
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.RuntimeMethodHandle.SerializationInvoke(Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
at Steema.TeeChart.Import.TemplateImport.Load(Stream stream) in C:\TCC\Development\3rd Party\Source\TeeChartNetV3\Sources\TeeChart\Export\Exports.cs:line 3298
at Steema.TeeChart.Import.TemplateImport.Load(String fileName) in C:\TCC\Development\3rd Party\Source\TeeChartNetV3\Sources\TeeChart\Export\Exports.cs:line 3332
at Steema.TeeChart.Import.TemplateImport.LoadFileDialog() in C:\TCC\Development\3rd Party\Source\TeeChartNetV3\Sources\TeeChart\Export\Exports.cs:line 3356
at GridFun.Form1.button1_Click(Object sender, EventArgs e) in C:\TCC\Projects\Temp\GridFun\GridFun\Form1.cs:line 25
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.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)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at GridFun.Program.Main() in C:\TCC\Projects\Temp\GridFun\GridFun\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I created the ten file by using the export feature from the standard chart editor
The exception occured in Export.cs file at
public Chart Load(Stream stream)
{
IChart tmpChart = chart.parent;
Export.SerializeBinder b = new Export.SerializeBinder();
b.BindToType(Texts.TeeChart, "Chart");
BinaryFormatter deserializer = new BinaryFormatter();
deserializer.AssemblyFormat = FormatterAssemblyStyle.Simple;
deserializer.Binder = b;
chart.RemoveAllComponents();
chart = (Chart)deserializer.Deserialize(stream); <- EXCEPTION
if (tmpChart != null)
I imported this TEN file by calling
tChart1.Import.Template.LoadFileDialog();
in a button_click event. Then browsed to the file.
I am using TeeChart.NET 3.2.2831.26851
I have uploaded CausesException.ten file to the Uploads area.
System.Reflection.TargetInvocationException was unhandled
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.RuntimeMethodHandle.SerializationInvoke(Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
at Steema.TeeChart.Import.TemplateImport.Load(Stream stream) in C:\TCC\Development\3rd Party\Source\TeeChartNetV3\Sources\TeeChart\Export\Exports.cs:line 3298
at Steema.TeeChart.Import.TemplateImport.Load(String fileName) in C:\TCC\Development\3rd Party\Source\TeeChartNetV3\Sources\TeeChart\Export\Exports.cs:line 3332
at Steema.TeeChart.Import.TemplateImport.LoadFileDialog() in C:\TCC\Development\3rd Party\Source\TeeChartNetV3\Sources\TeeChart\Export\Exports.cs:line 3356
at GridFun.Form1.button1_Click(Object sender, EventArgs e) in C:\TCC\Projects\Temp\GridFun\GridFun\Form1.cs:line 25
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.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)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at GridFun.Program.Main() in C:\TCC\Projects\Temp\GridFun\GridFun\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I created the ten file by using the export feature from the standard chart editor
The exception occured in Export.cs file at
public Chart Load(Stream stream)
{
IChart tmpChart = chart.parent;
Export.SerializeBinder b = new Export.SerializeBinder();
b.BindToType(Texts.TeeChart, "Chart");
BinaryFormatter deserializer = new BinaryFormatter();
deserializer.AssemblyFormat = FormatterAssemblyStyle.Simple;
deserializer.Binder = b;
chart.RemoveAllComponents();
chart = (Chart)deserializer.Deserialize(stream); <- EXCEPTION
if (tmpChart != null)
I imported this TEN file by calling
tChart1.Import.Template.LoadFileDialog();
in a button_click event. Then browsed to the file.
I am using TeeChart.NET 3.2.2831.26851
I have uploaded CausesException.ten file to the Uploads area.