17.1 Beta Exception

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

17.1 Beta Exception

Post by wjstarck » Wed Apr 05, 2017 1:42 pm

I get the following exception when I try to click the 'Select Patient' button in the latest 17.1 beta:

'System.ArgumentOutOfRangeException: InvalidArgument=Value of '19' is not valid for 'SelectedIndex'.
Parameter name: SelectedIndex'


The database was updated to 17.1.x from a live 16.4.31 database that's working just fine

Thanks

Code: Select all

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

************** Exception Text **************
System.ArgumentOutOfRangeException: InvalidArgument=Value of '19' is not valid for 'SelectedIndex'.
Parameter name: SelectedIndex
   at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
   at OpenDental.FormPatientSelect.FormSelectPatient_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(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: 4.0.0.0
    Win32 Version: 4.6.1637.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
OpenDental
    Assembly Version: 17.1.2.0
    Win32 Version: 17.1.2.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/OpenDental.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1637.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
OpenDentBusiness
    Assembly Version: 17.1.2.0
    Win32 Version: 17.1.2.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/OpenDentBusiness.DLL
----------------------------------------
CodeBase
    Assembly Version: 16.3.1.0
    Win32 Version: 16.3.1.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/CodeBase.DLL
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1638.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
NHunspell
    Assembly Version: 0.9.6.0
    Win32 Version: 0.9.6.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/NHunspell.DLL
----------------------------------------
SparksToothChart
    Assembly Version: 4.7.1.0
    Win32 Version: 4.7.1.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/SparksToothChart.DLL
----------------------------------------
Microsoft.DirectX.Direct3D
    Assembly Version: 1.0.2902.0
    Win32 Version: 9.05.132.0000
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3D/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3D.dll
----------------------------------------
xImageDeviceManager
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/xImageDeviceManager.DLL
----------------------------------------
SigPlusNET
    Assembly Version: 1.1.4050.24928
    Win32 Version: 
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/SigPlusNET.DLL
----------------------------------------
msvcm90
    Assembly Version: 9.0.30729.9247
    Win32 Version: 9.00.30729.9247
    CodeBase: file:///C:/WINDOWS/WinSxS/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9247_none_5090cb78bcba4a35/msvcm90.dll
----------------------------------------
System.Web.Services
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Web.Services/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
OpenDental.XmlSerializers
    Assembly Version: 17.1.2.0
    Win32 Version: 17.1.2.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/OpenDental.XmlSerializers.DLL
----------------------------------------
AxInterop.AcroPDFLib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/AxInterop.AcroPDFLib.DLL
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1636.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
CDT
    Assembly Version: 16.4.1.0
    Win32 Version: 16.4.1.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/CDT.DLL
----------------------------------------
MySql.Data
    Assembly Version: 6.9.9.0
    Win32 Version: 6.9.9.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/MySql.Data.DLL
----------------------------------------
System.Transactions
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
Oracle.DataAccess
    Assembly Version: 2.112.3.0
    Win32 Version: 2.112.3.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/Oracle.DataAccess.DLL
----------------------------------------
System.EnterpriseServices
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Web
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1637.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
Anesthesia16.4
    Assembly Version: 16.4.6269.37453
    Win32 Version: 16.4.6269.37453
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/Anesthesia.dll
----------------------------------------
System.ServiceProcess
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceProcess/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll
----------------------------------------
Ionic.Zip
    Assembly Version: 1.9.1.4
    Win32 Version: 1.9.1.4
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/Ionic.Zip.DLL
----------------------------------------
OpenDentalHelp
    Assembly Version: 17.1.1.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/OpenDentalHelp.DLL
----------------------------------------
Health.Direct.Common
    Assembly Version: 1.2.0.8
    Win32 Version: 1.2.0.8
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/Health.Direct.Common.DLL
----------------------------------------
Microsoft.DirectX
    Assembly Version: 1.0.2902.0
    Win32 Version: 5.04.00.2904
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.dll
----------------------------------------
Microsoft.DirectX.Direct3DX
    Assembly Version: 1.0.2911.0
    Win32 Version: 9.12.589.0000
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3DX/1.0.2911.0__31bf3856ad364e35/Microsoft.DirectX.Direct3DX.dll
----------------------------------------
Microsoft.VisualC
    Assembly Version: 10.0.0.0
    Win32 Version: 12.00.52512.0 built by: VSWINSERVICING
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualC/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualC.dll
----------------------------------------
AutomaticUpdater
    Assembly Version: 2.6.18.4
    Win32 Version: 2.6.18.4
    CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/AutomaticUpdater16.4.dll
----------------------------------------
SkinSoft.VisualStyler
    Assembly Version: 2.4.0.0
    Win32 Version: 2.4.59444.6
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/SkinSoft.VisualStyler/2.4.0.0__0fda9f423e1d9830/SkinSoft.VisualStyler.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.


Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

User avatar
dgraffeo
Posts: 147
Joined: Wed Sep 24, 2014 3:19 pm

Re: 17.1 Beta Exception

Post by dgraffeo » Wed Apr 05, 2017 2:16 pm

I have attempted to reproduce this and cannot. Any chance we can nab a copy of your database so we can figure out what's going wrong?
"To understand what recursion is, you must first understand recursion."

David Graffeo
Open Dental Software
http://www.opendental.com

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: 17.1 Beta Exception

Post by wjstarck » Thu Apr 06, 2017 7:43 am

It's breaking here on FormPatientSelect:

Code: Select all

			else {
				//if the current user is restricted to a clinic (or in the future many clinics), All will refer to only those clinics the user has access to. May only be one clinic.
				comboClinic.Items.Add(Lan.g(this,"All"));
				comboClinic.SelectedIndex=0;
				_listClinics=Clinics.GetAllForUserod(Security.CurUser);//could be only one if the user is restricted
				for(int i=0;i<_listClinics.Count;i++) {
					if(_listClinics[i].IsHidden) {
						continue;//Don't add hidden clinics to the combo
					}
					comboClinic.Items.Add(_listClinics[i].Abbr);
					if(Clinics.ClinicNum==_listClinics[i].ClinicNum) {
						comboClinic.SelectedIndex=i+1; <----------------------------------------------------
					}
				}
			}
If at least one clinic is hidden.

Steps to reproduce:

Assuming one has multiple clinics set up:

1) Hide at least one clinic
2) The exception will be thrown at the indicated line (currently 847)

If no clinics are hidden the problem will not occur.

Thanks
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: 17.1 Beta Exception

Post by cmcgehee » Thu Apr 06, 2017 8:05 am

That's really great that you can tell us the exact line where the code is breaking. I can tell that this is happening when at least one clinic is hidden. I'll work on getting this fixed.
Chris McGehee
Open Dental Software
http://www.opendental.com

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: 17.1 Beta Exception

Post by cmcgehee » Thu Apr 06, 2017 1:52 pm

I have committed the fix for this bug: "Having a hidden clinic caused UE in Patient Select window."
This will be released in 17.1.3.
Let us know if you find anything else amiss.
Chris McGehee
Open Dental Software
http://www.opendental.com

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: 17.1 Beta Exception

Post by wjstarck » Thu Apr 06, 2017 2:16 pm

Thank you Chris. The fix you just committed did the trick.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

Post Reply