1

Resolved

Unhandled Exception (Object Reference not set to an instance of an Object)

description

An error occurred on Compare Process:

See description below:

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

************** Exception Text **************
DBDiff.Schema.Misc.SchemaException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at DBDiff.Schema.SQLServer.Generates.Model.Util.FormatCode.FormatCreate(String ObjectType, String body, ISchemaBase item) in c:\dev\open-dbdiff\DBDiff.Schema.SQLServer2005\Model\Util\FormatCode.cs:line 101
at DBDiff.Schema.SQLServer.Generates.Model.Code.ToSql() in c:\dev\open-dbdiff\DBDiff.Schema.SQLServer2005\Model\Code.cs:line 228
at DBDiff.Schema.SQLServer.Generates.Model.Trigger.Compare(ICode obj) in c:\dev\open-dbdiff\DBDiff.Schema.SQLServer2005\Model\Trigger.cs:line 112
at DBDiff.Schema.SQLServer.Generates.Compare.CompareTriggers.DoUpdate[Root](SchemaList2 CamposOrigen, Trigger node) in c:\dev\open-dbdiff\DBDiff.Schema.SQLServer2005\Compare\CompareTriggers.cs:line 20
at DBDiff.Schema.SQLServer.Generates.Compare.CompareBase
1.GenerateDiferences[Root](SchemaList2 CamposOrigen, SchemaList2 CamposDestino) in c:\dev\open-dbdiff\DBDiff.Schema.SQLServer2005\Compare\CompareBase.cs:line 47
at DBDiff.Schema.SQLServer.Generates.Compare.CompareTables.DoUpdate[Root](SchemaList2 CamposOrigen, Table node) in c:\dev\open-dbdiff\DBDiff.Schema.SQLServer2005\Compare\CompareTables.cs:line 18
at DBDiff.Schema.SQLServer.Generates.Compare.CompareBase
1.GenerateDiferences[Root](SchemaList2 CamposOrigen, SchemaList2 CamposDestino) in c:\dev\open-dbdiff\DBDiff.Schema.SQLServer2005\Compare\CompareBase.cs:line 47
at DBDiff.Schema.SQLServer.Generates.Compare.CompareDatabase.GenerateDiferences(Database Origen, Database Destino) in c:\dev\open-dbdiff\DBDiff.Schema.SQLServer2005\Compare\CompareDatabase.cs:line 17
--- End of inner exception stack trace ---
at DBDiff.Schema.SQLServer.Generates.Compare.CompareDatabase.GenerateDiferences(Database Origen, Database Destino) in c:\dev\open-dbdiff\DBDiff.Schema.SQLServer2005\Compare\CompareDatabase.cs:line 45
at DBDiff.Schema.SQLServer.Generates.Generates.Generate.Compare(Database databaseOriginalSchema, Database databaseCompareSchema) in c:\dev\open-dbdiff\DBDiff.Schema.SQLServer2005\Generates\Generate.cs:line 154
at DBDiff.Front.ProgressForm.ProgressForm_Activated(Object sender, EventArgs e) in c:\dev\open-dbdiff\DBDiff\Front\ProgressForm.cs:line 69
at System.Windows.Forms.Form.OnActivated(EventArgs e)
at System.Windows.Forms.Form.set_Active(Boolean value)
at System.Windows.Forms.Form.WmActivate(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: 2.0.0.0
Win32 Version: 2.0.50727.5444 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

DBDiff
Assembly Version: 0.8.6.0
Win32 Version: 0.8.6.0

CodeBase: file:///C:/Users/cleversonafonso/Downloads/openDBDiff/DBDiff.exe

System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.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.5420 (Win7SP1.050727-5400)

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.5420 (Win7SP1.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

DBDiff.Schema.SQLServer
Assembly Version: 0.8.0.0
Win32 Version: 0.8.0.0

CodeBase: file:///C:/Users/cleversonafonso/Downloads/openDBDiff/DBDiff.Schema.SQLServer.DLL

DBDiff.Front
Assembly Version: 0.8.0.0
Win32 Version: 0.8.0.0

CodeBase: file:///C:/Users/cleversonafonso/Downloads/openDBDiff/DBDiff.Front.DLL

DBDiff.Schema
Assembly Version: 0.8.0.0
Win32 Version: 0.8.0.0

CodeBase: file:///C:/Users/cleversonafonso/Downloads/openDBDiff/DBDiff.Schema.DLL

Ascend.Windows.Forms
Assembly Version: 1.0.0.6
Win32 Version: 1.0.0.6

CodeBase: file:///C:/Users/cleversonafonso/Downloads/openDBDiff/Ascend.Windows.Forms.DLL

Ascend
Assembly Version: 1.0.0.6
Win32 Version: 1.0.0.6

CodeBase: file:///C:/Users/cleversonafonso/Downloads/openDBDiff/Ascend.DLL

System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

System.Data.SQLite
Assembly Version: 1.0.65.0
Win32 Version: 1.0.65.0

CodeBase: file:///C:/Users/cleversonafonso/Downloads/openDBDiff/System.Data.SQLite.DLL

System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll

System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll

System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.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.

file attachments

comments

wrote Sep 3, 2011 at 9:26 AM

Fixed on changeset 83176

jspraul wrote Sep 3, 2011 at 9:31 AM

Scripting out stored procedures should do a better job of suppressing any NullReferenceException in the next release. Instead of crashing, Open DBDiff will skip any problems.

It would be best to use the new 'script only checked objects' functionality to narrow down what is causing this problem so that it can be prevented properly.