Possible MSVS 2005 beta2 bugs

Before I consider filing bug reports, I'd like to hear any comments on the following issues I've encountered with Beta2 during my first two days of use:

1) Break point won't work in .h files in managed project.
I have a large mixed native and managed project. Since converting to 2005, break points no longer work in .h files for managed code (the native projects are fine). They say "The break point will not currently be hit. No executable code is associated with this line." The code is certainly there since I can see results on screen. If I simply cut the code and paste it into a .cpp file, break points work fine. I tried to reproduce the issue by making a new Forms project and converting a simple Forms project from 2003, but the problem did not occur in these tests. This is obviously a critical issue for me since I cannot debug half of my managed code.

2) Toggle Grid disabled in Dialog Editor Toolbar.
I have not found a way to enable snap to grid in the designer.

3) Drawing.Point no longer auto casts to Size.
In 2003, this worked fine, but now, the following code will produce an error:
Point a,b,c; c = a - b;
error C2088: '-' : illegal for class
Size works fine, but size has properties Width,Height which are unintuitive for general 2D point calculations.

4) Long pause while editing text.
While simply editing text in a file, the IDE can pause (sometimes with visible hourglass) for over 2 minutes (usually around 30 sec). It then continues fine. There is no HDD access but devenv.exe is using nearly 100% cpu time.

[1647 byte] By [GregDude] at [2008-2-22]
# 1
for 1.) Can you please prvide a small repro-code?
I cannot reporduce it...

for 2.) I can either see "Align to grid" or "Size to grid" but no "Snap to grid"...

for 3.) This seems the be a change in the C++ compiler... (I will look into deeper...)

for 4.) hard to repro... but you might be right...


Greetings
Jochen

JochenKalmbach at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 3
Jochen Kalmbach wrote:
for 3.) see:
http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=e4e0a3fa-c08c-47e8-a1cd-c171f4d6c7d0

Thanks for responding. Yes, I saw this one while checking if the bug had already been reported. This code did compile and run happily with 2003, but it no longer works with 2005. I do not know why the bug was closed as 'resolved' since this is no longer the case.
GregDude at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 4
Jochen Kalmbach wrote:
...

1.) Can you please prvide a small repro-code?
I cannot reporduce it...

I will try to make a minimal example that does this. I am still investigating the circumstances in which it occurs. I have gone into more detail on this specific issue in the debugger forum: http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3118

for 2.) I can either see "Align to grid" or "Size to grid" but no "Snap to grid"...

I think the designer is not finished in this beta. The 'toggle guides' is also dimmed out, even though guide lines are visible. I just want the grid of dots back so I can line things up. The release notes don't mention any of this however.

for 3.) This seems the be a change in the C++ compiler... (I will look into deeper...)

Comment made in the other post.

for 4.) hard to repro... but you might be right...

I have had this happen repeatedly on my main work computer (P4 2.8, hyper threading disabled) , so unless I am special, others should be experiencing this fairly regularly. I have since had pauses longer than 5 minutes, so I have to find something else to do while waiting, or terminate and restart the program. The pauses can happen several times while writting one line of code, but doesn't appear to relate to the usual suspects like auto complete. It's almost like some other background thread is given a too-high priority while analysing my code in some way.

GregDude at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 5
GregDude wrote:
for 3.) see:
http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=e4e0a3fa-c08c-47e8-a1cd-c171f4d6c7d0
I do not know why the bug was closed as 'resolved' since this is no longer the case.

?hh... this bug is not yet closed! There was a similar bug, but it was badly explained and the example was wrong; therefor it was closed. But this one is still open!

JochenKalmbach at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 6
GregDude wrote:
I just want the grid of dots back so I can line things up. The release notes don't mention any of this however.

Haven′t you seen the new auto-alignment while you moving an object on the form? This is way better than fixed grid-lines!
Greetings
Jochen

JochenKalmbach at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 7

Hi GregDude!

cite="midc4115d78-1b3e-41bf-9296-60d38f980abd@discussions.microsoft.com"

type="cite">3) Drawing.Point no longer auto casts to Size.

In 2003, this worked fine, but now, the following code will produce an

