Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > ORM Profiler Section > Bugs & Issues> System.NullReferenceException from NamedPipeChannel.Disconnect() when process is shutting down
 

Pages: 1
Bugs & Issues
System.NullReferenceException from NamedPipeChannel.Disconnect() when process is shutting down
Page:1/1 

  Print all messages in this thread  
Poster Message
wesleysmith
User



Location:
Portland, OR, USA
Joined on:
19-Oct-2011 23:47:03
Posted:
32 posts
# Posted on: 05-Feb-2015 20:13:22.  
I have a ASP.NET application that uses the ORMProfiler. Frequently (but not every time), when the application is shutting down (for example due to a application pool recycle), instead of shutting down cleanly, the w3wp.exe process crashes with this stack trace:

Code:
at SD.Tools.OrmProfiler.Interceptor.Channels.NamedPipeChannel.Disconnect()
at SD.Tools.OrmProfiler.Interceptor.Channels.NamedPipeChannel.Finalize()



To me, it appears that a destructor is running and hitting a null pointer.

In case it matters, when the ASP.NET app first starts up, we call:

Code:
InterceptorCore.Initialize("...");
InterceptorCore.DisableMessageSending();


We only re-enable message sending from a special admin page on our site when we're trying to track down a problem, so it's common that the message sending would be disabled for the entire lifetime of the application.

  Top
Otis
ORM Profiler Team



Location:
The Hague, The Netherlands
Joined on:
22-Aug-2011 10:26:38
Posted:
611 posts
# Posted on: 06-Feb-2015 09:20:34.  
We'll check it out!

Frans Bouma
ORM Profiler / LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
Otis
ORM Profiler Team



Location:
The Hague, The Netherlands
Joined on:
22-Aug-2011 10:26:38
Posted:
611 posts
# Posted on: 07-Feb-2015 12:38:58.  
Looks like a bug in the Dispose method, it should check whether the stream is still there, it doesn't. While it's protected with a boolean, it isn't protected against calls from a finalizer which can happen on a different thread and thus cause a problem.

Will correct this on Monday.
Frans Bouma
ORM Profiler / LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
Otis
ORM Profiler Team



Location:
The Hague, The Netherlands
Joined on:
22-Aug-2011 10:26:38
Posted:
611 posts
# Posted on: 09-Feb-2015 11:25:20.  
Could you try the new build? It should fix the problem.

(I did try to get the assemblies on nuget but as that system is more arcane than gnu make, it failed, will try again later).


Frans Bouma
ORM Profiler / LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.09082011 Final.