FacebookTwitter
Hatrack River Forum   
my profile login | search | faq | forum home

  next oldest topic   next newest topic
» Hatrack River Forum » Active Forums » Books, Films, Food and Culture » I hate .NET

   
Author Topic: I hate .NET
Lisa
Member
Member # 8384

 - posted      Profile for Lisa   Email Lisa         Edit/Delete Post 
Can they think of any way to make this more difficult?

I'm working on this gargantuan rewrite of stuff in .NET, and we have a solution that contains more than 50 projects in it (don't ask). One of them is a UserControls library, and one of the three UserControls in it gives me a stack overload when I try to place it on a form.

But is there any place where I can see what was going on in the stack? No. I have to take VS.NET's word for it that there's a stack overload. I can't debug the control as I put it on the form. I can do that with ASP.NET (through the insane mechanism of opening VS.NET in VS.NET), but I can't do it with Windows Forms.

I even went into the control, commented everything out, recompiled it, and I'm still getting a stack overflow. The hell? What can possibly be overflowing?

There's apparently a stack explorer that can be used for .NET 2.0. Of course, we're using 1.1. Of course we are.

I feel like biting someone.

Posts: 12266 | Registered: Jul 2005  |  IP: Logged | Report this post to a Moderator
Nighthawk
Member
Member # 4176

 - posted      Profile for Nighthawk   Email Nighthawk         Edit/Delete Post 
It is a pain in the neck when it comes to controls because, in the graphical designer, the rendering is being done by code that you write. So if you have an infinite loop, stack overflow or general crash in your rendering code, the designer will be affected without you even having to run the application as a whole.

Another option you have is try to put the control in to the form dynamically in the constructor:

Control sCtrl = new WhateverTheControlClassIs();
sCtrl.Location = new Point( MyX, MyY );
sCtrl.Size = new Size( MyWidth, MyHeight );
Controls.Add( sCtrl );

Then "Run"... if it gives you a stack overflow, at least it'll be in the debugger.

Posts: 3486 | Registered: Sep 2002  |  IP: Logged | Report this post to a Moderator
King of Men
Member
Member # 6684

 - posted      Profile for King of Men   Email King of Men         Edit/Delete Post 
Cheer up, you could always go back to assembly. My father is always bragging that Real Programmers patch the binary, on the basis of once having fixed a bug that way.
Posts: 10645 | Registered: Jul 2004  |  IP: Logged | Report this post to a Moderator
Lisa
Member
Member # 8384

 - posted      Profile for Lisa   Email Lisa         Edit/Delete Post 
quote:
Originally posted by Nighthawk:
It is a pain in the neck when it comes to controls because, in the graphical designer, the rendering is being done by code that you write. So if you have an infinite loop, stack overflow or general crash in your rendering code, the designer will be affected without you even having to run the application as a whole.

Another option you have is try to put the control in to the form dynamically in the constructor:

Control sCtrl = new WhateverTheControlClassIs();
sCtrl.Location = new Point( MyX, MyY );
sCtrl.Size = new Size( MyWidth, MyHeight );
Controls.Add( sCtrl );

Then "Run"... if it gives you a stack overflow, at least it'll be in the debugger.

That's a thought. Unfortunately, this isn't an executable. The form is in a dll that will be called by (of all things) MSWord. Eventually.

Though I guess I can make a test app to try this. I'll give that a go.

Posts: 12266 | Registered: Jul 2005  |  IP: Logged | Report this post to a Moderator
Lisa
Member
Member # 8384

 - posted      Profile for Lisa   Email Lisa         Edit/Delete Post 
Nighthawk, you rock. You are my hero. Not only did that work, but it actually opened the control's code in the debugger and let me step through to find the problem. Which was not, incidentally, a stack overflow problem.
Posts: 12266 | Registered: Jul 2005  |  IP: Logged | Report this post to a Moderator
Nighthawk
Member
Member # 4176

 - posted      Profile for Nighthawk   Email Nighthawk         Edit/Delete Post 
