wiredwiz / FastColoredTextBox

Fast Colored TextBox for Syntax Highlighting. The text editor component for .NET.
Other
1 stars 1 forks source link

crashes on ctrl+c #6

Open phatlewt opened 1 month ago

phatlewt commented 1 month ago

crashes on ctrl+c copy, using WinForms .Net 8 on windows 10 x64. any workarounds?

Stack trace:

System.ArgumentNullException: Value cannot be null. (Parameter 'second') at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) at System.Linq.Enumerable.Intersect[TSource](IEnumerable1 first, IEnumerable1 second, IEqualityComparer1 comparer) at FastColoredTextBoxNS.Text.ExportToRTF.GetRtfDescriptor(IEnumerable1 styles) at FastColoredTextBoxNS.Text.ExportToRTF.Flush(StringBuilder sb, StringBuilder tempSB, IEnumerable`1 currentStyles) at FastColoredTextBoxNS.Text.ExportToRTF.GetRtf(TextSelectionRange r) at FastColoredTextBoxNS.FastColoredTextBox.OnCreateClipboardData(DataObject data) at FastColoredTextBoxNS.FastColoredTextBox.Copy() at FastColoredTextBoxNS.FastColoredTextBox.DoAction(FCTBAction action) at FastColoredTextBoxNS.FastColoredTextBox.ProcessKey(Keys keyData) at FastColoredTextBoxNS.FastColoredTextBox.OnKeyDown(KeyEventArgs e) at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m) at FastColoredTextBoxNS.FastColoredTextBox.ProcessKeyMessage(Message& m) at System.Windows.Forms.Control.WmKeyChar(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam) at Windows.Win32.PInvoke.DispatchMessage(MSG lpMsg) at System.Windows.Forms.Application.ComponentManager.Microsoft.Office.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context)

SpirosArk commented 1 month ago

Hello @phatlewt, fixed it locally, can you give me write access in order to push and open a PR?

phatlewt commented 1 month ago

Sorry, little bit confused... write access to what? Just to clarify I found and installed your package from nuget (https://www.nuget.org/packages/FCTB-wired) within visual studio 2022, then started using the fctb textbox within a winforms window. Any chance you could update this repo and/or republish the fixed version to nuget? Thank you very much!

SpirosArk commented 1 month ago

@wiredwiz since I went and fixed it, could you give me access in order to push my branch on your solution?

wiredwiz commented 1 month ago

Sure thing, sorry, saw the notification a little while ago and spaced. Can you do a pull request? Happy to merge it in.

SpirosArk commented 1 month ago

@wiredwiz no worries, I am trying to push my fix through visual studio in a new branch I created locally and get 403, I think you must make me coauthor to be able to push

image