KSP-CKAN / CKAN

The Comprehensive Kerbal Archive Network
https://forum.kerbalspaceprogram.com/index.php?/topic/197082-*
Other
1.99k stars 347 forks source link

[Bug] Red X on choosing provided mod #2988

Closed HebaruSan closed 4 years ago

HebaruSan commented 4 years ago

Background

Problem

$ mono ./ckan.exe 
System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at System.Windows.Forms.ListView.GetItemLocation (System.Int32 index) [0x00018] in <91b18fcffc5e47d3a5d52c9f469a1a52>:0 
  at System.Windows.Forms.ListView.get_LastVisibleIndex () [0x00043] in <91b18fcffc5e47d3a5d52c9f469a1a52>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.ListView.get_LastVisibleIndex()
  at System.Windows.Forms.ThemeWin32Classic.DrawListViewItems (System.Drawing.Graphics dc, System.Drawing.Rectangle clip, System.Windows.Forms.ListView control) [0x00011] in <91b18fcffc5e47d3a5d52c9f469a1a52>:0 
  at System.Windows.Forms.ListView+ItemControl.OnPaintInternal (System.Windows.Forms.PaintEventArgs pe) [0x00011] in <91b18fcffc5e47d3a5d52c9f469a1a52>:0 
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) [0x0006d] in <91b18fcffc5e47d3a5d52c9f469a1a52>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x001a4] in <91b18fcffc5e47d3a5d52c9f469a1a52>:0 
  at System.Windows.Forms.ListView+ItemControl.WndProc (System.Windows.Forms.Message& m) [0x00071] in <91b18fcffc5e47d3a5d52c9f469a1a52>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <91b18fcffc5e47d3a5d52c9f469a1a52>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000b] in <91b18fcffc5e47d3a5d52c9f469a1a52>:0 
  at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00085] in <91b18fcffc5e47d3a5d52c9f469a1a52>:0 

image

It's the ChooseProvidedMods tab:

image

Presumably related to #2966's refactoring of the tab pages.

Last time we saw a red X bug: #2499, #2501

See:

HebaruSan commented 4 years ago

ChooseProvidedMods.LoadProviders updates GUI controls on the wrong thread.