Page 1 of 1

Error "Division by zero" on loading rvf file

Posted: Mon Oct 23, 2017 10:28 am
by saeid2016
Hello,
When I load my attached rvf file by ScaleRichView it gives error: "Division by zero" in ApplyJustify procedure of CRVFData. I use your ActionTest demo.

But when I load it with RichViewEdit component, It loads without any problem.

The attached rvf file paragraph alignment is rvajustify, If I change it to rvaright the ScaleRichView loads it successfully like RichViewEdit.

I attached the used font too.

Re: Error "Division by zero" on loading rvf file

Posted: Wed Nov 08, 2017 9:38 pm
by Sergey Tkachenko
I confirm the problem.
Quick fix (in v17.0.1): open CRVFData.pas, change the line 4608 from

Code: Select all

        if (DX <> 0) and (CurDItem.SpaceCount <> 0) then
to

Code: Select all

        if (DX <> 0) and (CurDItem.SpaceCount <> 0) and (TotalExtraSpace > 0) then
This fix will be included in the next update.

Re: Error "Division by zero" on loading rvf file

Posted: Thu Nov 09, 2017 11:50 am
by Sergey Tkachenko
Fixed in v17.0.2