Skip to main content
Topic: Master Detail error (Read 3239 times) previous topic - next topic

Master Detail error

Hi,
i have downloaded the trial of PHPHRAD Classic and i think that is a great tool but one thing brake me to buy the Licensed version, a continuos sistem error that i receive every time i try to configure a master detail relation.
Can someone tell me if it's an error of the trial version?

Thank you
Sergio


Re: Master Detail error

Reply #2
@willvin this is the text (my operating system is in italian):
Le informazioni su come richiamare il debug JIT (Just-In-Time) anziché questa finestra
sono riportate in fondo al messaggio.

************** Testo dell'eccezione **************
System.NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto.
   in PhpRad.FormMasterDetail.TxtDetailTable_SelectedIndexChanged()
   in PhpRad.FormMasterDetail._Lambda$__R26-1(Object a0, EventArgs a1)
   in System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
   in System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
   in System.Windows.Forms.ComboBox.WndProc(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Assembly caricati **************
mscorlib
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.4180.0 built by: NET48REL1LAST_B
    Base di codice: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
PhpRad
    Versione assembly: 1.0.0.0
    Versione Win32: 1.0.0.0
    Base di codice: file:///C:/Program%20Files%20(x86)/PHPRad%20Classic/PhpRad.exe
----------------------------------------
Microsoft.VisualBasic
    Versione assembly: 10.0.0.0
    Versione Win32: 14.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.4001.0 built by: NET48REL1LAST_C
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.4180.0 built by: NET48REL1LAST_B
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.4150.0 built by: NET48REL1LAST_C
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
FastColoredTextBox
    Versione assembly: 2.16.3.0
    Versione Win32: 2.16.3.0
    Base di codice: file:///C:/Program%20Files%20(x86)/PHPRad%20Classic/FastColoredTextBox.DLL
----------------------------------------
Newtonsoft.Json
    Versione assembly: 4.5.0.0
    Versione Win32: 4.5.11.15520
    Base di codice: file:///C:/Program%20Files%20(x86)/PHPRad%20Classic/Newtonsoft.Json.DLL
----------------------------------------
mscorlib.resources
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_it_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Xml.Linq
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Windows.Forms.resources
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_it_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
System.Deployment
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
System.Deployment.resources
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Deployment.resources/v4.0_4.0.0.0_it_b03f5f7f11d50a3a/System.Deployment.resources.dll
----------------------------------------
Microsoft.mshtml
    Versione assembly: 7.0.3300.0
    Versione Win32: 7.0.3300.0
    Base di codice: file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------
System.resources
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.resources/v4.0_4.0.0.0_it_b77a5c561934e089/System.resources.dll
----------------------------------------
Microsoft.VisualBasic.PowerPacks
    Versione assembly: 9.0.0.0
    Versione Win32: 3.0.30214.0
    Base di codice: file:///C:/Program%20Files%20(x86)/PHPRad%20Classic/Microsoft.VisualBasic.PowerPacks.DLL
----------------------------------------
System.Drawing.Design
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing.Design/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.Design.dll
----------------------------------------
System.ComponentModel.DataAnnotations
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.DataAnnotations/v4.0_4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll
----------------------------------------
System.Runtime.Serialization
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.4180.0 built by: NET48REL1LAST_B
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Data
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.4121.0 built by: NET48REL1LAST_C
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Accessibility
    Versione assembly: 4.0.0.0
    Versione Win32: 4.8.3752.0 built by: NET48REL1
    Base di codice: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** Debug JIT **************
Per abilitare il debug JIT, è necessario impostare il valore
jitDebugging nella sezione system.windows.forms del file di configurazione
dell'applicazione o del computer (machine.config).
L'applicazione inoltre deve essere compilata con il debug
abilitato.

Ad esempio:

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

Quando il debug JIT è abilitato, tutte le eccezioni non gestite
vengono inviate al debugger JIT registrato nel computer,
anziché essere gestite da questa finestra di dialogo.

Thank you.


Re: Master Detail error

Reply #4
@willvin i have downloaded the trial of PHPRAD Classic Version 2.7.3, installed on Windows 10 Pro. The issue manifests every time i try to set Master Detail Relation and select the detail table. Sorry but i have no google drive. The Error Window it's the classic error of Not handled exception: Object reference not set to an instance of an object.


Re: Master Detail error

Reply #6
I have a very similar if not the same problem. I am running PHPRad Classic Version 2.7.3 Licensed on Windows 10.
I'm using PHPRad with MS SQL Server.
I go to the "Pages" tab, select a table, then select a field, then on the right side in the "field properties" box I click the "..." after "Master Detail Relation Page" and a box pops up titled "PhpRad" with the message "Object reference not set to an instance of an object.".  I click "OK" and the "Master Detail Relation" dialog box comes up. I click the "DetailTable" dropdown arrow and select a table name. As soon as I select a table name, it crashes.

Perhaps I need to configure something elsewhere, before trying to use this setting, but if that is the case, then the application should give an error message explaining the problem rather than exiting.



Text of the error message:
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 PhpRad.FormMasterDetail.TxtDetailTable_SelectedIndexChanged()
   at PhpRad.FormMasterDetail._Lambda$__R26-1(Object a0, EventArgs a1)
   at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
   at System.Windows.Forms.ComboBox.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.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
PhpRad
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/PHPRad%20Classic/PhpRad.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 14.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4150.0 built by: NET48REL1LAST_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.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
FastColoredTextBox
    Assembly Version: 2.16.3.0
    Win32 Version: 2.16.3.0
    CodeBase: file:///C:/Program%20Files%20(x86)/PHPRad%20Classic/FastColoredTextBox.DLL
----------------------------------------
Newtonsoft.Json
    Assembly Version: 4.5.0.0
    Win32 Version: 4.5.11.15520
    CodeBase: file:///C:/Program%20Files%20(x86)/PHPRad%20Classic/Newtonsoft.Json.DLL
----------------------------------------
System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Deployment
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
Microsoft.VisualBasic.PowerPacks
    Assembly Version: 9.0.0.0
    Win32 Version: 3.0.30214.0
    CodeBase: file:///C:/Program%20Files%20(x86)/PHPRad%20Classic/Microsoft.VisualBasic.PowerPacks.DLL
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.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.




Re: Master Detail error

Reply #8
I've tried setting "Master Table foreign Key" first and it still crashes. I tried this with a table and a view. I also noticed that depending on which field I click on before opening "Set Relation" the "Master Table Foreign Key" list will be blank or it will be populated with all of the other fields in the table/view.

Re: Master Detail error

Reply #9
I think I figured it out. The database was restored from another system and somehow that leaves the database without an owner.
In MS SQL Server Management Studio I right clicked on the database and selected properties. Under Files I set the owner to "sa".

Here is a link to the directions I followed: https://blog.sqlauthority.com/2019/03/04/sql-server-fix-database-diagram-error-15517-cannot-execute-as-the-database-principal-because-the-principal-dbo-does-not-exist/

Re: Master Detail error

Reply #10
Hi

Getting same error "Object reference not set to an instance" but using Mysql. Foreign key is set.

Any help ?

Re: Master Detail error

Reply #11
Resolved. I just recreated the tables.

Re: Master Detail error

Reply #12
Start PHPRad as Administrator. That solved it for me.