LadyDefile / Wordsmith-DalamudPlugin

Wordsmith is a Dalamud Plugin aiming to make roleplay easier, more convenient, and harder to accidentally "wrong chat" your post.
7 stars 3 forks source link

Scratchpad Regular Crashes upon Copying #52

Closed winsome-widowbird closed 10 months ago

winsome-widowbird commented 10 months ago

Hello. Scratchpad has, since the latest, occasionally crashed upon hitting the copy button. This is the error code I received:

{"Type":"Wordsmith.Gui.ScratchPadUI","ID":"2","Title":"","Header":"","Namespace":"","WindowName":"Wordsmith - Scratch Pad #2","IsFocused":"True","RespectCloseHotkey":"True","DisableWindowSounds":"False","OnOpenSfxId":"23","OnCloseSfxId":"24","Position":"","PositionCondition":"None","Size":"","SizeCondition":"None","SizeConstraints":"Dalamud.Interface.Windowing.Window\u002BWindowSizeConstraints","Collapsed":"","CollapsedCondition":"None","Flags":"NoScrollbar, NoScrollWithMouse, MenuBar","ForceMainWindow":"False","BgAlpha":"","ShowCloseButton":"True","AllowPinning":"True","AllowClickthrough":"True","IsOpen":"False","\u003CID\u003Ek__BackingField":"2","\u003CTitle\u003Ek__BackingField":"","_header_parse":"False","_header":"","_scratch":"\u0022... If this is the group consensus, I shall follow it.\u0022","_useOOC":"False","_chunks":"{ \u0022Wordsmith.TextChunk\u0022 }","_nextChunk":"0","_canUndo":"False","_textchanged":"False","_ignoreTextEdit":"False","_invalidateChunks":"False","_replaceText":"Dimwold","_text_history":"{ \u0022{ ChatType: None, ScratchText: \u0022/s \u0022Let us begin with behaviours and migration. Do we know any of its migration patterns and\r\r\nhunting tendencies? If so, we can effectively track it with this knowledge. Knowing what its\r\r\nmarkings look like would also be a great boon.\u0022\u0022, UseOOC: False, TellTarget: \u0022\u0022, CrossWorld: False, Linkshell: 0 }, \u0022{ ChatType: None, ScratchText: \u0022/s \u0022That is... helpful information, to be sure. However, that is not what I wish to know. The\r\r\npoint of its combat abilities is moot, as we do not know where it even is. I want to know how\r\r\nit moves and operates, its choice of prey and hunting grounds, how it may mark its territory\r\r\nand make its presence known.\u0022\u0022, UseOOC: False, TellTarget: \u0022\u0022, CrossWorld: False, Linkshell: 0 }, \u0022{ ChatType: None, ScratchText: \u0022/s \u0022I see. Have there been reports of such carcasses near the likes of Castrum Oriens or\r\r\nRhalgr\u0027s Reach?\u0022\u0022, UseOOC: False, TellTarget: \u0022\u0022, CrossWorld: False, Linkshell: 0 }, \u0022{ ChatType: None, ScratchText: \u0022\u0022Hmm. That does make sense. I believe we can safely discount anywhere with regular\r\r\nfootpaths. Dimwold comes to mind in that regard. Far south of the Castrum, and not\r\r\nwell-travelled.\u0022\u0022, UseOOC: False, TellTarget: \u0022\u0022, CrossWorld: False, Linkshell: 0 }\u0022 }","_statisticsTracker":"Wordsmith.Helpers.StatisticsTracker","_stats_order_by":"usesdescending","_corrections":"{ \u0022\u0022 }","_rest_time":"-0.0008869618","_do_spell_check":"False","_hideOnly":"False","_lastWidth":"555","_lastScale":"1","_view_mode":"0","_nextID":"2","CORRECTIONS_FOUND":"-1","CHECKING_SPELLING":"1","CORRECTIONS_NOT_FOUND":"2","EDITING_TEXT":"0","VIEW_MODE_PAD":"0","VIEW_MODE_HISTORY":"1","VIEW_MODE_STATS":"2","Exception":{"Error":"System.ArgumentOutOfRangeException: Length cannot be less than zero. (Parameter \u0027length\u0027)\r\n at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length)\r\n at System.String.Substring(Int32 startIndex, Int32 length)\r\n at Wordsmith.Helpers.StatisticsTracker.TallyWord(String line, Word word) in /work/repo/Wordsmith/Helpers/StatisticsTracker.cs:line 19\r\n at Wordsmith.Helpers.StatisticsTracker.TallyWords(String line, IEnumerable\u00601 words) in /work/repo/Wordsmith/Helpers/StatisticsTracker.cs:line 29\r\n at Wordsmith.Gui.ScratchPadUI.DoCopyToClipboard() in /work/repo/Wordsmith/Gui/ScratchPadUI.cs:line 1204","Message":"Length cannot be less than zero. (Parameter \u0027length\u0027)"},"Window":"ScratchPadUI #2"}

