Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Deadlocking spin w/partial template specialization
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

KirillMueller
Ketchup Master

72 Posts

Posted - Jan 04 2006 :  12:24:44 PM  Show Profile  Reply with Quote
The following code produces a situation where the CPU usage reaches 100% and devenv does not accept any commands - not even "after a while". To reproduce the problem, please open any existing solution that contains a C++ project with VS .NET 2003, create a new C++ header file and paste the following code. After some seconds (3 s on my P4 2.4 GHz single-CPU), the deadlock occurs.


template <class PARENT, class THISARG>
class B : public PARENT {
public:
   typedef PARENT Parent;
   typedef THISARG ThisArg;
};

template <class THISARG>
class N : public THISARG {};

template <class THISCLASS, int Nest>
class A : public A<typename THISCLASS::Parent, Nest - 1> {};

template <class THISCLASS>
class A<0> : public N<typename THISCLASS::ThisArg> {};


Note that the problem does not occur if a new header file is created with no solution loaded. Also, the following code works fine:


class N {};

template <int Nest>
class A : public A<Nest - 1> {};

template <>
class A<0> : public N {};


Is there any chance that VA gets modified in such a way that the coloring thread (or whatever causes this deadlock) never ever has the chance to deadlock or even slow down the whole IDE? Colors are fine, but stability comes first for me. I like VA very much, and this is already the second problem that forced me to turn it off :-(

VA_X.dll file version 10.2.1438.0 built 2005.12.16
Licensed to:
VA X: <my license>
VA.NET 7.1:
VAOpsWin.dll version 1.3.1.9
VATE.dll version 1.0.4.11
DevEnv.exe version 7.10.3077.0
msenv.dll version 7.10.3077.0
Font: Courier New 17(Pixels)
Comctl32.dll version 5.82.2900.2180
WindowsNT 5.1 Build 2600 Service Pack 2
Single processor

Platform: Win32
Stable Includes:
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\include;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\include;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include\\prerelease;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include;
E:\\Kirill\\Eigene Dateien\\Studium\\2005 SS\\I11\\LEDA\\incl_old;
E:\\Kirill\\Eigene Dateien\\Studium\\2005 SS\\I11\\LEDA\\incl;

Library Includes:
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\mfc;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\atl;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\crt\\src;

Other Includes:

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jan 04 2006 :  4:39:13 PM  Show Profile  Reply with Quote
confirmed. thank you for the clear example, this is a particularly nasty case.

case=950

VA is supposed to be written so as to avoid these problems, but due to the way it has to hook into the IDE it is not a straight forward program to write or maintain. for what it is worth there are not that many really serious bugs in VAX, and we try to fix any like this very quickly.

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jan 19 2006 :  12:52:38 AM  Show Profile  Reply with Quote
Fixed in 1440.
Go to Top of Page

Rain Dog
Ketchup Master

88 Posts

Posted - Jan 19 2006 :  01:59:29 AM  Show Profile  Reply with Quote
I'm most excited about this =)

I can use VAX again1
Go to Top of Page

KirillMueller
Ketchup Master

72 Posts

Posted - Jan 19 2006 :  03:31:11 AM  Show Profile  Reply with Quote
Works fine for me. Thank you for the quick fix!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000