Visual Studio 2005 becomes unresponsive when error occurrs in DataPortal

Visual Studio 2005 becomes unresponsive when error occurrs in DataPortal

Old forum URL: forums.lhotka.net/forums/t/2550.aspx


dshafer posted on Monday, March 19, 2007

I'm using the local DataPortal with CSLA 2.1.4 and VS2005.  When an error occurrs in the DataPortal_Fetch method, for example with a stored procedure call, Visual Studio becomes unresponsive. When this happens, I have to manually terminate the debugging session through the task manager.  Has anyone else encountered this problem?

Dustin

RockfordLhotka replied on Monday, March 19, 2007

Not quite like that (to my knowledge). However, there are some very odd issues with errors occurring when fetching a read-only list, perhaps you are hitting that or something similar.

The workaround appears to be in the client-side dataportal's Fetch() method, in the exception handling area where the new DataPortalException is created. The business object from the server (whatever state it is in) is included in that exception's constructor.

Changing that line of code to pass Nothing/null for the business object parameter works around at least one odd issue.

tetranz replied on Monday, March 19, 2007

I think you're hitting the same as we discussed here:

http://forums.lhotka.net/forums/permalink/3063/3051/ShowThread.aspx#3051

I discovered that it can be avoided by going to Tools/Options/Debugging/General and unchecking "Unwind the call stack on unhandled exceptions".

I haven't tried it with that turned on since I installed VS 2005 SP1.

Ross

dshafer replied on Monday, March 19, 2007

Thanks for the feedback guys.  I'll give these solutions a try and let y'all know what happens.

Dustin

dshafer replied on Monday, March 19, 2007

Rocky/Tetranz,

You guys hit the nail on the head.  Both of your solutions were successfull in fixing the problem.  In the end I went with the Visual Studio setting so I didn't have to modify the framework.  As Rocky suggested, this was a problem in a ReadOnlyListBase object when a Sql Exception occurred.  Sorry if this was a duplicate post, but I had no idea what keywords to use to search for this issue.

Dustin

RockfordLhotka replied on Monday, March 19, 2007

I just wish I understood what VS was doing to cause the issue so I could try and alter ROLB to work around it… But given that we have a workaround, that research is lower on my priority list than other things.

 

Rocky

 

From: dshafer [mailto:cslanet@lhotka.net]
Sent: Monday, March 19, 2007 3:24 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] Visual Studio 2005 becomes unresponsive when error occurrs in DataPortal

 

Rocky/Tetranz,

You guys hit the nail on the head.  Both of your solutions were successfull in fixing the problem.  In the end I went with the Visual Studio setting so I didn't have to modify the framework.  As Rocky suggested, this was a problem in a ReadOnlyListBase object when a Sql Exception occurred.  Sorry if this was a duplicate post, but I had no idea what keywords to use to search for this issue.

Dustin



Copyright (c) Marimer LLC