Error message on adding Waterfox as browser

Issue #48 new
Sandra Hawkeye created an issue

Yesterday I was welcomed by an error message when trying to open a link through browser chooser. Today I had some time to figure out what was going on. It seems that me added Waterfox as a possible browser (which I had added a long time ago, and was working fine) broke browser chooser. Below is the error message.

From what i can tell it has something to do with the image. I tried to add a custom image, but that met with the same error.

I also included the config code for the waterfox browser. Maybe it sheds some light as to why it breaks.

Please note, this is Waterfox, not Waterfox classic.

Waterfox version G3.0.0 (64bit) based on Gecko 78.5.0, Aurora update channel.
According to the about, it’s up to date.

CONFIG CODE

<Browser>
      <GUID>9efebb31-0851-43fd-981e-a20fe9852ad7</GUID>
      <Name>Waterfox</Name>
      <Category>Browsers</Category>
      <Target>I:\Programs\Waterfox Current\waterfox.exe</Target>
      <IconIndex>0</IconIndex>
      <Image>(Extract)</Image>
      <CustomImagePath />
      <IsActive>true</IsActive>
      <Hotkey>0</Hotkey>
      <PosX>6</PosX>
      <PosY>1</PosY>
      <IsIE>false</IsIE>
      <IsEdge>false</IsEdge>
      <Arguments />
      <Scale>1</Scale>
      <Shown>true</Shown>
    </Browser>

ERROR CODE

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Requested range extends past the end of the array.
   at System.Runtime.InteropServices.Marshal.CopyToNative(Object source, Int32 startIndex, IntPtr destination, Int32 length)
   at System.Drawing.Icon.ToBitmap()
   at Browser_Chooser_2.ImageUtilities.GetICOFromFile(String aFile, Int32 aIndex, Boolean ErrorIconOnFail)
   at Browser_Chooser_2.ImageUtilities.GetImage(Browser& BrowserChoice, Boolean abDoScale)
   at Browser_Chooser_2.frmOptions.cmdBrowserAdd_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.9151 (WinRelRS6.050727-9100)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Browser Chooser 2
    Assembly Version: 2.0.4.38373
    Win32 Version: 2.0.4.38373
    CodeBase: file:///D:/Programma's/BrowserChooser/Browser%20Chooser%202.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.9136 (WinRelRS6.050727-9100)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.9147 (WinRelRS6.050727-9100)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.9136 (WinRelRS6.050727-9100)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.9136 (WinRelRS6.050727-9100)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.9135 built by: WinRelRS6
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.9136 (WinRelRS6.050727-9100)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.9153 (WinRelRS6.050727-9100)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
3lsptasg
    Assembly Version: 2.0.4.38373
    Win32 Version: 2.0.50727.9147 (WinRelRS6.050727-9100)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
OSVersionInfo
    Assembly Version: 3.0.0.0
    Win32 Version: 2.0.4.38373
    CodeBase: file:///D:/Programma's/BrowserChooser/Browser%20Chooser%202.exe
----------------------------------------
TAFactory.IconPack
    Assembly Version: 1.0.0.0
    Win32 Version: 2.0.4.38373
    CodeBase: file:///D:/Programma's/BrowserChooser/Browser%20Chooser%202.exe
----------------------------------------
SepCombo
    Assembly Version: 1.0.0.0
    Win32 Version: 2.0.4.38373
    CodeBase: file:///D:/Programma's/BrowserChooser/Browser%20Chooser%202.exe
----------------------------------------
yrrqzwpd
    Assembly Version: 2.0.4.38373
    Win32 Version: 2.0.50727.9147 (WinRelRS6.050727-9100)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Comments (1)

  1. Rob Randell

    Hey @Sandra Hawkeye

    I can have a look at this for you, but only in my fork of this project which is here as I don’t have permissions on this fork:
    https://bitbucket.org/Verbail/browserchooser2rrfork

    If you’d like me to look at it please can you repost this in the issues there and I’ll have a look.
    I suppose it would be also be worth knowing if you get the same issue with my fork - there were a few things I tweaked when I got them, but I don’t know if one of them would have fixed this - there was some bounds-checking I added in there though, so maybe!
    Cheers!

  2. Log in to comment