Skip to content

Bug: Application crashes with ArgumentOutOfRangeException when launching on main monitor in dual-screen setup #353

Open

Description

@mobyc
Image

info:
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.ArgumentOutOfRangeException: 索引超出范围。必须为非负值并小于集合大小。
参数名: index
在 System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
在 client.frmMain.SetLocation() 位置 C:\Users\jacks\Desktop\Taskbar dev\main\main\Forms\frmMain.cs:行号 100
在 client.frmMain.frmMain_Load(Object sender, EventArgs e) 位置 C:\Users\jacks\Desktop\Taskbar dev\main\main\Forms\frmMain.cs:行号 77
在 System.Windows.Forms.Form.OnLoad(EventArgs e)
在 System.Windows.Forms.Form.OnCreateControl()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.WmShowWindow(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.Form.WmShowWindow(Message& m)
在 System.Windows.Forms.Form.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** 已加载的程序集 **************
mscorlib
程序集版本:4.0.0.0
Win32 版本:4.8.9181.0 built by: NET481REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

TaskbarGroups
程序集版本:0.2.0.0
Win32 版本:0.2.0.0
基本代码:file:///D:/TaskBarGroup/TaskbarGroups/TaskbarGroups/TaskbarGroups.exe

System.Drawing
程序集版本:4.0.0.0
Win32 版本:4.8.9037.0 built by: NET481REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System
程序集版本:4.0.0.0
Win32 版本:4.8.9172.0 built by: NET481REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Windows.Forms
程序集版本:4.0.0.0
Win32 版本:4.8.9181.0 built by: NET481REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Configuration
程序集版本:4.0.0.0
Win32 版本:4.8.9037.0 built by: NET481REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core
程序集版本:4.0.0.0
Win32 版本:4.8.9181.0 built by: NET481REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml
程序集版本:4.0.0.0
Win32 版本:4.8.9037.0 built by: NET481REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

Microsoft.GeneratedCode
程序集版本:1.0.0.0
Win32 版本:4.8.9037.0 built by: NET481REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

mscorlib.resources
程序集版本:4.0.0.0
Win32 版本:4.8.9037.0 built by: NET481REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll

System.Windows.Forms.resources
程序集版本:4.0.0.0
Win32 版本:4.8.9037.0 built by: NET481REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll

************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如:

启用 JIT 调试后,任何未经处理的异常
都将被发送到在此计算机上注册的 JIT 调试程序,
而不是由此对话框处理。

Activity

  1. JJMLongo commented on Jul 25, 2026

    @JJMLongo

    Working ok on similar system also with 3 screens (qhd+2x fhd), but on other system with 2 screens i get the same error. Both screens are 4k. If i click "continue", the group icons appear almost at top left of main screen and they work if clicked. Thanks for your work.

    Consulte o fim desta mensagem para obter detalhes sobre como invocar a depuração
    JIT (just-in-time) em vez desta caixa de diálogo.

    ************** Texto da excepção **************
    System.ArgumentOutOfRangeException: O índice estava fora do intervalo. Tem de ser não negativo e inferior ao tamanho da colecção.
    Nome do parâmetro: index
    em System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
    em client.frmMain.SetLocation() em C:\Users\jacks\Desktop\Taskbar dev\main\main\Forms\frmMain.cs:line 100
    em client.frmMain.frmMain_Load(Object sender, EventArgs e) em C:\Users\jacks\Desktop\Taskbar dev\main\main\Forms\frmMain.cs:line 77
    em System.Windows.Forms.Form.OnLoad(EventArgs e)
    em System.Windows.Forms.Form.OnCreateControl()
    em System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    em System.Windows.Forms.Control.CreateControl()
    em System.Windows.Forms.Control.WmShowWindow(Message& m)
    em System.Windows.Forms.Control.WndProc(Message& m)
    em System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    em System.Windows.Forms.Form.WmShowWindow(Message& m)
    em System.Windows.Forms.Form.WndProc(Message& m)
    em System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    em System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    em System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************** Assemblagens carregadas **************
    mscorlib
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.9337.0 built by: NET481REL1LAST_25H2_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

    TaskbarGroups
    Versão da assemblagem: 0.2.0.0
    Versão Win32: 0.2.0.0
    CodeBase: file:///D:/Recursos/TaskbarGroups/TaskbarGroups.exe

    System.Drawing
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.9221.0 built by: NET481REL1LAST_25H2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

    System
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.9340.0 built by: NET481REL1LAST_25H2_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

    System.Windows.Forms
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.9325.0 built by: NET481REL1LAST_25H2_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

    System.Configuration
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.9221.0 built by: NET481REL1LAST_25H2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

    System.Core
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.9340.0 built by: NET481REL1LAST_25H2_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

    System.Xml
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.9340.0 built by: NET481REL1LAST_25H2_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

    Microsoft.GeneratedCode
    Versão da assemblagem: 1.0.0.0
    Versão Win32: 4.8.9340.0 built by: NET481REL1LAST_25H2_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

    mscorlib.resources
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.9032.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_pt_b77a5c561934e089/mscorlib.resources.dll

    System.Windows.Forms.resources
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.9032.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_pt_b77a5c561934e089/System.Windows.Forms.resources.dll

    ************** Depuração JIT **************
    Para activar a depuração just-in-time (JIT), o ficheiro .config para esta
    aplicação ou computador (machine.config) tem de ter o
    valor jitDebugging definido na secção system.windows.forms.
    A aplicação também tem de ser compilada com a depuração
    activada.

    Por exemplo:

    Quando a depuração JIT está activada, qualquer excepção não processada
    será enviada para o depurador JIT registado no computador
    em vez de ser processada por esta caixa de diálogo.

  2. JJMLongo commented on Jul 25, 2026

    @JJMLongo

    I found the solution provided by the author (Thanks !) on other issue comment related to this type of problem until other release is released.
    Tested and is working ok.
    You can find here: issue comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions