Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Deadlocking spin w/partial template specialization

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
KirillMueller Posted - Jan 04 2006 : 12:24:44 PM
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:

4   L A T E S T    R E P L I E S    (Newest First)
KirillMueller Posted - Jan 19 2006 : 03:31:11 AM
Works fine for me. Thank you for the quick fix!
Rain Dog Posted - Jan 19 2006 : 01:59:29 AM
I'm most excited about this =)

I can use VAX again1
support Posted - Jan 19 2006 : 12:52:38 AM
Fixed in 1440.
feline Posted - Jan 04 2006 : 4:39:13 PM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000