Hi,
Our COM server is causing a very strange crash for some clients in C#.
Only in C# under MS Developer Studio, we find that when a client programmer
changes the font of (for example) a label in a form that is created
dynamically at run time - at the point at run-time when the font object is
actually created an arithmetic exception is generated!
The code that is created in the InitializeComponent() function for the label
is like:
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0)));
Looks normal enough - but when executed we get:
"An unhandled exception of type 'System.ArithmeticException' occurred in
system.drawing.dll Additional information: Overflow or underflow in the
arithmetic operation."
When we comment out the creation of our COM component, no problem.
Our COM server has absolutely no "font" interface elements at all. The COM
server works fine in all environments (Delphi, VB, MSVC++, BCBC++, etc.)
under exactly the same conditions.
Any idea where I should start looking - this is a real mystery.
Regards,
Zack.