You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Here the summary of controls working in Windows Forms in my limited testing
Common Controls
Button
CheckBox
CheckedListBox Crash on click when empty or on startup if any items
ComboBox Crash on dropdown open
DateTimePicker Crash on select date
Label
LinkLabel Crash on hover
ListBox Crash on select item
ListView
MaskedTextBox
MonthCalendar Crash on startup
NotifyIcon Crash on startup when icon set
NumericUpDown
PictureBox Crash on startup
ProgressBar
RadioButton
RichTextBox Crash on startup
TextBox
ToolTip
TreeView
WebBrowser Crash on startup
Containers
FlowLayoutPanel
GroupBox
Panel
SplitContainer Crash on hover
TabControl
TableLayoutPanel
Menu & Toolstrip
ContextMenuStrip Crash on show
MenuStrip Crash on startup
StatusStrip Crash on startup when use ToolstripDropDown and ToolStripSplitButton
ToolStrip
ToolStripContainer
I can understand that some issues i due to lack of COM support, but some "crash on selection" looks more like CoreRT issue. Anyway, this issue to give visibility for list of supported out-of-box controls.
I blindly tried some permutations inside rd.xml, similar to the following, but frankly, all this could have been latin incantations from the necronomicon, so I assume I did not do it correctly. I always received the same exception regardles of which assemblies I included in the list.
You can submit PR to WinForms to change BITMAPINFOHEADER to struct and this line to sizeof(SafeNativeMethods.BITMAPINFOHEADER). It has significantly better performance everywhere, and it is guaranteed to be compatible with CoreRT.
You can submit PR to WinForms to change BITMAPINFOHEADER to struct and this line to sizeof(SafeNativeMethods.BITMAPINFOHEADER). It has significantly better performance everywhere, and it is guaranteed to be compatible with CoreRT.
Even if I do it, how can I verify that this fixes the CoreRT issue? Or, more to the point, if I have built the System.WIndows.Forms and friends assemblies on my machine, how can I reference them from my test CoreRT project?
The fact that the compiler doesn't figure this one out is actually a dumb regression I caused when I was moving things around. Fixing this to use sizeof of a struct is still a very good fix (because it's really just so much faster to use sizeof), but I'm also submitting #8053 that should resolve this too.
Activity
MichalStrehovsky commentedon Feb 18, 2020
Great list, thank you for documenting this!
teobugslayer commentedon Mar 21, 2020
I experimented a bit with the MenuStrip. Unfortunately, I am not a .NET dev, so I hit an impenetrable wall.
On startup, I get a very weird exception (Maybe there's a separate issue with exception generation of CoreRT):
And the following call stack:
FailFast�() Unknown
S_P_CoreLib_System_Runtime_CalliIntrinsics__Call_5�() Unknown
S_P_CoreLib_System_Runtime_CalliIntrinsics__CallVoid_3�() Unknown
S_P_CoreLib_System_Runtime_EH__UnhandledExceptionFailFastViaClasslib�() Unknown
S_P_CoreLib_System_Runtime_EH__DispatchEx�() Unknown
RhThrowEx�() Unknown
RhpThrowEx() Line 191 Unknown
S_P_Interop_Internal_Runtime_CompilerHelpers_RuntimeInteropData__GetStructUnsafeStructSize�() Unknown
S_P_CoreLib_System_Runtime_InteropServices_Marshal__SizeOfHelper�() Unknown
S_P_CoreLib_System_Runtime_InteropServices_Marshal__SizeOf_1�() Unknown
System_Drawing_Common_System_Drawing_Icon__BmpFrame�() Unknown
System_Drawing_Common_System_Drawing_Icon__ToBitmap�() Unknown
System_Windows_Forms_Primitives_System_Windows_Forms_DpiHelper__GetBitmapFromIcon�() Unknown
System_Windows_Forms_System_Windows_Forms_ToolStripScrollButton__get_UpImage�() Unknown
System_Windows_Forms_System_Windows_Forms_ToolStripScrollButton__CreateControlInstance�() Unknown
System_Windows_Forms_System_Windows_Forms_ToolStripScrollButton___ctor�() Unknown
System_Windows_Forms_System_Windows_Forms_ToolStripDropDownMenu__get_UpScrollButton�() Unknown
System_Windows_Forms_System_Windows_Forms_ToolStripDropDownMenu__SetDisplayedItems�() Unknown
System_Windows_Forms_System_Windows_Forms_ToolStrip__OnLayout�() Unknown
System_Windows_Forms_System_Windows_Forms_ToolStripDropDown__OnLayout�() Unknown
System_Windows_Forms_System_Windows_Forms_ToolStripDropDownMenu__OnLayout�() Unknown
System_Windows_Forms_System_Windows_Forms_Control__PerformLayout_1�() Unknown
System_Windows_Forms_System_Windows_Forms_Control__PerformLayout�() Unknown
System_Windows_Forms_System_Windows_Forms_Control__ResumeLayout_0�() Unknown
System_Windows_Forms_System_Windows_Forms_Layout_LayoutTransaction__Dispose�() Unknown
System_Windows_Forms_System_Windows_Forms_ToolStripItemCollection__AddRange�() Unknown
System_Windows_Forms_System_Windows_Forms_ToolStripItemCollection__AddRange�() Unknown
winforms_winforms_Form1__InitializeComponent() Line 80 Unknown
winforms_winforms_Form1___ctor() Line 17 Unknown
winforms_winforms_Program__Main() Line 17 Unknown
I poked a bit blindly around the source code of WInForms and found this very suspicious code:
I blindly tried some permutations inside rd.xml, similar to the following, but frankly, all this could have been latin incantations from the necronomicon, so I assume I did not do it correctly. I always received the same exception regardles of which assemblies I included in the list.
I'm leaving this in hope that someone could make sense of the issue.
jkotas commentedon Mar 21, 2020
You can submit PR to WinForms to change
BITMAPINFOHEADERto struct and this line tosizeof(SafeNativeMethods.BITMAPINFOHEADER). It has significantly better performance everywhere, and it is guaranteed to be compatible with CoreRT.teobugslayer commentedon Mar 21, 2020
Even if I do it, how can I verify that this fixes the CoreRT issue? Or, more to the point, if I have built the System.WIndows.Forms and friends assemblies on my machine, how can I reference them from my test CoreRT project?
Suchiman commentedon Mar 21, 2020
I'd imagine the instructions in https://github.com/dotnet/winforms/blob/master/Documentation/debugging.md should work
teobugslayer commentedon Mar 21, 2020
I suspect the rabbit hole is quite deep :D Challenge accepted! And thank you for the hint!
Do not overwrite metadataGenerationOptions
MichalStrehovsky commentedon Mar 23, 2020
The fact that the compiler doesn't figure this one out is actually a dumb regression I caused when I was moving things around. Fixing this to use
sizeofof astructis still a very good fix (because it's really just so much faster to usesizeof), but I'm also submitting #8053 that should resolve this too.jkotas commentedon Mar 23, 2020
Also, I have submitted the System.Drawing interop improvement as dotnet/runtime#33967
Do not overwrite metadataGenerationOptions (#8053)