Error "Division by zero" on loading rvf file

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
saeid2016
Posts: 71
Joined: Wed Mar 16, 2016 11:56 am

Error "Division by zero" on loading rvf file

Post 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.
Attachments
IRANSans.rar
(53.71 KiB) Downloaded 1767 times
rvftest.rvf
(16.25 KiB) Downloaded 1740 times
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

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

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

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

Post by Sergey Tkachenko »

Fixed in v17.0.2
Post Reply