JL Forums

Unhandled Exception of TBS on less than < character

0 Members and 1 Guest are viewing this topic.

Offline aerch

Unhandled Exception of TBS on less than < character
« on: December 01, 2011, 10:06:11 AM »
I don't know why, but I found that if I have the character less than "<" in my article, TBS will give unhandled exception.

It is easy to reproduce this problem (hope it doesn't happen only on my machine). Just input anything then the less than character. For example, input this in TBS textbox:

testing <


Then press "Everyone's Favorite" and try to do replace. An exception will occur. The following is the full error message. Hope it can get solved. Thanks so much.


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at TheBestSpinner.SpinDocument.ReplaceAllFast(Hashtable& favs, String& txt, Boolean nobrackets, String startLevel, String endLevel, Boolean replaceInSpin)
   at TheBestSpinner.GlobalCode.ReplaceFavorites(OpenSpinDocument& osd, FavoritesCategoryOptions options, Hashtable& favs, String txt)
   at TheBestSpinner.GlobalCode.DoReplaceFavorites(OpenSpinDocument& osd, FavoritesCategoryOptions options, Boolean getOptions)
   at TheBestSpinner.MainForm.toolReplaceMyFavorites_ButtonClick(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripSplitButton.OnButtonClick(EventArgs e)
   at System.Windows.Forms.ToolStripSplitButton.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at Syncfusion.Windows.Forms.Tools.ToolStripEx.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3623 (GDR.050727-3600)
    CodeBase: file:///E:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
TheBestSpinner
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.0.0
    CodeBase: file:///E:/Program%20Files/TheBestSpinner3/TheBestSpinner.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3624 (GDR.050727-3600)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3623 (GDR.050727-3600)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Syncfusion.Tools.Windows
    Assembly Version: 9.203.0.137
    Win32 Version: 9.203.0.137
    CodeBase: file:///E:/Program%20Files/TheBestSpinner3/Syncfusion.Tools.Windows.DLL
----------------------------------------
Syncfusion.Shared.Base
    Assembly Version: 9.203.0.137
    Win32 Version: 9.203.0.137
    CodeBase: file:///E:/Program%20Files/TheBestSpinner3/Syncfusion.Shared.Base.DLL
----------------------------------------
Syncfusion.Core
    Assembly Version: 9.203.0.137
    Win32 Version: 9.203.0.137
    CodeBase: file:///E:/Program%20Files/TheBestSpinner3/Syncfusion.Core.DLL
----------------------------------------
System.Deployment
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
System.Runtime.Serialization.Formatters.Soap
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Serialization.Formatters.Soap/2.0.0.0__b03f5f7f11d50a3a/System.Runtime.Serialization.Formatters.Soap.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Keyoti.RapidSpell.NET2
    Assembly Version: 5.0.11.517
    Win32 Version: 5.0.11.517
    CodeBase: file:///E:/Program%20Files/TheBestSpinner3/Keyoti.RapidSpell.NET2.DLL
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
6vj_lhz5
    Assembly Version: 0.0.0.0
    Win32 Version: 2.0.50727.3624 (GDR.050727-3600)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.



Offline Meg

  • *****
  • 7320
  • Freedup to do what you really want
    • View Profile
Re: Unhandled Exception of TBS on less than < character
« Reply #1 on: December 01, 2011, 10:35:12 AM »
I don't know why, but I found that if I have the character less than "<" in my article, TBS will give unhandled exception.

It is easy to reproduce this problem (hope it doesn't happen only on my machine). Just input anything then the less than character. For example, input this in TBS textbox:

testing <


Then press "Everyone's Favorite" and try to do replace. An exception will occur. The following is the full error message. Hope it can get solved. Thanks so much.


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Length cannot be less than zero.



I haven't tried this out but TBS does not replace words inside HTML and the < sign is the start of HTML commands, eg <b>make this bold</b>. I wonder if that exception error recognises that usually there is a matching character whenever "<" appears? IE ">"

Offline aerch

Re: Unhandled Exception of TBS on less than < character
« Reply #2 on: December 01, 2011, 08:29:27 PM »

I haven't tried this out but TBS does not replace words inside HTML and the < sign is the start of HTML commands, eg <b>make this bold</b>. I wonder if that exception error recognises that usually there is a matching character whenever "<" appears? IE ">"

I see. Actually in my article the less than is not used as HTML tag. It is some words like "Below are the list of computers < $200 ", and TBS shows unhandled exception at my end... My solution right now is just to replace "<" with "less than". Just notify this and hope the unhandled exception will be fixed in the future.

Thanks so much.