Accessviolation editng a merged RVF
-
- Posts: 206
- Joined: Thu Sep 15, 2005 1:41 am
- Location: California
Accessviolation editng a merged RVF
I can't reproduce this error but several of my customers get it repeatedly. They're trying to edit the merged document, sometimes just typing text, other times deleting table rows. Attached is the RVF before and after the merge. The customer told me they tried to clear and retype the
RVTable.pas RVTable TRVTableItemInfo CreateInplace 11694 102
Thanks for any help!
RVTable.pas RVTable TRVTableItemInfo CreateInplace 11694 102
Thanks for any help!
- Attachments
-
- EurekaLogCallStack.png (181.29 KiB) Viewed 10697 times
-
- BeforeMerge.rvf
- (100.96 KiB) Downloaded 927 times
-
- AfterMerge.rvf
- (53.85 KiB) Downloaded 920 times
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Accessviolation editng a merged RVF
What version of TRichView do you use? It looks like these line numbers do not correspond to the code of TRichView 20.1.
-
- Posts: 206
- Joined: Thu Sep 15, 2005 1:41 am
- Location: California
Re: Accessviolation editng a merged RVF
I'm using v20.0.2 (2022-01-27), but the RVF file is loaded from our customer's DB and the 2 customers having the most problems have been with us since 2006.
I thought an old rvf could be the issue so I opened and save the file again but it had no effect. I just got off the phone with a customer having the issue and had them downgrade to a year-old version of our app and it worked.
I have no issues running our app and editing the merged docs, just 3 or 4 customers. Some use the Protect feature, so i unprotected and had them try, still failed.
Our RVF templates can be 10 years old or more. Some customers have100 templates.
I thought an old rvf could be the issue so I opened and save the file again but it had no effect. I just got off the phone with a customer having the issue and had them downgrade to a year-old version of our app and it worked.
I have no issues running our app and editing the merged docs, just 3 or 4 customers. Some use the Protect feature, so i unprotected and had them try, still failed.
Our RVF templates can be 10 years old or more. Some customers have100 templates.
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Accessviolation editng a merged RVF
I answered in a private message
-
- Posts: 206
- Joined: Thu Sep 15, 2005 1:41 am
- Location: California
Re: Accessviolation editng a merged RVF
I posted this in a private message but not sure it took and want to be sure you get the attachments. I can reproduce the error myself now on an unmerged rvf on my backup pc. See attached.
I use Devexpress spell checker.
I upgraded to 20.1
I use Devexpress spell checker.
I upgraded to 20.1
- Attachments
-
- FSRJobWalkVRLA.zip
- (41.62 KiB) Downloaded 963 times
-
- RVTableInDebugger2.zip
- (225.56 KiB) Downloaded 956 times
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Accessviolation editng a merged RVF
What's the exceptions exactly?
Is it a range check error?
The problem with GetMessageTime was recently reported by another customer.
The solution is to find all calls of GetMessageTime in TRichView code and typecast them to Cardinal, i.e. this line must be
There are other calls of GetMessageTime, they all need to be typecasted (if it is already typecasted to UINT, it's ok)
Is it a range check error?
The problem with GetMessageTime was recently reported by another customer.
The solution is to find all calls of GetMessageTime in TRichView code and typecast them to Cardinal, i.e. this line must be
Code: Select all
tie.FClickTime := {$IFDEF FIREMONKEY}TThread.GetTickCount{$ELSE}Cardinal(GetMessageTime){$ENDIF};
-
- Posts: 206
- Joined: Thu Sep 15, 2005 1:41 am
- Location: California
Re: Accessviolation editng a merged RVF
That worked! Thanks!
-
- Posts: 206
- Joined: Thu Sep 15, 2005 1:41 am
- Location: California
Re: Accessviolation editng a merged RVF
Got a range check violation at:
Range check error at (01F9E0B8){WFM.EXE } [0239E0B8] RichView.TCustomRichView.WndProc (Line 6718, "RichView.pas") + $9.
It casts to a UINT: UINT(GetMessageTime)
Should I change UINT to CARDINAL? Delphi 10.3 fails to find GetMessageTime, not sure why, going to use Visual Studio to search for more. It is in RVTInplace as well. Please advise.
procedure TCustomRichView.WndProc(var Message: TMessage);
begin
case Message.msg of
WM_LBUTTONDOWN:
begin
if (FDblClickTime <> 0) and
(UINT(GetMessageTime) - UINT(FDblClickTime) < GetDoubleClickTime) then
begin
SendTripleClickMessage;
exit;
end;
FDblClickTime := 0;
end;
WM_LBUTTONDBLCLK:
begin
FDblClickTime := GetMessageTime;
end;
end;
inherited WndProc(Message);
end;
Range check error at (01F9E0B8){WFM.EXE } [0239E0B8] RichView.TCustomRichView.WndProc (Line 6718, "RichView.pas") + $9.
It casts to a UINT: UINT(GetMessageTime)
Should I change UINT to CARDINAL? Delphi 10.3 fails to find GetMessageTime, not sure why, going to use Visual Studio to search for more. It is in RVTInplace as well. Please advise.
procedure TCustomRichView.WndProc(var Message: TMessage);
begin
case Message.msg of
WM_LBUTTONDOWN:
begin
if (FDblClickTime <> 0) and
(UINT(GetMessageTime) - UINT(FDblClickTime) < GetDoubleClickTime) then
begin
SendTripleClickMessage;
exit;
end;
FDblClickTime := 0;
end;
WM_LBUTTONDBLCLK:
begin
FDblClickTime := GetMessageTime;
end;
end;
inherited WndProc(Message);
end;
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Accessviolation editng a merged RVF
UINT and Cardinal are the same in Windows platforms.
You can change this line to:
but it should not affect the result.
Do you mean Delphi 10.3 does not display a documentation on GetMessageTime?
Make sure that the modified files are recompiled.
To be completely sure, recompiled TRichView packages.
Run "Install TRichView in Delphi IDE" shortcut in Windows Start menu.
You can change this line to:
Code: Select all
(Cardinal(GetMessageTime) - FDblClickTime < GetDoubleClickTime) then
Do you mean Delphi 10.3 does not display a documentation on GetMessageTime?
Make sure that the modified files are recompiled.
To be completely sure, recompiled TRichView packages.
Run "Install TRichView in Delphi IDE" shortcut in Windows Start menu.
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Accessviolation editng a merged RVF
Fixed in TRichView 20.2