error:

Point a,b,c; c = a - b;

error C2088: '-' : illegal for class

Size works fine, but size has properties Width,Height which are

unintuitive for general 2D point calculations.

If you take a look inthe the bug-report, you will see that this was a

bug in the VC2003 compiler!

http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=e4e0a3fa-c08c-47e8-a1cd-c171f4d6c7d0

So you need to change your code oder explicite cast to size:

Point a,b,c; c = a - (Size) b

-- 

Greetings

Jochen
My blog about Win32 and .NET

http://blog.kalmbachnet.de/

MVPUser at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 8
Well to me, that is a strange decision, but at least it is resolved and an explicit cast is present to reduce the pain. I would have thought nothing was more logical than "Point offset = ctrl1.Location - ctrl2.Location;" And who would have thought it used to work only due to a bug.
GregDude at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 9
oh,i see
XiaoFeng at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 10
4) Long pause while editing text.
While simply editing text in a file, the IDE can pause (sometimes with visible hourglass) for over 2 minutes (usually around 30 sec). It then continues fine. There is no HDD access but devenv.exe is using nearly 100% cpu time.

This is most certainly a bug. I've been banging my head against the desk in frustration for the past week. It seemed random, but after poking around a bit, it really started to look like intellisense was hanging in a 100% CPU loop while updating the .ncb. Sure enough, that's the issue.

WORKAROUND:
1. Close VS.Net
2. Find the .ncb for your project (e.g. MyProject.ncb) and delete it.
3. Create an empty file (e.g. a blank .txt file) and rename it to MyProject.ncb.
4. Set MyProject.ncb to be read-only.

With this workaround in place, I have yet to see another hang (we'll see though...). The only issue is that this effectively disables intellisense, so you'll have to decide whether that is worthwhile tradeoff. Personally, I was spending up to 30 minutes every hour waiting on VS.Net while working on my large project to my large solution, so it was an easy call.

BTW, I plan to log this as a bug if it's not logged already.

James

kjaghblb at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 11
kjaghblb wrote:
... This is most certainly a bug. I've been banging my head against the desk in frustration for the past week. It seemed random, but after poking around a bit, it really started to look like intellisense was hanging in a 100% CPU loop while updating the .ncb. Sure enough, that's the issue.
.....
BTW, I plan to log this as a bug if it's not logged already.

James

Please do log the bug. You have investigated this further than I have. I have been keeping a list of when it occurs, which is pretty much anywhere, from moving the cursor around whitespace, to the middle of compile, or tabbing through files. I have had pauses exceeding 5 minutes.

GregDude at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 12
kjaghblb wrote:
4) Long pause while editing text.
While simply editing text in a file, the IDE can pause (sometimes with visible hourglass) for over 2 minutes (usually around 30 sec). It then continues fine. There is no HDD access but devenv.exe is using nearly 100% cpu time.

This is most certainly a bug. I've been banging my head against the desk in frustration for the past week. It seemed random, but after poking around a bit, it really started to look like intellisense was hanging in a 100% CPU loop while updating the .ncb. Sure enough, that's the issue.

WORKAROUND:
1. Close VS.Net
2. Find the .ncb for your project (e.g. MyProject.ncb) and delete it.
3. Create an empty file (e.g. a blank .txt file) and rename it to MyProject.ncb.
4. Set MyProject.ncb to be read-only.

With this workaround in place, I have yet to see another hang (we'll see though...). The only issue is that this effectively disables intellisense, so you'll have to decide whether that is worthwhile tradeoff. Personally, I was spending up to 30 minutes every hour waiting on VS.Net while working on my large project to my large solution, so it was an easy call.

BTW, I plan to log this as a bug if it's not logged already.

James


I found one of the culprits for massive pauses while using the IDE is anti-virus software. I run Norton AntiVirus, and with the default settings (by app or company), it checks every file, so with MSVS 2005 re-saving .ncb and other large files on a regular basis, the anti virus program appeared to be locking and pausing the IDE. When I switched this particular anti-virus program to 'smart' mode, which only checks .exes etc, almost all large pauses are gone.
GregDude at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...