WPCubed Product Support

EZeroDivide in WPRTEPaint

Hi in some cases the application show the exception

Exception 'EZeroDivide' in module AppSS.exe at 000028E5
Floating point division by zero

in (WPRTEPaint.pas, line 10549)

SetViewportExtEx(dc,
    Round(_PaintPages[PaintPageNr].Width * DestXRes * FCurrentPaintZoom / FCurrentXPixelsPerInch),
 line 10549    Round(_PaintPages[PaintPageNr].Height * DestYRes * FCurrentPaintZoom / FCurrentYPixelsPerInch), nil);

How to avoid this?

#1 ♥ 0
4.5k Views 2 users read 2 min

@eduardo.sic:
Hi in some cases the application show the exception

Exception 'EZeroDivide' in module AppSS.exe at 000028E5
Floating point division by zero

in (WPRTEPaint.pas, line 10549)

SetViewportExtEx(dc,    Round(_PaintPages[PaintPageNr].Width * DestXRes * FCurrentPaintZoom / FCurrentXPixelsPerInch), line 10549    Round(_PaintPages[PaintPageNr].Height * DestYRes * FCurrentPaintZoom / FCurrentYPixelsPerInch), nil);

How to avoid this?

if FCurrentXPixelsPerInch = 0 then
 FCurrentXPixelsPerInch := 600;

if FCurrentYPixelsPerInch = 0 then
 FCurrentYPixelsPerInch := 600;

SetViewportExtEx(dc, Round(_PaintPages[PaintPageNr].Width * DestXRes * FCurrentPaintZoom / FCurrentXPixelsPerInch),        

Round(_PaintPages[PaintPageNr].Height * DestYRes * FCurrentPaintZoom / FCurrentYPixelsPerInch), nil);
#2 ♥ 0
support

Hi,

I changed something here in the latest incarnation. But I assume if this happens, something else is wrong already.

Can you tell, wehnit happens. Do You have a thumbnailview?

Julian

#3 ♥ 0

@wpsupport:
Hi,

I changed something here in the latest incarnation. But I assume if this happens, something else is wrong already.

Can you tell, wehnit happens. Do You have a thumbnailview?

Julian

Hi Julian, o don't have thumbnailview, I believe that it is problem with driver of the Sansung printer, in others custumers the problem don't happen

#4 ♥ 0
This category is archived. No new posts are possible.