LadyDefile commented 10 months ago

What version is your Wordsmith? I released an update last night that should resolve this error.

winsome-widowbird commented 10 months ago

What version is your Wordsmith? I released an update last night that should resolve this error.

Version 1.11.0.0

thechocorooms commented 10 months ago

Having same issue. Here is my log {"Type":"Wordsmith.Gui.ScratchPadUI","ID":"2","Title":"","Header":"/say","Namespace":"","WindowName":"Wordsmith - Scratch Pad #2","IsFocused":"True","RespectCloseHotkey":"True","DisableWindowSounds":"False","OnOpenSfxId":"23","OnCloseSfxId":"24","Position":"","PositionCondition":"None","Size":"","SizeCondition":"None","SizeConstraints":"Dalamud.Interface.Windowing.Window\u002BWindowSizeConstraints","Collapsed":"","CollapsedCondition":"None","Flags":"NoScrollbar, NoScrollWithMouse, MenuBar","ForceMainWindow":"False","BgAlpha":"","ShowCloseButton":"True","AllowPinning":"True","AllowClickthrough":"True","IsOpen":"False","\u003CID\u003Ek__BackingField":"2","\u003CTitle\u003Ek__BackingField":"","_header_parse":"True","_header":"/say","_scratch":"\u0022I could...\u0022 He hums. \u0022... Maybe once Lei feels better.\u0022 He sighs again, sipping\r\r\nsome of his coffee. \u0022You... missed the argument at the end, Uulii. But it really\r\r\nhit him hard. I\u0027ve been keeping him company.\u0022","_useOOC":"False","_chunks":"{ \u0022Wordsmith.TextChunk\u0022 }","_nextChunk":"0","_canUndo":"False","_textchanged":"False","_ignoreTextEdit":"False","_invalidateChunks":"False","_replaceText":"Uulii","_text_history":"{ \u0022{ ChatType: Emote, ScratchText: \u0022reaches for a treat, then, looking to Uulii next. \u0022Well, I have wards at least...\u0022\r\r\nHis ears pin back, though. lmao. \u0022It shouldn\u0027t make me any worse than I\r\r\nalready am. The real question is if I\u0027d be -allowed- to.\u0022 He snorts, taking a bite\r\r\nof his chosen cookie. \u0022I don\u0027t know how attached Ranirus is to it...\u0022 His ears\r\r\nperk back up soon enough - he loves Kaede\u0027s baking. \u0022Even then it\u0027d only\r\r\nmake me feel a tiny bit better.\u0022\u0022, UseOOC: False, TellTarget: \u0022\u0022, CrossWorld: False, Linkshell: 0 }, \u0022{ ChatType: Emote, ScratchText: \u0022accepts with a smile. \u0022Thanks so much, Kaede.\u0022 he leans in and plants a little\r\r\nsmooch on top of her head, moving to sweeten up the coffee how he likes it.\r\r\n\u0022Honestly, knowing my luck, if I\u0027d gotten my hands on it and eaten it right then\r\r\nand there, they\u0027d have all turned on me instead.\u0022 His tail flicks, with vague\r\r\nirritation. \u0022It -was- cute... Hells, I\u0027ve got one at my house almost exactly like it,\r\r\nand it\u0027s nowhere near as bloodthirsty.\u0022\u0022, UseOOC: False, TellTarget: \u0022\u0022, CrossWorld: False, Linkshell: 0 }, \u0022{ ChatType: Emote, ScratchText: \u0022opens his mouth as he\u0027s bid, and munches on the cookie offered! His face\r\r\ntinges a liiiiiittle bit pinker. He likes it. \u0022They help soothe my frustration at the\r\r\nentire situation, at least.\u0022 He sighs quietly. \u0022The creature in question by the\r\r\nway is a deepeye. It\u0027s a weak voidsent about the size of a cat.\u0022 \u0022, UseOOC: False, TellTarget: \u0022\u0022, CrossWorld: False, Linkshell: 0 }, \u0022{ ChatType: Emote, ScratchText: \u0022snickers. \u0022Considering how aggressive it was I don\u0027t think it\u0027d be a great idea\r\r\nfor it to get close to you.\u0022 He munches a little more, and then hums, thinking.\r\r\n\u0022As far as healing goes, yeah, I guess I\u0027ve physically healed from it. But...\u0022 he\r\r\nthinks a moment longer. \u0022Don\u0027t know how long it\u0027ll take to mentally get over\r\r\nit.\u0022 He sounds like he\u0027s about to rant a little but he doesn\u0027t want to.\u0022, UseOOC: False, TellTarget: \u0022\u0022, CrossWorld: False, Linkshell: 0 }, \u0022{ ChatType: Say, ScratchText: \u0022\u0022A parfait that looks like a deepeye... That\u0027d be so cute.\u0022 His ears twitch,\r\r\nconsidering the idea. \u0022This one had a bright blue eye and dark blue fur,\r\r\nperhaps a blueberry one?\u0022 He opens his mouth for the strawberry next. His\r\r\nfavorite!! \u0022I\u0027m afraid if I did that I wouldn\u0027t leave, though...\u0022 He then snickers.\u0022, UseOOC: False, TellTarget: \u0022\u0022, CrossWorld: False, Linkshell: 0 }\u0022 }","_statisticsTracker":"Wordsmith.Helpers.StatisticsTracker","_stats_order_by":"usesdescending","_corrections":"{ \u0022Wordsmith.Word\u0022 }","_rest_time":"-0.004090897","_do_spell_check":"False","_hideOnly":"False","_lastWidth":"582","_lastScale":"1.1666666","_view_mode":"0","_nextID":"2","CORRECTIONS_FOUND":"-1","CHECKING_SPELLING":"1","CORRECTIONS_NOT_FOUND":"2","EDITING_TEXT":"0","VIEW_MODE_PAD":"0","VIEW_MODE_HISTORY":"1","VIEW_MODE_STATS":"2","Exception":{"Error":"System.ArgumentOutOfRangeException: Length cannot be less than zero. (Parameter \u0027length\u0027)\r\n at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length)\r\n at System.String.Substring(Int32 startIndex, Int32 length)\r\n at Wordsmith.Helpers.StatisticsTracker.TallyWord(String line, Word word) in /work/repo/Wordsmith/Helpers/StatisticsTracker.cs:line 19\r\n at Wordsmith.Helpers.StatisticsTracker.TallyWords(String line, IEnumerable\u00601 words) in /work/repo/Wordsmith/Helpers/StatisticsTracker.cs:line 29\r\n at Wordsmith.Gui.ScratchPadUI.DoCopyToClipboard() in /work/repo/Wordsmith/Gui/ScratchPadUI.cs:line 1204","Message":"Length cannot be less than zero. (Parameter \u0027length\u0027)"},"Window":"ScratchPadUI #2"}

Version 1.11.0.0 as well

LadyDefile commented 10 months ago

I just double checked, the version with the fix is Version 1.11.1. It seems the Dalamud team has not approved the update changes yet but I promise, as soon as the version 1.11.1 update is approved by the team the issue will be fixed!

LadyDefile commented 10 months ago

You can always harass the Dalamud team on their Discord server to push the update through!

LadyDefile commented 10 months ago

As a temporary measure, you can go into the settings and turn off word usage statistics.

thechocorooms commented 10 months ago

Thank you for your swift fix!

winsome-widowbird commented 10 months ago

Thank you!

LadyDefile commented 10 months ago

Great news! One of the moderators for Dalamud has approved the plugin and merged it. You should be able to download the patch soon!

LadyDefile commented 10 months ago

I restarted my game to check and the update appeared so you should be able to get it whenever you're ready! Again, super sorry for the bug and thank you for your support!