{"id":1410,"date":"2016-08-19T15:26:52","date_gmt":"2016-08-19T20:26:52","guid":{"rendered":"https:\/\/danvanfleet.com\/?p=1410"},"modified":"2016-08-19T15:26:52","modified_gmt":"2016-08-19T20:26:52","slug":"softpro-select-removal-of-token-failed","status":"publish","type":"post","link":"https:\/\/danvanfleet.com\/index.php\/softpro-select-removal-of-token-failed\/","title":{"rendered":"SoftPro Select, Removal of token failed"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/danvanfleet.com\/wp-content\/uploads\/2016\/08\/clip_image001.png\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"alignleft\" style=\"float: left; display: inline; background-image: none;\" title=\"clip_image001\" src=\"https:\/\/i0.wp.com\/danvanfleet.com\/wp-content\/uploads\/2016\/08\/clip_image001_thumb.png?resize=244%2C137\" alt=\"clip_image001\" width=\"244\" height=\"137\" align=\"left\" border=\"0\" \/><\/a>An interesting error occurred with SoftPro Select last week\u00a0while rendering a document. The error was Document error, an error occurred while processing the document: Removal of token &#8216;SoftPro.Documents.Markup.Tokenizer.CommandToken failed.<!--more--><\/p>\n<p>The problem was being caused by something hidden in pasted text. In this case it was a Policy and the field was the legal description. If you&#8217;re running into this issue, consider where the document is obtaining information then\u00a0examine that information. Cleaning up the text, by pasting into Notepad (or <a href=\"https:\/\/notepad-plus-plus.org\/\">NotePad++<\/a> on my machine) and back is the solution. when pasting to multi line fields in Select. (start notepad by clicking the run button and typing notepad.exe)<\/p>\n<p>This issue put a text event in the Windows Event log, Source is SoftPro Select, with the details containing the critical information.<\/p>\n<h3>The first error was:<\/h3>\n<p>The calculation expression could not be compiled. Native return value -1.<br \/>\nExpression= = \u201cTrue\u201d<br \/>\n(1,2) error FC0025: Syntax error.<\/p>\n<p><strong>That is followed by another message:<\/strong><\/p>\n<p>The calculation expression could not be compiled. Native return value -1.<br \/>\nExpression=Not IsEmpty()<br \/>\n(0,0) error FC0029: Invalid unary operand.<br \/>\n(1,13) error FC0041: Syntax error &#8211; expected a field code expression.<\/p>\n<p>Those messages are repeated three more times before giving up and displaying the user error.<\/p>\n<h3>First Call Stack:<\/h3>\n<p>at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)<br \/>\nat System.Environment.get_StackTrace()<br \/>\nat System.Diagnostics.TraceEventCache.get_Callstack()<br \/>\nat SoftPro.Select.LogTraceListener.OnLog(TraceEventCache eventCache, String message, TraceEventType eventType)<br \/>\nat SoftPro.Select.LogTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)<br \/>\nat System.Diagnostics.TraceInternal.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)<br \/>\nat System.Diagnostics.Trace.TraceError(String message)<br \/>\nat SoftPro.Documents.Markup.Translator.Calculator.Calculate(String expression, IServiceProvider sp, Object context)<br \/>\nat SoftPro.Documents.Markup.Translator.InterpreterStrategyEvaluation.IfBlockBegin(InterpretStateParameter interpretStateParameter)<br \/>\nat SoftPro.Documents.Markup.Translator.Interpreter.ProcessCommandToken(CommandToken token)<br \/>\nat SoftPro.Documents.Markup.Analyzer.lexer_Token(Object sender, TokenEventArgs args)<br \/>\nat SoftPro.Documents.Markup.Tokenizer.Lexer.Bless(Token token, Int32 endPosition)<br \/>\nat SoftPro.Documents.Markup.Scanner.ParseStateCommandParams.CommandClose(ParseStateParameter param)<br \/>\nat SoftPro.Documents.Markup.Scanner.Parser.Start()<br \/>\nat SoftPro.Documents.Markup.Analyzer.Run(InterpreterStrategy strategy)<br \/>\nat SoftPro.Documents.Rendering.TextControl.DocumentRenderer.OnDoWork()<br \/>\nat SoftPro.Documents.Client.Rendering.BackgroundRenderer.Run()<br \/>\nat System.Threading.Tasks.Task.InnerInvoke()<br \/>\nat System.Threading.Tasks.Task.Execute()<br \/>\nat System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)<br \/>\nat System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)<br \/>\nat System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)<br \/>\nat System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task&amp; currentTaskSlot)<br \/>\nat System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)<br \/>\nat System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()<br \/>\nat System.Threading.ThreadPoolWorkQueue.Dispatch()<br \/>\nat System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()<\/p>\n<h3>Second Call Stack:<\/h3>\n<p>at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)<br \/>\nat System.Environment.get_StackTrace()<br \/>\nat System.Diagnostics.TraceEventCache.get_Callstack()<br \/>\nat SoftPro.Select.LogTraceListener.OnLog(TraceEventCache eventCache, String message, TraceEventType eventType)<br \/>\nat SoftPro.Select.LogTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)<br \/>\nat System.Diagnostics.TraceInternal.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)<br \/>\nat System.Diagnostics.Trace.TraceError(String message)<br \/>\nat SoftPro.Documents.Markup.Translator.Calculator.Calculate(String expression, IServiceProvider sp, Object context)<br \/>\nat SoftPro.Documents.Markup.Translator.InterpreterStrategyEvaluation.IfBlockBegin(InterpretStateParameter interpretStateParameter)<br \/>\nat SoftPro.Documents.Markup.Translator.Interpreter.ProcessCommandToken(CommandToken token)<br \/>\nat SoftPro.Documents.Markup.Analyzer.lexer_Token(Object sender, TokenEventArgs args)<br \/>\nat SoftPro.Documents.Markup.Tokenizer.Lexer.Bless(Token token, Int32 endPosition)<br \/>\nat SoftPro.Documents.Markup.Scanner.ParseStateCommandParams.CommandClose(ParseStateParameter param)<br \/>\nat SoftPro.Documents.Markup.Scanner.Parser.Start()<br \/>\nat SoftPro.Documents.Markup.Analyzer.Run(InterpreterStrategy strategy)<br \/>\nat SoftPro.Documents.Rendering.TextControl.DocumentRenderer.OnDoWork()<br \/>\nat SoftPro.Documents.Client.Rendering.BackgroundRenderer.Run()<br \/>\nat System.Threading.Tasks.Task.InnerInvoke()<br \/>\nat System.Threading.Tasks.Task.Execute()<br \/>\nat System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)<br \/>\nat System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)<br \/>\nat System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)<br \/>\nat System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task&amp; currentTaskSlot)<br \/>\nat System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)<br \/>\nat System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()<br \/>\nat System.Threading.ThreadPoolWorkQueue.Dispatch()<br \/>\nat System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()<\/p>\n<p>&nbsp;<\/p>\n<p>If you&#8217;re still reading along, the SoftPro Select version is 4.0.30302.62. \u00a0Have you tried\u00a0<a href=\"https:\/\/notepad-plus-plus.org\/\">NotePad++<\/a>\u00a0as a replacement for NotePad yet? \u00a0<a href=\"https:\/\/www.textpad.com\/\">TextPad<\/a> is another fine replacement. I like\u00a0<a href=\"https:\/\/notepad-plus-plus.org\/\">NotePad++<\/a>\u00a0better.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An interesting error occurred with SoftPro Select last week\u00a0while rendering a document. The error was Document error, an error occurred while processing the document: Removal of token &#8216;SoftPro.Documents.Markup.Tokenizer.CommandToken failed.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[23],"tags":[6,39],"class_list":["post-1410","post","type-post","status-publish","format-standard","hentry","category-softpro-2","tag-error","tag-select","entry"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4wyVb-mK","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/danvanfleet.com\/index.php\/wp-json\/wp\/v2\/posts\/1410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/danvanfleet.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danvanfleet.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danvanfleet.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/danvanfleet.com\/index.php\/wp-json\/wp\/v2\/comments?post=1410"}],"version-history":[{"count":4,"href":"https:\/\/danvanfleet.com\/index.php\/wp-json\/wp\/v2\/posts\/1410\/revisions"}],"predecessor-version":[{"id":1415,"href":"https:\/\/danvanfleet.com\/index.php\/wp-json\/wp\/v2\/posts\/1410\/revisions\/1415"}],"wp:attachment":[{"href":"https:\/\/danvanfleet.com\/index.php\/wp-json\/wp\/v2\/media?parent=1410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danvanfleet.com\/index.php\/wp-json\/wp\/v2\/categories?post=1410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danvanfleet.com\/index.php\/wp-json\/wp\/v2\/tags?post=1410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}