Knowledge Base
Knowledge BaseSubject: | Fatal Crash when opening WireCAD |
---|---|
Status |
Resolved |
Product | WireCAD v8 |
Product Level | PRO |
Database Type | SQL Server |
Build Number (last 4 digits of version) | 1367 |
Upload | No file! |
Message
So I tried to debug my plugin using Visual Studio 2015 and added WireCAD to the debug process to start as external program. I get the following exception:
System.Xml : System.InvalidOperationException
There is an error in XML document (34, 7).
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
at WireCAD.Plugins.PluginSerializer.LoadFromFile(String fileName)
at WireCAD.PluginIntegration.PluginIntegration.LoadPlugins(String Path, Workspace ws)
at WireCAD.frmMain.frmMain_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at DevExpress.XtraEditors.XtraForm.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at DevExpress.XtraEditors.XtraForm.WndProc(Message& msg)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Now I want to start WireCAD the normal way and I get the same exception. WireCAD is unresponsive and unusable. I reinstalled WireCAD already but it makes no difference.
After deleting all the files that are on the PC within WireCAD folders and then installing WireCAD again makes it work again but (of course) all my settings are lost.
I can't see what XMl is causing this exception so it's very difficult to find the source.
Did I broke it for good? Better way of attaching to the wirecad .exe?
System.Xml : System.InvalidOperationException
There is an error in XML document (34, 7).
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
at WireCAD.Plugins.PluginSerializer.LoadFromFile(String fileName)
at WireCAD.PluginIntegration.PluginIntegration.LoadPlugins(String Path, Workspace ws)
at WireCAD.frmMain.frmMain_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at DevExpress.XtraEditors.XtraForm.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at DevExpress.XtraEditors.XtraForm.WndProc(Message& msg)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Now I want to start WireCAD the normal way and I get the same exception. WireCAD is unresponsive and unusable. I reinstalled WireCAD already but it makes no difference.
After deleting all the files that are on the PC within WireCAD folders and then installing WireCAD again makes it work again but (of course) all my settings are lost.
I can't see what XMl is causing this exception so it's very difficult to find the source.
Did I broke it for good? Better way of attaching to the wirecad .exe?
02-December-2015 (02:03 PM)
I would venture to say that it is the *.wpi file in the /WireCAD8/bin/plugins folder.
There is an application level setting that let's plugin initialization errors go unreported. They are logged though.
At what point in the execution are you pausing to attach the debugger?
There is an application level setting that let's plugin initialization errors go unreported. They are logged though.
At what point in the execution are you pausing to attach the debugger?
02-December-2015 (03:13 PM)
I start wirecad from visual studio, so i don't use attach to process..
02-December-2015 (04:22 PM)
How are you doing that. Can you provide the steps?
02-December-2015 (04:28 PM)
1. Start Visual Studio 2015 as administrator.
2. Build project in Bin folder of wirecad (as Debug)
3. I have edit the properties of my project to start with an external program:
Properties of project -> Debug -> Start Action -> Start external program.
4. Start Debugging (F5).
5. Visual Studio is starting the WIreCAD.exe and i can see all the .dll that are loaded and all the statics of the proces.
6. The debugger pauses with this exception when loading plugin.
I already deleted my plugin to see if this is the problem but the exception stays.
2. Build project in Bin folder of wirecad (as Debug)
3. I have edit the properties of my project to start with an external program:
Properties of project -> Debug -> Start Action -> Start external program.
4. Start Debugging (F5).
5. Visual Studio is starting the WIreCAD.exe and i can see all the .dll that are loaded and all the statics of the proces.
6. The debugger pauses with this exception when loading plugin.
I already deleted my plugin to see if this is the problem but the exception stays.
02-December-2015 (04:44 PM)
The last .dll that is loaded is the pinout tool. after that the XML exception is given.
02-December-2015 (04:45 PM)
If you put a breakpoint in the Load method of the IPluginCore interface is it being hit or are you not getting that far?
When you say that you removed your plugin did you remove the wpi file and the dll?
Call me if you want me to take a look at it.
CBH
When you say that you removed your plugin did you remove the wpi file and the dll?
Call me if you want me to take a look at it.
CBH
02-December-2015 (04:56 PM)
I put all the information in the plugin and made it an AD plugin so i could get rid of the WPi File, wrong move? I removed the dll, the debug file and the config file of my plugin.
i'm not in the office at the moment, I will take a look tomorrow! Thanks for the help so far and i will keep you posted.
Tim
i'm not in the office at the moment, I will take a look tomorrow! Thanks for the help so far and i will keep you posted.
Tim
02-December-2015 (05:15 PM)
The exception seems to be coming from the wpi loaded plugins. I would remove all the wpi files and see if it loads. I can confirm that I can start the project as you have done on my machine. I can place breakpoints in the code and they are hit.
CBH
CBH
02-December-2015 (05:25 PM)
1 Question before i go to bed: What is the best way to get a new sysname. I already found the sysnamehelper class but i couldn't figger out yet how it works. (that's why i like to debug so bad). My import tool is nearly complete, this is the last big step!
02-December-2015 (05:27 PM)
I am emailing you a script for the sysname assignment
03-December-2015 (03:24 AM)
So I’m very happy at the moment because the problem is fixed! I reinstalled WireCAD one again and noticed that a wpi file was kept in the WireCAD folder. It was called "myPlugin.wpi" and was copied from my visual studio project. After the clean install and deleting this file from my project the exception is gone.
Also stopped copying all the references to the WireCAD bin folder, I don't know if this make any difference.
The WPI tip was very useful thanks!
Also stopped copying all the references to the WireCAD bin folder, I don't know if this make any difference.
The WPI tip was very useful thanks!
03-December-2015 (04:31 AM)
Thanks for the script as well!
03-December-2015 (04:50 AM)
Great. I don't think you had to reinstall just remove the wpi file that was pointing to nothing. I did not fiddle the project references before debugging but yours should already be pointing at the /bin folder anyway.
I would love to see your work when you get done if you are willing to show it. I get a kick out of seeing what other people do with WireCAD.
CBH
I would love to see your work when you get done if you are willing to show it. I get a kick out of seeing what other people do with WireCAD.
CBH
03-December-2015 (03:14 PM)
09-December-2015 (06:20 AM)
09-December-2015 (06:20 AM)