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

Error Report (unsure what caused it) #18

Closed ladyredxiv closed 1 year ago

ladyredxiv commented 2 years ago

Error log included below. Was just typing in Scratchpad to be able to see the whole message better before I sent it in chat. Nothing special.

{"LastID":"0","NextID":"1","ID":"0","Namespace":"NULL","WindowName":"Wordsmith - Scratch Pad #0","IsFocused":"True","RespectCloseHotkey":"True","Position":"NULL","PositionCondition":"None","Size":"NULL","SizeCondition":"None","SizeConstraints":"Dalamud.Interface.Windowing.Window\u002BWindowSizeConstraints","Collapsed":"NULL","CollapsedCondition":"None","Flags":"NoScrollbar, NoScrollWithMouse, MenuBar","ForceMainWindow":"False","BgAlpha":"NULL","ShowCloseButton":"True","IsOpen":"True","\u003CID\u003Ek__BackingField":"0","_lastState":"{ ChatType: Say, ScratchText: \u0022I\u0027m sure he does. He is quite protective of me, as I\u0027m sure you\r\r\nunderstand. I sincerely hope that it doesn\u0027t happen again. I will let\r\r\nhim know that we spoke, and \u0022, UseOOC: False, TellTarget: \u0022\u0022, CrossWorld: False, Linkshell: 0 }","_preserveCorrections":"False","_corrections":"{ \u0022\u0022 }","_errors":"{ \u0022\u0022 }","_notices":"{ \u0022\u0022 }","_spellChecked":"False","_chatType":"Say","_header_parse":"True","_telltarget":"","_linkshell":"0","_crossWorld":"False","_scratch":"I\u0027m sure he does. He is quite protective of me, as I\u0027m sure you\r\r\nunderstand. I sincerely hope that it doesn\u0027t happen again. I will let\r\r\nhim know that we spoke, and ","_scratchBufferSize":"4096","_useOOC":"False","_chunks":"{ \u0022{ StartIndex: 0, Header: \u0022/s\u0022, Text: \u0022I\u0027m sure he does. He is quite protective of me, as I\u0027m sure you understand. I sincerely hope that it doesn\u0027t happen again. I will let him know that we spoke, and\u0022, Words: Wordsmith.Data.Word[], Marker: , OOC Start: \u0022\u0022, OOC End: \u0022\u0022 }\u0022 }","_nextChunk":"0","_canUndo":"False","_editorstate":"0","_textchanged":"False","_text_history":"{ \u0022{ ChatType: Say, ScratchText: \u0022I accept the apology for your actions at that time, yes. Bear in\r\r\nmind, however, that I am not a doormat. I may not hold grudges,\r\r\nbut I\u0027m not one to allow myself to be walked all over either. Now,\r\r\nas the apology has been made, I expect that you will retain the\r\r\nawareness that a repeat of said actions will garner the same\r\r\nresponse, if not more harshly so, as Reinod is back from basic\r\r\ntraining.\u0022, UseOOC: False, TellTarget: \u0022\u0022, CrossWorld: False, Linkshell: 0 }\u0022 }","_lastWidth":"420","_ignoreTextEdit":"False","_replaceText":"Reinod","_cancellationTokenSource":"System.Threading.CancellationTokenSource","_spellchecktimer":"System.Timers.Timer","_selected_history":"-1","_nextID":"2","Exception":{"Error":"System.InvalidOperationException: Collection was modified; enumeration operation may not execute.\r\n at Wordsmith.Gui.ScratchPadUI.DrawAlerts() in /work/repo/Wordsmith/Gui/ScratchPadUI.cs:line 525\r\n at Wordsmith.Gui.ScratchPadUI.Draw() in /work/repo/Wordsmith/Gui/ScratchPadUI.cs:line 241","Message":"Collection was modified; enumeration operation may not execute."}}

LadyDefile commented 2 years ago

Thank you for posting this. I think I know what caused this. I'll have to toy around with it a bit to find the exact issue but it looks like it tried to print an alert as an alert was added/removed and that caused an error. I should be able to fix that easily enough.

LadyDefile commented 2 years ago

I can't seem to replicate the issue myself but the nature of that particular error is benign (tells you that the list of alerts has changed in the middle of drawing the list) so I added some suppression code. It will still show the alert in xllog but the pop up should not happen anymore for this error.