License information window failing: "Object reference..."

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
nbanek
Posts: 5
Joined: Wed 10 Feb 2010 15:14

License information window failing: "Object reference..."

Post by nbanek » Wed 10 Feb 2010 15:46

I am using dotConnect for PostgreSQL 4.65.79 in Visual Studio 2008 SP1. Every time I try to open the License Information window with my solution (containing 10 to 15 projects including class libraries, WCF services, web applications, Forms applications all using dotConnect) I get the following error: "Object reference not set to an instance of an object."

I have looked in the forum for other occurrences of this and didn't find any solutions, but did see that you requested the call stack for this failure. I have followed those directions and here is my call stack:

Code: Select all

 	Devart.Data.PostgreSql.Design.dll!Devart.Common.Design.x.e(System.Data.DataTable A_0 = {}, EnvDTE.Project A_1 = {System.__ComObject}) + 0x60 bytes	
 	Devart.Data.PostgreSql.Design.dll!Devart.Common.Design.x.d() + 0x670 bytes	
 	Devart.Data.PostgreSql.Design.dll!Devart.Common.Design.x.b(EnvDTE._DTE A_0) + 0x37 bytes	
 	Devart.Data.PostgreSql.Design.dll!Devart.Data.PostgreSql.Design.PgSqlLicenseDialogLauncherService.a(EnvDTE._DTE A_0) + 0x23 bytes	
 	Devart.Data.PostgreSql.Vs.dll!Devart.Data.PostgreSql.Addin.a.d() + 0xb bytes	
 	Devart.Data.PostgreSql.Vs.dll!Devart.Common.Vs.b.g(object A_0, System.EventArgs A_1) + 0x12 bytes	
 	System.dll!System.ComponentModel.Design.MenuCommand.Invoke() + 0x43 bytes	
 	System.dll!System.ComponentModel.Design.MenuCommand.Invoke(object arg) + 0x8 bytes
 	Microsoft.VisualStudio.Shell.dll!Microsoft.VisualStudio.Shell.OleMenuCommandService.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(ref System.Guid guidGroup, uint nCmdId, uint nCmdExcept, System.IntPtr pIn, System.IntPtr vOut) + 0x9d bytes	
 	Microsoft.VisualStudio.Shell.dll!Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(ref System.Guid guidGroup, uint nCmdId, uint nCmdExcept, System.IntPtr pIn, System.IntPtr vOut) + 0x44 bytes	
 	[Native to Managed Transition]	
The exception thrown is a NullReferenceException. One item in the call stack caught by eye and that was a reference to the EnvDTE namespace. I have recently seen some warnings about conflicts between different versions of the EnvDTE namespace. I don't know if there is a connection, but if there is I'm not sure how to solve it since I have not directly created a dependency on the EnvDTE assembly in my code.

Thanks,
Nathan Banek

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 11 Feb 2010 15:09

Please try the following:
- uninstall dotConnect for PostgreSQL;
- clean the \Program Files\Devart\dotConnect folder;
- remove all Devart.* and policy.*.Devart.* files from your GAC;
- clear the bin and obj folders of your project;
- install the dotConnect for PostgreSQL.

If this doesn't help, please try to localize the problem (maybe, it persists only for particular type of projects). A test project will be appreciated. We cannot reproduce the issue at the moment.

nbanek
Posts: 5
Joined: Wed 10 Feb 2010 15:14

Post by nbanek » Thu 11 Feb 2010 15:37

I am going through this process now. Will let you know what I find. As I was doing this, I thought of another potentially important detail. All of the projects in my solution reference the devart assemblies from a local copy I have made rather than from the GAC. This is because when I deploy, I will not be able to install the devart minimal install and must instead rely on embedded licensing of the devart assemblies. Is it possible that the lack of GAC-based references would have an impact on the License Information window?

nbanek
Posts: 5
Joined: Wed 10 Feb 2010 15:14

Narrowed down further

Post by nbanek » Thu 11 Feb 2010 19:57

I narrowed the problem down to the following:

In my solution I have two solution folders that contain files that are not a part of any Visual Studio project. These files are text files, XML files, vsmdi files and other files that relate to the whole solution not just one project. Here are the steps to duplicate the crash:

1) Create a new Console Application project in Visual Studio
2) Remove the project from the solution that is generated (so that you have an empty solution loaded in Visual Studio)
3) Add a new solution folder (I named mine 'Test')
4) Add a single text file from anywhere in your system to that solution folder
5) Select "License Information..." and observe the crash dialog.

I repeated these steps verbatim on my Windows 7 machine and it reproduced the error. I also removed the files not attached to projects from the solution folders in my production solution and it fixed my problem. I will have to do this as a workaround for now when I need to edit license information.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 12 Feb 2010 12:13

The problem does not seem to be connected with the Devart assemblies that are referenced in your application but rather with those used for the dotConnect for PostgreSQL integration with Visual Studio.

We reproduced the error. We will fix it, look forward to the nearest build.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 18 Feb 2010 13:45

We have fixed the problem.

Please try the new 4.85.97 Beta build of dotConnect for PostgreSQL. It can be downloaded from
http://www.devart.com/dotconnect/postgr ... nload.html
(trial version) or from Registered Users' Area (for users with active subscription only). For more information, please refer to
http://www.devart.com/forums/viewtopic.php?t=17145

Post Reply