Error "Division by zero" on loading rvf file

Public forum for discussing TScaleRichView (shareware addon to TRichView providing WYSIWYG editing)
Post Reply
saeid2016
Posts: 64
Joined: Wed Mar 16, 2016 11:56 am

Error "Division by zero" on loading rvf file

Post by saeid2016 » Mon Oct 23, 2017 10:28 am

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 54 times
rvftest.rvf
(16.25 KiB) Downloaded 55 times

Sergey Tkachenko
Site Admin
Posts: 13935
Joined: Sat Aug 27, 2005 10:28 am
Contact:

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

Post by Sergey Tkachenko » Wed Nov 08, 2017 9:38 pm

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.


Post Reply