4
Vote

Object Reference not set reading Index

description

Open DBDiff Beta 0.8.9.61
Error Loading Source Database (while Reading Index: [xxxxxxx])
NullReferenceException: Object reference not set to an instance of an object.
at DBDiff.Schema.SQLServer.Generates.Generates.GenerateIndex.Fill(Database database, String connectionString) in DBDiff.Schema.SQLServer2005\Generates\GenerateIndex.cs:line 60
at DBDiff.Schema.SQLServer.Generates.Generates.Generate.Process() in DBDiff.Schema.SQLServer2005\Generates\Generate.cs:line 99
at DBDiff.Front.ProgressForm.ProgressForm_Activated(Object sender, EventArgs e) in DBDiff\Front\ProgressForm.cs:line 89

C1E9E2D4416035F09A12547ACA055A07

comments

jspraul wrote Jan 23, 2013 at 12:50 AM

Thank you for taking the time to create a CodePlex account to report this issue.

Any additional information you can provide, especially if you changed any of the default options (such as unchecking 'table' processing...) would be appreciated.

Enigmaticatious wrote Jan 23, 2013 at 9:09 PM

Not a problem, happy to help.

I believe the issue may relate to permissions, as a collegate was able to successfully use it with the default options without a problem, but I receieved this error. I even reduced the options so that it wasn't checking indexes but the same issue came up. I had the administrator connect me directly using the sa password and it worked.

From what I can tell looking at the source, it is attempting to set the owner of the index class from the owner property of the "parent" object, which has returned null. I found the query that was used to populate the data for this loop and I could successfully run the query directly through SQL Management Studio without problems, so the issue may be relating to some obscure permissions that simply having db_reader was not sufficient for. I would recommend that some exception handling could be added that allowed you to skip individual issues, allowing the rest of the comparison to go ahead rather than stopping the entire comparison based on one minor issue.

greemo wrote Jan 24, 2013 at 1:55 AM

Open DBDiff Beta 0.8.9.61
Error Loading Source Database (while Reading Index: [XXXX])
NullReferenceException: Object reference not set to an instance of an object.
at DBDiff.Schema.SQLServer.Generates.Generates.GenerateIndex.Fill(Database database, String connectionString) in DBDiff.Schema.SQLServer2005\Generates\GenerateIndex.cs:line 60
at DBDiff.Schema.SQLServer.Generates.Generates.Generate.Process() in DBDiff.Schema.SQLServer2005\Generates\Generate.cs:line 99
at DBDiff.Front.ProgressForm.ProgressForm_Activated(Object sender, EventArgs e) in DBDiff\Front\ProgressForm.cs:line 89

C1E9E2D4416035F09A12547ACA055A07

jspraul wrote Jun 17, 2013 at 4:05 PM

jspraul wrote Jun 17, 2013 at 4:28 PM