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

Chinese characters cause System.ExecutionEngineException , Clipboard #12149

Open
light-years-run opened this issue Dec 20, 2018 · 0 comments
Open

Comments

@light-years-run
Copy link

Steps to Reproduce

  1. I run winform application under windows. when I copy chinese characters into Textbox. the Exception occured.
  2. for example chinese characters:测试, Ctrl+C then Ctrl+V into textbox.
  3. stack trace , below:
    System.ExecutionEngineException: String conversion error: Illegal byte sequence
    encounted in the input.
    at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal.PtrToStr
    ingAnsi(intptr)
    at System.Windows.Forms.XplatUIWin32.AnsiToString (System.IntPtr ansi_data) [0
    x00000] in D:\j\workspace\build-package-win-mono\2018-06\mcs\class\System.Window
    s.Forms\System.Windows.Forms\XplatUIWin32.cs:933
    at System.Windows.Forms.XplatUIWin32.ClipboardRetrieve (System.IntPtr handle,
    System.Int32 type, System.Windows.Forms.XplatUI+ClipboardToObject converter) [0x
    0008d] in D:\j\workspace\build-package-win-mono\2018-06\mcs\class\System.Windows
    .Forms\System.Windows.Forms\XplatUIWin32.cs:2893
    at System.Windows.Forms.XplatUI.ClipboardRetrieve (System.IntPtr handle, Syste
    m.Int32 type, System.Windows.Forms.XplatUI+ClipboardToObject converter) [0x00000
    ] in D:\j\workspace\build-package-win-mono\2018-06\mcs\class\System.Windows.Form
    s\System.Windows.Forms\XplatUI.cs:575
    at System.Windows.Forms.Clipboard.GetDataObject (System.Boolean primary_select
    ion) [0x00039] in D:\j\workspace\build-package-win-mono\2018-06\mcs\class\System
    .Windows.Forms\System.Windows.Forms\Clipboard.cs:390
    at System.Windows.Forms.Clipboard.GetDataObject () [0x00000] in D:\j\workspace
    \build-package-win-mono\2018-06\mcs\class\System.Windows.Forms\System.Windows.Fo
    rms\Clipboard.cs:137
    at System.Windows.Forms.TextBoxBase.ProcessKey (System.Windows.Forms.Keys keyD
    ata) [0x000a4] in D:\j\workspace\build-package-win-mono\2018-06\mcs\class\System
    .Windows.Forms\System.Windows.Forms\TextBoxBase.cs:1101
    at System.Windows.Forms.TextBoxBase.WndProc (System.Windows.Forms.Message& m)
    [0x0003e] in D:\j\workspace\build-package-win-mono\2018-06\mcs\class\System.Wind
    ows.Forms\System.Windows.Forms\TextBoxBase.cs:1495
    at System.Windows.Forms.RichTextBox.WndProc (System.Windows.Forms.Message& m)
    [0x00000] in D:\j\workspace\build-package-win-mono\2018-06\mcs\class\System.Wind
    ows.Forms\System.Windows.Forms\RichTextBox.cs:1191
    at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.
    Forms.Message& m) [0x00000] in D:\j\workspace\build-package-win-mono\2018-06\mcs
    \class\System.Windows.Forms\System.Windows.Forms\Control.cs:228
    at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Fo
    rms.Message& m) [0x00000] in D:\j\workspace\build-package-win-mono\2018-06\mcs\c
    lass\System.Windows.Forms\System.Windows.Forms\Control.cs:209
    at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windo
    ws.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00085] in D:\j
    workspace\build-package-win-mono\2018-06\mcs\class\System.Windows.Forms\System.W
    indows.Forms\NativeWindow.cs:240

Current Behavior

Expected Behavior

On which platforms did you notice this

[ ] macOS
[ ] Linux
[ ] Windows

Version Used:

Stacktrace

Please paste the stack trace here if available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants