0

I am researching a problem related to a method call hanging with my silverlight 5 OOB app.

Please see this piece of code. SourceNodeList and CustomerNodeList are ObservableCollections.

System.Diagnostics.Debug.WriteLine("Loading Tree CustEmp");
this.Adapter = new CustEmpSecAdapter(this);

this.SourceNodeList.Clear();
System.Diagnostics.Debug.WriteLine("clear source list");

this.CustomerNodes.Clear();
System.Diagnostics.Debug.WriteLine("clear customer list");

The problem I am having is that this line of code this.CustomerNodes.Clear(); is not executing.

Just to be clear, I cant reproduce this behavior on my dev machine, but I can on a client's machine.

The reason I can tell the line of code is not being executed is that I am not seeing the debug messages that I have included in the code.

Its like the code is just hanging.

Can anyone provide some insight or has anyone run into something similar before?

dparker
  • 1,082
  • 1
  • 9
  • 14
  • Check if an exception is propagated to the unhandled exception handler (you should have one). If that's not happening, which would be quite odd, try to run the application in-browser if that is possible. That way, you also get what comes out of the plugin's error handler and can check that too. – John Dec 04 '13 at 18:22
  • Thanks John, Unfortunately I have already exhausted those options. In browser version works just fine and there is no exception being thrown. Its like the code just stops executing. This is beyond bizzare. – dparker Dec 05 '13 at 18:41
  • So to be clear, you do see "clear source list", but not "clear customer list"? I also presume you tried single-stepping over the line with a debugger and it hangs on the suspected line? If so, it might simply be some infinite loop (that hangs silverlight completely if happening in the ui thread). Are the ObservableCollections' listeners your own? If so, you should be able to single-step into them. If not, possible options are resharper (debug code you don't have the sources for) or a silverlight profiler such as the one by redgate. – John Dec 06 '13 at 21:27
  • I haven't yet used Resharper although it might be right tool to diagnose that kind of issue if there really is a bug in a third-party library you use. The Silverlight profiler from redgate will probably also tell you what kind of code path your application hangs in after it got stuck. In both cases I assume you really do have an infinite loop there, but I strongly suspect that. – John Dec 06 '13 at 21:31
  • A simple test is also to simply hit "pause" in Visual Studio. In case the code is yours and it's just looping, it will break on the infinite loop. – John Dec 06 '13 at 21:33

0 Answers0