473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Very odd font crash in C#

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.
Nov 16 '05 #1
0 1094

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

53
by: Andrew Poulos | last post by:
I've got some CSS that looks like this: body { margin: 0; font-family: Arial, Helvetica, sans-serif; font-size: 140.01%; color: #000000; } but IE won't apply the font size to text in table...
300
by: Ståle Sæbøe | last post by:
I am a bit curious about this. The graphic design people I work with say it is their preferred font for web pages. The reason being that it is "kinder" to the eye both in terms of shape and...
4
by: Jürgen Devlieghere | last post by:
We encounter a crash every now and then at a client, and now I'm starting to doubt the fundamentals of life :-) We have a list of structs. struct SContactProperty { public:...
4
by: Piedro | last post by:
Hi group, as I was browsing the web and checking out w3schools.com I read that the font tag was deprecated and that I should use css styles for formatting like for example <p class="p1"> Text...
10
by: Philip Sherman | last post by:
SELECT columns FROM t1 JOIN t2
0
by: Rahul Chatterjee | last post by:
Hello All I have designed a dotnet application using VB which basically takes a selection and passes value to a crystal report which in turn passes the value to a Stored procedure. After the...
4
by: hawat.thufir | last post by:
Just for posterity: $ pwd /home/thufir/xalon/w3school $ whoami thufir $ ll total 24 -rw-rw-r-- 1 thufir thufir 239 Feb 19 09:16 foo.xml
6
by: semedao | last post by:
Hi All, I had working code that made custom serialization on objects that inherit from queue in the inherited queue I create my own GetObjectData: public void GetObjectData(SerializationInfo info,...
0
by: denappel | last post by:
Hi, Yesterday I was facing a weird problem using Crystal Reports in VS2008. I have to make print label for supermarket products. They use an exotic lettertype for the price, being MarkerGD....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.