Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Exception: Divide by 0

edited November 2004 in General
Hi,

Now in RB9 the default printer works good, if there is no printer
installed.

But sometimes in unit:
ppBarCodDrwCmd
there is an exception in function:
AdjustSize(Value: Single): Integer;

when aPixelsPerInch.Y = 0 !!

we use our program on a win 2000 server.

best regards
Ferenc Nemeth

Comments

  • edited November 2004
    Hi Ferenc,

    Thanks for pointing this out. Are you able to determine exactly when (or
    what you are doing while) this exception is occurs? I am unable to recreate
    it and cannot find a case where PixelsPerInch.Y = 0.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2004
    Nico Cizik (Digital Metaphors) wrote:

    Sorry but i cannot determine why this occurs. My experience is:
    only when:

    1 op. sys. is win 2000 server. (with Win2003 server no problem)
    3, no delphi 7 installed. (After installing delphi and recompiling the
    project no problem)
    4, when the program was compiled on win xp with sp1 or sp2
    5, only in the barcode...

    my solution is:
    if PixelsPerInch.Y > 0 then
    Result := .... else
    result:= 0 ;

    i did not see any changes in our reports only there is no AV.

    i know this wont help (:-) but true !


    best regards Feri
  • edited December 2004
    Hi Ferenc,

    Thanks for pointing this out. I will fix this for the next release so that
    this special case will not cause an AV.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.