Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy from MessageBox shown by pipeline component shows windows error on Ctr+C [Zsolt] #1357

Closed
tznind opened this issue Aug 12, 2022 · 0 comments · Fixed by #1373
Closed
Labels
bug Issues that highlight a piece of functionality that is not working as expected

Comments

@tznind
Copy link
Contributor

tznind commented Aug 12, 2022

Describe the bug
If a pipeline component in a multithreaded execution (e.g. Extraction) uses IBasicActivateItems.Show and the user hits Ctrl+C on the dialog, this causes a windows error popup under some circumstances

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Threading.ThreadStateException: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it.
   at System.Windows.Forms.Clipboard.SetDataObject(Object data, Boolean copy, Int32 retryTimes, Int32 retryDelay)
   at System.Windows.Forms.Clipboard.SetText(String text, TextDataFormat format)
   at Rdmp.UI.SimpleDialogs.WideMessageBox.richTextBox1_KeyDown(Object sender, KeyEventArgs e) in D:\a\RDMP\RDMP\Rdmp.UI\SimpleDialogs\WideMessageBox.cs:line 429
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.RichTextBox.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)

I think that we need to handle RequiresInvoke in Show (for windows client).

@tznind tznind added the bug Issues that highlight a piece of functionality that is not working as expected label Aug 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that highlight a piece of functionality that is not working as expected
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant