|
-
Dec 10th, 2001, 02:42 AM
#1
Thread Starter
transcendental analytic
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?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Dec 10th, 2001, 03:04 AM
#2
Thread Starter
transcendental analytic
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
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Dec 10th, 2001, 07:59 AM
#3
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.
-
Dec 10th, 2001, 08:05 AM
#4
-
Dec 10th, 2001, 08:08 AM
#5
How to kill the IDE, by kedaman =).
Z.
-
Dec 10th, 2001, 08:13 AM
#6
My copy wont crash unless/until the Class Browser updates. That is probably your problem.
Z.
-
Dec 10th, 2001, 08:39 AM
#7
Thread Starter
transcendental analytic
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
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Dec 10th, 2001, 01:00 PM
#8
Monday Morning Lunatic
You evil bastard 
You can't crash my Editor 99! Hah!
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 10th, 2001, 06:59 PM
#9
Thread Starter
transcendental analytic
not my notepad either
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|