Exception occurs when opening Options

Issue #16 resolved
Scott Davis created an issue

When opening the options windows I get an error. Additionally, I cannot save my settings, even in Admin mode. Each time I re-open the savings the last changes are gone. I cannot find the options XML saved anywhere on my computer.

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

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at Browser_Chooser_2.frmOptions.frmOptions_Shown(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnShown(EventArgs e)
   at System.Windows.Forms.Form.CallShownEvent()
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Browser Chooser 2
    Assembly Version: 2.0.3.27397
    Win32 Version: 2.0.3.27397
    CodeBase: file:///C:/Users/hidden.hidden/Downloads/Browser%20Chooser%202.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8686 (QFE.050727-8600)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5495 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.5483 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5494 (Win7SP1GDR.050727-5400)
    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.5483 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.5420 built by: Win7SP1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
islnsogx
    Assembly Version: 2.0.3.27397
    Win32 Version: 2.0.50727.8686 (QFE.050727-8600)
    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.3.27397
    CodeBase: file:///C:/Users/hidden.hidden/Downloads/Browser%20Chooser%202.exe
----------------------------------------
TAFactory.IconPack
    Assembly Version: 1.0.0.0
    Win32 Version: 2.0.3.27397
    CodeBase: file:///C:/Users/hidden.hidden/Downloads/Browser%20Chooser%202.exe
----------------------------------------
SepCombo
    Assembly Version: 1.0.0.0
    Win32 Version: 2.0.3.27397
    CodeBase: file:///C:/Users/hidden.hiddenDownloads/Browser%20Chooser%202.exe
----------------------------------------

************** 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 (7)

  1. guy repo owner

    That is really odd. I do not get much information from the crash log unfortunately. The settings XML will be in your roaming profile. %appdata%\browserchoser2 Either it cannot create that folder or something is blocking the embeded DLLs from being extracted.

  2. guy repo owner

    I am also assuming the app when into safe mode, which lets the main screen show. As to why the options wont work, not sure.

  3. Scott Davis reporter

    I found the options XML in the location you said %appdata%\browserchoser2 I was able to edit and save the document. Now when I open browserchooser2, the settings appear with my edits and I no longer get the error message. When I make changes to options in browserchooser2 and save, they are saved and I get no error message. I am not sure exactly what changed the behavior of the program after these edits, but the issue is resolved and I cannot re-create it.

    My only suggestion is to add some documentation on the website so users can easily locate the options file if needed. I tried looking through the source code and it was not obvious to me (but I am inexperienced with VB). Thanks for the response.

    Let me know if you'd like me to try and re-create the error somehow, or if I can be of assistance in another way.

  4. guy repo owner

    I know, documentation is my week point.

    The code that chooses the save path is a little hidden because of portable mode.In the settings.vb file, if you look at the DoSave function you will see the logic. If you did a seach for %appdata% it would not find it because I used the native .NET functions: Environment.SpecialFolder.ApplicationData

    If you can reproduce the error, that would greatly help. But don't waste too much time. I am glad that fixed your problem.

  5. Log in to comment