Error when trying to clicking 'Show Source View'

Code profiling for .NET Developers

Moderators: StephenC, Alex.Davies, AndrewH

Error when trying to clicking 'Show Source View'

Postby IBrown » Tue Feb 16, 2010 4:37 pm

Hi,

I get the following error when clicking 'Show Source View' on a method. The method is shown in bold - so Performance Profiler believes that there is source to show. The code is in an IIS based ASP.net application.

Any suggestions? Thanks in advance.

The error message is:

Code: Select all
Object reference not set to an instance of an object.
System.NullReferenceException
   at DevExpress.XtraBars.Docking.DockPanel.Show()
   at aq.p()
   at aq.v(Object , ItemClickEventArgs )
   at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
   at DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link)
   at DevExpress.XtraBars.BarItemLink.OnLinkClick()
   at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
   at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.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)
IBrown
 
Posts: 6
Joined: Tue Feb 16, 2010 4:32 pm

Postby StephenC » Tue Feb 16, 2010 4:42 pm

Hi,

just to quickly check - are you running the most recent version of ANTS Profiler?

Cheers,

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby IBrown » Tue Feb 16, 2010 4:44 pm

I'm using the 14 day trial, labelled as 5.2.0.26.

Thanks for the quick reply.
IBrown
 
Posts: 6
Joined: Tue Feb 16, 2010 4:32 pm

Postby StephenC » Tue Feb 16, 2010 5:05 pm

That's very strange.

So when you first started profiling and then got some data there was never a source code window there by default? Ever?

Because that's the state that is shown whenever the profiler is opened again for a totally new profiling session. Generally there shouldn't even be a real need to use that menu item really unless having manually closed the source code window which generally doesn't happen because the line level timings are generally of most interest.

It's very odd and any details you could provide would be helpful.

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby IBrown » Tue Feb 16, 2010 5:08 pm

To be honest - there may have been one there at some stage. I can't remember offhand. I've tried clicking 'Reset Docking Windows' but it doesn't seem to make any difference.

I don't know whether it helps, but I'm running XP, fully patched, with a dual monitor system.
IBrown
 
Posts: 6
Joined: Tue Feb 16, 2010 4:32 pm

Postby StephenC » Tue Feb 16, 2010 5:46 pm

The profiler doesn't (or shouldn't) remember the state of the code window.

Closing down ANTS and then starting it back up again should automatically display the code window again no matter what its state in the previous profiling session.

If it's now never appearing between totally new sessions of having closed it down and started it up again that's a really strange bug. It appears to involve the 3rd party DevExpress control that's used for the window looking at the stack trace.

If it's the case that the code window doesn't show at all even when having restarted the profiler, then what happens when you start profiling and haven't yet displayed data of any type in the call tree for example - does clicking on the show source code option still then throw the exception with no profiling data visible?

I have one other possible solution to try but let me know how that goes first.

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby IBrown » Tue Feb 16, 2010 5:57 pm

Stephen,

OK - I've tried that. I still don't get the source window. However, when I click on the 'Show Source View' I now no longer get an error dialog - but nothing happens visually.

My screen shows the performance counters panel and the 'method' panel containing the tree view.

Incidentally, I am pretty impressed with the software as a whole.
IBrown
 
Posts: 6
Joined: Tue Feb 16, 2010 4:32 pm

Postby StephenC » Tue Feb 16, 2010 6:01 pm

Just in case you haven't seen it there's also a Methods grid and a Call Graph feature - see the options bar underneath the call tree.

Now that the error has stopped - try the reset docking windows option again and then show source code view. Worth a punt. Apart from V5 i'm out of ideas.

We do have an early access program now for V6. Here's the forum where you can get the build.

http://www.red-gate.com/messageboard/vi ... .php?f=110

It will install along side V5. I would imagine that the code view would be available when you install it. I just wouldn't go about closing it! :)

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby IBrown » Tue Feb 16, 2010 6:08 pm

Stephen,

I'm downloading the EAP build of v6 and will try it later.

I have had a look at the methods grid and call graph - both look useful. The 'Reset Docking Windows' option did not have the desired effect.

Thanks for your help,

Ian.
IBrown
 
Posts: 6
Joined: Tue Feb 16, 2010 4:32 pm

Postby StephenC » Tue Feb 16, 2010 6:15 pm

Happy to help.

Amongst other things we have planned for V6, the current build comes with the ability to analyze File I/O events and SQL events on a local instance of SQL Server if you are interested. There's a Sampling mode which is super quick if you don't need line level profiling.

You can 'switch' out the performance graph using the drop down in the top left corner and select the other graphs to do other analysis. If you have any colleagues etc... who would be interested then send on the link.

Any feedback on these features would be really appreciated.

Thanks,

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby IBrown » Fri Feb 19, 2010 10:47 am

Stephen,

I tried the eap of v6 - making sure that I didn't turn off the code view window. The code view window has reappeared in v5.2.

Thanks for your help.
IBrown
 
Posts: 6
Joined: Tue Feb 16, 2010 4:32 pm

Postby StephenC » Fri Feb 19, 2010 1:14 pm

Not a problem.

I spoke to one of the developers about this and he thinks that deleting the DevExpress keys from the ANTS Profiler registry key would probably work.

We can't replicate this issue so no promises but if anyone else is reading this and has the same problem then please try it and let me know how you get on.

S
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Re:

Postby SharedProphet » Tue Aug 10, 2010 7:52 pm

StephenC wrote:Not a problem.

I spoke to one of the developers about this and he thinks that deleting the DevExpress keys from the ANTS Profiler registry key would probably work.

We can't replicate this issue so no promises but if anyone else is reading this and has the same problem then please try it and let me know how you get on.

S

I seem to be having the same issue, though I never got an error message. The source code view showed up the first couple times I ran the profiler but at some point yesterday it disappeared and there seems to be no way to get it back. I did an uninstall and reinstall on the profiler, hoping it would take care of those registry entries for me, but that didn't help. Before I start deleting things from the registry, which are the specific ones I am supposed to remove? I am using version 6, by the way.
SharedProphet
 
Posts: 3
Joined: Tue Aug 10, 2010 7:50 pm

Postby StephenC » Wed Aug 11, 2010 12:18 pm

Deleting everything in the Dock States key will fix the problem. It’s a DX bug as far as I can tell, haven't worked out a way we can fix it from within the profiler itself.
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Re:

Postby SharedProphet » Wed Aug 11, 2010 4:13 pm

StephenC wrote:Deleting everything in the Dock States key will fix the problem. It’s a DX bug as far as I can tell, haven't worked out a way we can fix it from within the profiler itself.

Ok, that worked. Thanks.
SharedProphet
 
Posts: 3
Joined: Tue Aug 10, 2010 7:50 pm


Return to ANTS Performance Profiler 5

Who is online

Users browsing this forum: No registered users and 1 guest