Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

"Build in progress" for extended periods?
jonskeet
#1 Posted : Sunday, February 12, 2012 7:48:41 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/25/2011(UTC)
Posts: 13
Location: Reading, UK

Was thanked: 3 time(s) in 3 post(s)
I'm using Visual Studio 2010 (Pro) with NCrunch 1.37.0.46b, and I've noticed that recently it's spent a long time not running tests, with messages in the test window such as:

"4405 tests are queued for execution. Monitoring 4484 tests (4 failing) with no tests ignored - build in progress"

The code is building in Visual Studio at this point, so I'm not sure what the problem is.

Sometimes, *something* manages to trigger it springing back into life after a while... but I don't know what.

Is there an extended log I could turn on somewhere to find out what's going on?
Remco
#2 Posted : Sunday, February 12, 2012 9:16:49 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
I've noticed this over the last week happening for me also. I did some investigation and it looks as though this is caused by a performance problem when making a large number of changes to a large source file.

Basically, the individual changes (keystrokes) are bombarding the backend engine to work to do. The engine is taking too long to process the work, and it just stacks up ... if you've been typing code like crazy for a few minutes, it can take quite a while before it catches up. The amount of work required by the backend engine is in proportion to the size of the file you're working in, so you'll probably only notice this with source files that are over 500 lines long. I expect that fast typists will tend to notice it more often too :)

I'm working on a fix at the moment. As far as workarounds are concerned, the only way I've found to clear out the pending work is to restart the IDE or wait for the engine to finish. Resetting NCrunch won't work, because the reset messages go through the same queue :(
DavidLeib
#3 Posted : Sunday, February 19, 2012 4:07:53 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/19/2012(UTC)
Posts: 1
Location: Jerusalem

I have noticed this problem too. It happened to me when Developer Studio was using large amounts of memory (over 2 Gb). I suspect that the build was stopping with an out of memory error (Developer Studio is 32bit) and NCRUNCH did not notice.
Remco
#4 Posted : Sunday, February 19, 2012 8:52:10 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
If there's an out of memory exception, then you're sure to get an explosion. If your system hangs with a build in progress, it's worth checking what's happening in the processing queue. If the queue itself doesn't show any data (or doesn't refresh), then this is the same issue shown above. If the build task in the queue shows a failure, then it's something else :)
jonskeet
#5 Posted : Tuesday, February 21, 2012 7:47:48 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/25/2011(UTC)
Posts: 13
Location: Reading, UK

Was thanked: 3 time(s) in 3 post(s)
Remco;1173 wrote:
If there's an out of memory exception, then you're sure to get an explosion. If your system hangs with a build in progress, it's worth checking what's happening in the processing queue. If the queue itself doesn't show any data (or doesn't refresh), then this is the same issue shown above. If the build task in the queue shows a failure, then it's something else :)


Apologies for not replying to this before - I hadn't seen that it had got any replies.

As it happens, I've got it occurring right this second; I can bring up the processing queue, but it's empty. The UI is responsive (I can move the view around etc) but there's nothing in it.

I'll be very happy to give you any more log data or anything useful to find a fix - ping me an email if you want to take this "offline".

Jon
Remco
#6 Posted : Tuesday, February 21, 2012 9:09:30 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Jon -

I've been getting this problem roughly once per day while working locally in the NCrunch solution, and I've narrowed it down to the code causing the problem. Thanks for your help in highlighting the issue, you can be sure I'll have a fix for it in 1.38b :)


Cheers,

Remco
Marqus
#7 Posted : Wednesday, February 22, 2012 8:00:42 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 2/22/2012(UTC)
Posts: 38
Location: Poland

Thanks: 2 times
Was thanked: 6 time(s) in 6 post(s)
I've got same problem, but I'm not a fast typist, so maybe it's some other, but very similar scenario. Problem occurs very frequently, so nCrunch is almost unusable. Some more information about my environment:
- solution with 15 projects (8 production assemblies + 7 test assemblies)
- in one solution I've got a big (>10k lines) generated source file
- nUnit
- 6 core AMD machine (Win7 64-bit, Vs2010) (4 cores nCrunch, 2 cores VS)

When I make some changes (slowly ;)) to source code (I'm not changing big, generated file) nCrunch behave exacly like Jonskeet wrote - "... build in progress" and empty Queue window.

When 1.38b will be released?
Remco
#8 Posted : Wednesday, February 22, 2012 8:04:23 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
I was originally thinking to push 1.38b out around the middle of next month, but I may need to bring the release forward as this is quite a serious issue. I'll keep you posted.
Remco
#9 Posted : Friday, February 24, 2012 9:37:44 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
I've now successfully implemented a fix for this problem. It's a bit of a mean one. Right now I'm doing my best to wind up the changes on 1.38b so I can kick it out for a release earlier than planned ... it won't be as feature-heavy as I wanted, but at least it should solve this problem. Current target is late next week or early the week after.

Meanwhile, I've identified the following things that will contribute to this problem:

1. Keeping a large number of files open in your IDE while you work
2. Keeping large files open (i.e. if the files above have a high number of lines of code)
3. Making a large number of small changes very rapidly (i.e. if you type quickly and frequently, perhaps preferring this to copy/paste)
4. High test coverage density on all open files - for example, if you have 500 tests covering individual lines of code then you'll notice this much earlier
Remco
#11 Posted : Wednesday, March 7, 2012 12:13:02 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
A fix for the above issue has just gone out the door with the 1.38b release. Upgrading is highly recommended!
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.076 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download