My pleasure. Any other programming questions, let me know; takes my mind off my usual, menial and redundant programming duties.
Posts: 3486 | Registered: Sep 2002  |  IP: Logged | Report this post to a Moderator
human_2.0
Member
Member # 6006

 - posted      Profile for human_2.0   Email human_2.0         Edit/Delete Post 
Apple says Cocoa is their secret weapon. It allows them to develop and deploy applications much faster than Microsoft. They just rolled out Objective-C 2.0 which includes garbage collection.
Posts: 1209 | Registered: Dec 2003  |  IP: Logged | Report this post to a Moderator
Nighthawk
Member
Member # 4176

 - posted      Profile for Nighthawk   Email Nighthawk         Edit/Delete Post 
Oh, don't bring another Apple/Windows debate in here! [Wink]

If you know what you're doing, Microsoft applications could be deployed reasonably fast. And .NET 2.0, at least in theory, does make the development process easier because it's "compile on demand" rather than precompilation of the entire project.

I'm not using 2.0 yet; I never install any Microsoft product before at least the first or second service pack.

Posts: 3486 | Registered: Sep 2002  |  IP: Logged | Report this post to a Moderator
Lisa
Member
Member # 8384

 - posted      Profile for Lisa   Email Lisa         Edit/Delete Post 
Right. You have to let their beta testers (otherwise known as their customer base) finish testing first. <grin>
Posts: 12266 | Registered: Jul 2005  |  IP: Logged | Report this post to a Moderator
ricree101
Member
Member # 7749

 - posted      Profile for ricree101   Email ricree101         Edit/Delete Post 
So far, I've had no problems with 2.0, but I'm using it pretty casually so I don't know how good of an indicator that is.
Posts: 2437 | Registered: Apr 2005  |  IP: Logged | Report this post to a Moderator
human_2.0
Member
Member # 6006

 - posted      Profile for human_2.0   Email human_2.0         Edit/Delete Post 
Didn't want to debate. Cocoa has its problems. Just curious what people thought because they are bragging about it.
Posts: 1209 | Registered: Dec 2003  |  IP: Logged | Report this post to a Moderator
Nighthawk
Member
Member # 4176

 - posted      Profile for Nighthawk   Email Nighthawk         Edit/Delete Post 
Am I bragging? Well, if I am, it's because the Microsoft hive mind made me, so forgive me if it's an entirely involuntary action.

I have so many projects done in 1.1 that it's too much of a risk to convert to the new Studio and 2.0 without being absolutely sure that no chaos will result from it. And, well, you do know that the words "Microsoft" and "chaos" appear in a great deal of sentences together...

Posts: 3486 | Registered: Sep 2002  |  IP: Logged | Report this post to a Moderator
King of Men
Member
Member # 6684

 - posted      Profile for King of Men   Email King of Men         Edit/Delete Post 
And you just created another one, completely without cause! Now it will show up in all the Google searches and further confuse the issue, making it look as though Microsoft are incompetent! Clearly you are a shill for the Great Linux Conspiracy. Crucify! Crucify!

*Runs out of thread screaming*

Posts: 10645 | Registered: Jul 2004  |  IP: Logged | Report this post to a Moderator
Bob_Scopatz
Member
Member # 1227

 - posted      Profile for Bob_Scopatz   Email Bob_Scopatz         Edit/Delete Post 
lol.

I miss BASIC.

Posts: 22497 | Registered: Sep 2000  |  IP: Logged | Report this post to a Moderator
   

   Close Topic   Feature Topic   Move Topic   Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:


Contact Us | Hatrack River Home Page

Copyright © 2008 Hatrack River Enterprises Inc. All rights reserved.
Reproduction in whole or in part without permission is prohibited.


Powered by Infopop Corporation
UBB.classic™ 6.7.2