NullReferenceException on EtwTrace.Trace() call

Mar 30, 2011 at 1:38 PM

Hi,

I'm trying to add NTrace to an existing application, however on the 1st call to EtwTrace.call I'm getting NullReference exception.

When creating a new sample instrumented project it works fine - I get the exception only with existing project which I'm trying to add NTrace functionality to.

I'm using NTrace v1.1.23.

Any idea?

Thanks,

--Eran

Mar 30, 2011 at 2:25 PM

OK, I found out the problem - apparently I forget to switch 'Compile' with 'Instrument' for one of the files in the csproj

Coordinator
Mar 30, 2011 at 2:28 PM

Hi, Eran-

Can you tell me which file needed to be changed? It'll tell me where to look to have it write something a little more informative than "NullReferenceException"...

Thanks!

-Andy Hopper

Mar 30, 2011 at 2:45 PM

Hi Andy,

The file I forgot (or didn't know:-)) I need to change was TraceHelper.cs (the one which defines the provider) - when I looked at the csproj of the sample application I saw this file is marked as 'instrument' so I made the change in my csproj file and it solved the problem.

In addition, I would like to ask whether there are tools for deploying NTrace in mid-to-large scale projects (10s to 100s or more files) - tools that automatically fix the csproj (although I can write a script for that), and more important, change it so it will add new files with 'Instrument'.

--Eran

Mar 30, 2011 at 3:08 PM

And another question, if you will:) how do I component my product with respect to NTrace? I worked in the past in a project (native code) which used wtt tracing and we had components there - is it possible with NTrace (i.e. define components such as GUI, Engine, Setup, and etc.. which I can filter according to them)?

I can see that TraceView.exe does support components (and sub components) and I wonder whether they are applicable for managed code (C# if it matters) as well?

Thanks,

--Eran

Coordinator
Mar 30, 2011 at 3:22 PM
Unfortunately, v1.1.23 doesn't support this, but we're finishing up a major release that adds .NET 4.0 compatibility as well as configurable Flags (aka Components) and Levels.

On Wed, Mar 30, 2011 at 11:08 AM, eranhare <notifications@codeplex.com> wrote:

From: eranhare

And another question, if you will:) how do I component my product with respect to NTrace? I worked in the past in a project (native code) which used wtt tracing and we had components there - is it possible with NTrace (i.e. define components such as GUI, Engine, Setup, and etc.. which I can filter according to them)?

I can see that TraceView.exe does support components (and sub components) and I wonder whether they are applicable for managed code (C# if it matters) as well?

Thanks,

--Eran

Read the full discussion online.

To add a post to this discussion, reply to this email (NTrace@discussions.codeplex.com)

To start a new discussion for this project, email NTrace@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Mar 30, 2011 at 7:57 PM

Thanks Andy.

Do you have any estimation you can share regarding the release date of next version? Do you have a list of new features you can publish as well?

I'm asking this since we're about to deploy tracing in our product, and we're heavily considering NTrace, however componentization is a major requirement for us. Knowing when would this be available will surely help us with the decision:-)

Thanks,

--Eran

Coordinator
Mar 31, 2011 at 12:49 PM
Standard disclaimer: this is a "free time" project for me, so I can't guarantee release dates.

That being said, right now it's pretty close; everything's working under .NET 4.0/VS2010 as a Visual Studio package, and I'm creating an installer for the VSPackage. I'll probably release that as a 2.0 "beta" within the next couple of weeks.

After that, I need to verify that everything still works under .NET2.0/3.0/3.5/VS2008 and ensure that the installer detects VS/.NET versions and installs the appropriate bits based upon what's present. That'll be the second beta and is a month or two away.

On Wed, Mar 30, 2011 at 3:57 PM, eranhare <notifications@codeplex.com> wrote:

From: eranhare

Thanks Andy.

Do you have any estimation you can share regarding the release date of next version? Do you have a list of new features you can publish as well?

I'm asking this since we're about to deploy tracing in our product, and we're heavily considering NTrace, however componentization is a major requirement for us. Knowing when would this be available will surely help us with the decision:-)

Thanks,

--Eran

Read the full discussion online.

To add a post to this discussion, reply to this email (NTrace@discussions.codeplex.com)

To start a new discussion for this project, email NTrace@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Mar 31, 2011 at 2:22 PM

Thanks much, Andy.

Apr 27, 2011 at 5:56 AM

Hi Andy,

Any chance getting the beta soon? Looking forward testing it:-)

Thanks,

--Eran

Coordinator
Apr 29, 2011 at 3:03 AM

Hello, Eran-

Which version of Visual Studio are you coding with? I need to know which one to test against before I send you a drop…

-Andy

From: eranhare [email removed]
Sent: Wednesday, April 27, 2011 1:56 AM
To: andy@hoppersoft.com
Subject: Re: NullReferenceException on EtwTrace.Trace() call [NTrace:251792]

From: eranhare

Hi Andy,

Any chance getting the beta soon? Looking forward testing it:-)

Thanks,

--Eran

Coordinator
Apr 29, 2011 at 4:36 PM

The beta version has been released! Please download this version and give it a whirl.

May 1, 2011 at 7:30 AM

I'm using VS2008 - starting testing the new version.