Henkha Posted February 14, 2017 Report Share Posted February 14, 2017 Hey, I just faced this problem when adding new screen. No matter what I do in between Unilogic crashes every time I try to add a screen in my current project. I tried to open another significantly smaller project and with that i was able to add a screen. Has anyone else had this problem? I hope that there is no maximum number for the screen in project. Problem details says the following,Original solution path: C:\UniLogic\0004_test.ulpr: Quote <<System.FormatException>> from <<PresentationCore>> Token is not valid. -------------------------- { "ClassName": "System.FormatException", "Message": "Token is not valid.", "Data": { "System.Object": null }, "InnerException": null, "HelpURL": null, "StackTraceString": " at MS.Internal.Parsers.ParseColor(String color, IFormatProvider formatProvider, ITypeDescriptorContext context)\r\n at System.Windows.Media.ColorConverter.ConvertFromString(String value)\r\n at Unitronics.HMI.ScreenBase..ctor(HMIScreenBase screenPoco, IHMIMain mainParent)\r\n at Unitronics.HMI.Screen..ctor(HMIScreen screenPoco, IHMIMain mainParent)\r\n at Unitronics.HMI.HMIFactory.CreateHMIScreen(Guid moduleId, HMIScreen screenPoco, Main main)\r\n at Unitronics.HMI.Main.AddScreen(Guid moduleGuid)\r\n at Unitronics.HMI.UI.ViewModels.MainViewModel.AddScreen(SE_Module se_Module, Boolean inEditMode, Int32 insertIndex)\r\n at Unitronics.HMI.UI.Solution_Explorer.SE_Module.AddChild()\r\n at Unitronics.Globals.Commands.DelegateCommand.Execute()\r\n at Unitronics.Globals.Commands.DelegateCommand.System.Windows.Input.ICommand.Execute(Object parameter)\r\n at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)\r\n at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)\r\n at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)\r\n at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)", "RemoteStackTraceString": null, "RemoteStackIndex": 0, "ExceptionMethod": "8\nParseColor\nPresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\nMS.Internal.Parsers\nSystem.Windows.Media.Color ParseColor(System.String, System.IFormatProvider, System.ComponentModel.ITypeDescriptorContext)", "HResult": -2146233033, "Source": "PresentationCore", "WatsonBuckets": null } Link to comment Share on other sites More sharing options...
Saragani Posted February 14, 2017 Report Share Posted February 14, 2017 Do you have a Theme configured for that project? Link to comment Share on other sites More sharing options...
Henkha Posted February 14, 2017 Author Report Share Posted February 14, 2017 Yes, I have some font colors and others but mostly its on defaults. Actually now that i tried to open the theme menu it crashed also. Link to comment Share on other sites More sharing options...
Saragani Posted February 14, 2017 Report Share Posted February 14, 2017 Can you please send me your active Theme? (I hope that the forum will allow you to attach it) I think that one of the colors (I'm suspecting the Screen default color) has no value. I'll be able to track it with no time, and send you a fixed Theme file. Link to comment Share on other sites More sharing options...
Henkha Posted February 14, 2017 Author Report Share Posted February 14, 2017 All I cloud find is this file. I do see my theme listed in the option menu for default theme but don't find a file for it and theme editor in HMI menu crashes. Is this the problem? Has my theme been deleted? Unitronics.Themes.Default.dll Link to comment Share on other sites More sharing options...
Saragani Posted February 14, 2017 Report Share Posted February 14, 2017 Hi, Sorry for the delay (I was in a meeting). I don't need the DLL (The dll is a compiled code), but actually the Theme file you have generated, You can find it at: My Documents\Unitronics\UniLogic\Themes\ Send me the theme you are using, with the matching UniLogic version (for example My Theme_1.18.60.udds) Thanks. Link to comment Share on other sites More sharing options...
Henkha Posted February 15, 2017 Author Report Share Posted February 15, 2017 Sorry I forget to check that path. Here is the file. Theme_1_18_60.udds Link to comment Share on other sites More sharing options...
Saragani Posted February 15, 2017 Report Share Posted February 15, 2017 Ok, I can see the problem. The Themes currently only support colors as background, but the theme file somehow has the background set as an image. I'm guessing it happened after you have set a background image on a screen and then right clicked on it and choose "Set as default for active theme". I've reset the screen background to white color in the attached theme file, so you can overwrite your old one with this one (Close UniLogic before overwriting). I'll open a bug report on this issue. Theme_1_18_60.udds 1 Link to comment Share on other sites More sharing options...
Henkha Posted February 15, 2017 Author Report Share Posted February 15, 2017 Thank you very much for your help. It is working now. It would be nice to have the support for pictures also in the themes. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now