DebugView - NullReferenceException


During debug, i'm frequently receiving the following error:
System.NullReferenceException wurde nicht behandelt.
Message="Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
   bei System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   bei System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   bei Pretorianie.Tytan.Tools.DebugViewTool.ReceivedMessage(IList`1 newItems)
   bei Pretorianie.Tytan.Core.DbgView.DebugViewMonitor.InternalDataRefresh(Object sender)
   bei System.Threading._TimerCallback.TimerCallback_Context(Object state)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Threading._TimerCallback.PerformTimerCallback(Object state)

file attachments

Closed Mar 9, 2009 at 12:05 PM by FeydRauth
Validated & closed now.



FeydRauth wrote Feb 25, 2009 at 12:59 PM

Could you please describe me the scenario, you are using ?

Is it during a normal play/testing of your own C/C++ application where lots of OutputMessageString is used. Or when the C# application generating logs with Trace.Write(...) finishes... Do you also monitor serial port messages... ?

Unfortunately based on the attached logs, I can't predict much.

  • Feyd

wrote Feb 25, 2009 at 12:59 PM

thk wrote Feb 25, 2009 at 2:00 PM

Well, of course.

It's a C# multi-threaded application which generates messages partly via Trace.Write and mostly via the Microsoft Enterprise Library 4.1 .
During debug, there's quite a message through-put.
The error itself occurs somewhat randomly, but mostly on the first hundred messages and usually before the application splits the work into several threads.

And no, I don't monitor serial port messages.

Hope it helps.
  • Thorsten

FeydRauth wrote Feb 25, 2009 at 10:45 PM

Could you maybe provide me any kind of source code with proof of concept ? Assuming that this could crash in similar way...
Otherwise the I don't see the way I can test it on my side. Only one idea I have now is to introduce the try-catch block around that method "Pretorianie.Tytan.Tools.DebugViewTool.ReceivedMessage(IList`1 newItems)"...

  • Feyd

thk wrote Feb 26, 2009 at 8:40 AM

Well thats actually a bit difficult.
Since the error occurs somewhat randomly.
Posting some Debug.Write/Trace.Write or Enterprise Library Logger.Write won't really help since I'm using nothing special about that.

I tried to track down the error myself and moved to the latest version which led me to 2 problems ;)
  1. I managed to kill the tytannet options tab inside visual studio (while the addin itself runs smoothly)
  2. At least for now, I wasn't able to reproduce the error at all.
Well I'll re-try it later again when i've got some spare time and if I'm able to produce some short code which leds to it, I'll post it.

btw: I ran into a minor typo which i've attached.
  • Thorsten

wrote Feb 26, 2009 at 8:40 AM

FeydRauth wrote Mar 5, 2009 at 6:34 PM


I have tried to fix your issue. Could you please verify that with latest (v0.20) version and close it if succeeded ?

  • Feyd

wrote Mar 5, 2009 at 6:34 PM

thk wrote Mar 8, 2009 at 11:20 AM


since 0.20 I wasn't able to reproduce the error at all.
So I think this one can be considered as closed ;)

  • Thorsten

wrote Mar 9, 2009 at 12:05 PM

wrote Feb 13, 2013 at 10:15 PM

wrote May 16, 2013 at 3:35 AM