HighTechTalks DotNet Forums  

Toolstrip Exception - bad .NET?

Dotnet Framework microsoft.public.dotnet.framework


Discuss Toolstrip Exception - bad .NET? in the Dotnet Framework forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Mike
 
Posts: n/a

Default Toolstrip Exception - bad .NET? - 10-09-2007 , 08:08 AM






I have a program that is crashing on some machines (at a client of
ours). I have determined that it goes down on this line of code:

ToolStrip x = new ToolStrip();

I created a simple test app that only performs this one line of code.
It throws an exception so I know the problem is not caused by
something in my code. It seems like there is a problem with .NET. We
have tried uninstalling and reinstalling .NET 2, but it doesn't help.

Please, please, please, does anybody have any ideas? The following is
the exception info from my test app...

"Parameter is not valid"

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Parameter is not valid.
at System.Drawing.Font.GetHeight(Graphics graphics)
at System.Drawing.Font.get_SizeInPoints()
at System.Drawing.SystemFonts.FontInPoints(Font font)
at System.Drawing.SystemFonts.get_MenuFont()
at System.Windows.Forms.ToolStripManager.get_DefaultF ont()
at System.Windows.Forms.ToolStripItem.get_Font()
at
System.Windows.Forms.ToolStripItemInternalLayout.C ommonLayoutOptions()
at
System.Windows.Forms.ToolStripDropDownButton.ToolS tripDropDownButtonInternalLayout.CommonLayoutOptio ns()
at System.Windows.Forms.ToolStripItemInternalLayout.G etLayoutData()
at System.Windows.Forms.ToolStripItemInternalLayout.P erformLayout()
at System.Windows.Forms.ToolStripDropDownItem.OnBound sChanged()
at System.Windows.Forms.ToolStripItem.SetBounds(Recta ngle bounds)
at System.Windows.Forms.ToolStripOverflowButton.SetBo unds(Rectangle
bounds)
at System.Windows.Forms.ToolStripItem.set_Size(Size value)
at System.Windows.Forms.ToolStrip.get_OverflowButton( )
at
System.Windows.Forms.ToolStripSplitStackLayout.get _OverflowButtonSize()
at
System.Windows.Forms.ToolStripSplitStackLayout.Lay outHorizontal()
at
System.Windows.Forms.ToolStripSplitStackLayout.Lay outCore(IArrangedElement
container, LayoutEventArgs layoutEventArgs)
at System.Windows.Forms.Layout.LayoutEngine.Layout(Ob ject
container, LayoutEventArgs layoutEventArgs)
at System.Windows.Forms.Control.OnLayout(LayoutEventA rgs levent)
at System.Windows.Forms.ScrollableControl.OnLayout(La youtEventArgs
levent)
at System.Windows.Forms.ToolStrip.OnLayout(LayoutEven tArgs e)
at System.Windows.Forms.Control.PerformLayout(LayoutE ventArgs args)
at System.Windows.Forms.Control.PerformLayout()
at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
at System.Windows.Forms.ToolStrip..ctor()
at WindowsApplication2.Form1.button1_Click(Object sender, EventArgs
e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication2
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/NextGen/WindowsApplication2.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />


Reply With Quote
  #2  
Old   
Peter Duniho
 
Posts: n/a

Default Re: Toolstrip Exception - bad .NET? - 10-09-2007 , 01:40 PM






Mike wrote:
Quote:
[...duplicate post snipped...]
Please don't multi-post. Learn to cross-post correctly, if you must
cross-post.

This exact same post was sent to the
microsoft.public.dotnet.languages.csharp newsgroup, and now people in
each newsgroup will not necessarily be aware of answers in the other
newsgroup, causing duplicated effort.

Assuming you get useful answers at all, of course. I can't say that the
problem sounds like a programming problem. More like some kind of
configuration issue. Hard to say for sure, but it doesn't seem like the
sort of thing that will be solved by inspecting the code.

Pete


Reply With Quote
  #3  
Old   
Mike
 
Posts: n/a

Default Re: Toolstrip Exception - bad .NET? - 10-09-2007 , 05:30 PM



Thanks for the reply. What is the proper way to cross post? I
sometimes post in multiple groups because I might get a response in
one and not another.

I agree that the problem is not in the code. I was hoping that by
inspecting the exception info, someone might have an idea about what
is wrong with the framework on this machine. Any ideas?

On Oct 9, 1:40 pm, Peter Duniho <NpOeStPe... (AT) NnOwSlPiAnMk (DOT) com> wrote:
Quote:
Mike wrote:

[...duplicate post snipped...]

Please don't multi-post. Learn to cross-post correctly, if you must
cross-post.

This exact same post was sent to the
microsoft.public.dotnet.languages.csharp newsgroup, and now people in
each newsgroup will not necessarily be aware of answers in the other
newsgroup, causing duplicated effort.

Assuming you get useful answers at all, of course. I can't say that the
problem sounds like a programming problem. More like some kind of
configuration issue. Hard to say for sure, but it doesn't seem like the
sort of thing that will be solved by inspecting the code.

Pete



Reply With Quote
  #4  
Old   
Peter Duniho
 
Posts: n/a

Default Re: Toolstrip Exception - bad .NET? - 10-09-2007 , 07:38 PM



Mike wrote:
Quote:
Thanks for the reply. What is the proper way to cross post? I
sometimes post in multiple groups because I might get a response in
one and not another.
http://www.google.com/search?q=newsg...ost+cross-post


Reply With Quote
  #5  
Old   
Mike
 
Posts: n/a

Default Re: Toolstrip Exception - bad .NET? - 10-10-2007 , 09:10 AM



Thanks Peter! I've seen lots of people complain about multi-posting
(not just to me), but yours was the first time I've ever seen someone
offer an alternative. If I had known about it, I surely would have
done it that way. And I will in the future.

Thanks,
Mike

On Oct 9, 7:38 pm, Peter Duniho <NpOeStPe... (AT) NnOwSlPiAnMk (DOT) com> wrote:
Quote:
Mike wrote:
Thanks for the reply. What is the proper way to cross post? I
sometimes post in multiple groups because I might get a response in
one and not another.

http://www.google.com/search?q=newsg...ost+cross-post



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.