-
Dangerous code
My latest project crashes MSVC6 IDE, if i copy and paste the code into any other project in any instance of an ide it will instantly crash it after some keypresses or mouse clicks, without even showing up a error message or Send this error report to microsoft or anything.
Anyone had similar problems?
-
IDE Killer located
Took a while to track down what really caused the crash by copying in blocks of lines from notepad until it seemed to crash with the last line of the following:
PHP Code:
class v2x: public scal{public:inline v2x(int p):scal(p){};inline v2x(){};}v2x_;
class rectx1: public rectx1{public:inline v2x(int p):scal(p){};inline v2x(){};}rectx1_;
scal being:
PHP Code:
class scal{
protected:
int s;
public:
inline scal(){};
inline scal(const int a):s(a){};
inline operator int(){return s;};
};
The original scal is much larger but i cut it down. The code is of course faulty, you don't really inherit a class from itself, somehow both lines are needed and the constructor is also yet unrenamed, however renaming it will cause a delayed crash, so i let it be. Here's the correct version:
PHP Code:
class v2x: public scal{public:inline v2x(int p):scal(p){};inline v2x(){};}v2x_;
class rectx1: public scal{public:inline rectx1(int p):scal(p){};inline v2x(){};}rectx1_;
Have fun crashing msvc6 but save your project first ;)
-
Heh, that makes sense... What is probably happening is that when you copy that class declaration in, it tries to populate the Class Browser's list, but since you are inheriting from itself, you are probably getting into a recursive loop, until you overflow the stack. Boom.
Z.
-
-
How to kill the IDE, by kedaman =).
Z.
-
My copy wont crash unless/until the Class Browser updates. That is probably your problem.
Z.
-
Nope there's something more complex, both of the lines are needed for the crash to appear. Otherways i think even M$ would have eliminated that bug.
Well now i'm the official IDE Killer Guru ;)
-
You evil bastard :p
You can't crash my Editor 99! Hah! :D
-