This is topic I hate .NET in forum Books, Films, Food and Culture at Hatrack River Forum.


To visit this topic, use this URL:
http://www.hatrack.com/ubb/main/ultimatebb.php?ubb=get_topic;f=2;t=044389

Posted by starLisa (Member # 8384) on :
 
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.
 
Posted by Nighthawk (Member # 4176) on :
 
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.
 
Posted by King of Men (Member # 6684) on :
 
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.
 
Posted by starLisa (Member # 8384) on :
 
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.
 
Posted by starLisa (Member # 8384) on :
 
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.
 
Posted by Nighthawk (Member # 4176) on :
 
My pleasure. Any other programming questions, let me know; takes my mind off my usual, menial and redundant programming duties.
 
Posted by human_2.0 (Member # 6006) on :
 
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.
 
Posted by Nighthawk (Member # 4176) on :
 
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.
 
Posted by starLisa (Member # 8384) on :
 
Right. You have to let their beta testers (otherwise known as their customer base) finish testing first. <grin>
 
Posted by ricree101 (Member # 7749) on :
 
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.
 
Posted by human_2.0 (Member # 6006) on :
 
Didn't want to debate. Cocoa has its problems. Just curious what people thought because they are bragging about it.
 
Posted by Nighthawk (Member # 4176) on :
 
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...
 
Posted by King of Men (Member # 6684) on :
 
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*
 
Posted by Bob_Scopatz (Member # 1227) on :
 
lol.

I miss BASIC.
 


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