The Named Pipe Server is called from a client with commands which it executes in some of these commands(functions) I update a Tag.
Now I got an error, here is the relevant part of the logfile
2014-02-07 12:22:13,913 [13] FATAL Neo.ApplicationFramework.Common.Runtime.GlobalsBase [(null)] - Unhandled Exception causing shutdown.
System.ArgumentException: Item has already been added. Key in dictionary: 'Neo.ApplicationFramework.Generated.Screen1/Default' Key being added: 'Neo.ApplicationFramework.Generated.Screen1/Default'
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at Neo.ApplicationFramework.Common.Runtime.GlobalsBase.a2(Object A_0, Object A_1, String A_2)
at Neo.ApplicationFramework.Common.Runtime.GlobalsBase.at(IScreen A_0)
at Neo.ApplicationFramework.Common.Runtime.GlobalsBase.GetScreenObject(Type type, String instanceName)
at Neo.ApplicationFramework.Common.Runtime.GlobalsBase.GetScreenObject[T](String instanceName)
at Neo.ApplicationFramework.Common.Runtime.GlobalsBase.GetScreenObject[T]()
at Neo.ApplicationFramework.Generated.ScriptModule1.UpdateOrderNo(String msg) in c:\LaMine\Hmi IX files\LaMine_Mk2_119_ix200\ScriptModule1.Script.cs:line 332
at Neo.ApplicationFramework.Generated.ScriptModule1.StartOrder(String msg, String& response) in c:\LaMine\Hmi IX files\LaMine_Mk2_119_ix200\ScriptModule1.Script.cs:line 353
at Neo.ApplicationFramework.Generated.PipeServer.ThreadStartServer() in c:\LaMine\Hmi IX files\LaMine_Mk2_119_ix200\ScriptModule1.Script.cs:line 448
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
As I see it the error is that I (or someone) is trying to add an item to a dictionary but the Key already exists.
The dictionary seems to be: 'Neo.ApplicationFramework.Generated.Screen1/Default'
Where and what is this dictionary?
The code that is run in UpdateOrderNo(string msg) look like this:
Code: Select all
public void UpdateOrderNo(string msg)
{
OrderNo = msg;
// Call to an external Assembly/Dll
le.SetOrderNumber(OrderNo);
Globals.Tags.OrderNo.Value = OrderNo;
Globals.PopupLoad.Show();
// here is line 332
Globals.Screen1.Show();
}
Anyone that have an idea on what's wrong??
// Anders