Jump to content

Error when adding new screen with a theme


Recommended Posts


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:



<<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=, 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


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)



Link to comment
Share on other sites

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.





  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...