autosave problems, using savehtmlex ...
autosave problems, using savehtmlex ...
hi Sergey,
I automatically save an RVE every 100 seconds, using saveHTMLex. Now when typing very fast (during autosave) the programs hangs itself completely (100% cpu time and not responding).
I'm not sure the problem is caused by RVE, but if I remove the saveHTMLex, there's no problem.
To narrow the search for the cause, I would like to block the user keyboard input, is there a property or method to accomplish that ?
And in general, could there be a problem to be expected, while modifying the RVE during a saveHTMLex ?
I often find solutions, just after telling someone else about my problem ...
... so I just found out, that when I encapsulate the saveHTMLex in beginupdate/endupdate the problem seems to be solved.
Is that the correct way to solve the problem ??
thanks,
I automatically save an RVE every 100 seconds, using saveHTMLex. Now when typing very fast (during autosave) the programs hangs itself completely (100% cpu time and not responding).
I'm not sure the problem is caused by RVE, but if I remove the saveHTMLex, there's no problem.
To narrow the search for the cause, I would like to block the user keyboard input, is there a property or method to accomplish that ?
And in general, could there be a problem to be expected, while modifying the RVE during a saveHTMLex ?
I often find solutions, just after telling someone else about my problem ...
... so I just found out, that when I encapsulate the saveHTMLex in beginupdate/endupdate the problem seems to be solved.
Is that the correct way to solve the problem ??
thanks,
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
hi Sergey,
Although the occurrence is reduced significantly,
it's still not completeley vanished.
I ran the program in the Delphi IDE, and pressed PAUSE when the programs hangs. In first instance the program always stops in tGIFimage, probably busy with an animated image which is showed whenever a richview file is saved.
After removing the animated image, the program hangs always in RVThread.pas, in the while-loop shown below?
Do you have any idea what's causing tis behaviour ?
or suggestions how I can trace and / or prevent the effect ?
thanks,
Stef Mientki
procedure TRVWordEnumThread.Stop(ResetNexts: Boolean);
{$IFNDEF RICHVIEWDEF6}
var Msg: TMsg;
{$ENDIF}
begin
if (StopWorking=3) then
exit;
if ResetNexts then begin
NextRVData := nil;
NextItemNo := -1;
NextOffs := -1;
end;
if Suspended then
exit;
StopWorking := 1;
if not Delaying then begin
Priority := tpNormal;
while (StopWorking=1) and not Suspended do
{$IFDEF RICHVIEWDEF6}CheckSynchronize;{$ELSE}
if PeekMessage(Msg, 0, $8FFF, $8FFF, PM_REMOVE) then
DispatchMessage(Msg);
{$ENDIF};
Although the occurrence is reduced significantly,
it's still not completeley vanished.
I ran the program in the Delphi IDE, and pressed PAUSE when the programs hangs. In first instance the program always stops in tGIFimage, probably busy with an animated image which is showed whenever a richview file is saved.
After removing the animated image, the program hangs always in RVThread.pas, in the while-loop shown below?
Do you have any idea what's causing tis behaviour ?
or suggestions how I can trace and / or prevent the effect ?
thanks,
Stef Mientki
procedure TRVWordEnumThread.Stop(ResetNexts: Boolean);
{$IFNDEF RICHVIEWDEF6}
var Msg: TMsg;
{$ENDIF}
begin
if (StopWorking=3) then
exit;
if ResetNexts then begin
NextRVData := nil;
NextItemNo := -1;
NextOffs := -1;
end;
if Suspended then
exit;
StopWorking := 1;
if not Delaying then begin
Priority := tpNormal;
while (StopWorking=1) and not Suspended do
{$IFDEF RICHVIEWDEF6}CheckSynchronize;{$ELSE}
if PeekMessage(Msg, 0, $8FFF, $8FFF, PM_REMOVE) then
DispatchMessage(Msg);
{$ENDIF};
some more information: it has nothing todo with savehtmlex.
The program just hangs, when typing very fast.
It seem to happen more often, when you edit in the middle of a document,
compared to editing at the end of the document.
I'm using 1.9.6, and I didn't see any related problems solved in the newer releases (unless it's one of those "nameless major fixes"
cheers,
The program just hangs, when typing very fast.
It seem to happen more often, when you edit in the middle of a document,
compared to editing at the end of the document.
I'm using 1.9.6, and I didn't see any related problems solved in the newer releases (unless it's one of those "nameless major fixes"
cheers,
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
thanks Sergey,
I updated to 1.9.24 ,....
... but the result is even worse
The program hangs much faster,
sometimes at the point mentioned in my previous message,
sometimes at the point below.
I checked on 4 PC's, and at some PC's the problem can be generated faster then on other PC's. The PC's where it occures the fastest, are the fastest PC's, but these PC's have a small (32MB) video card on board.
Any more suggestions ?
thanks,
Stef Mientki
(Classes.pas)
function CheckSynchronize(Timeout: Integer = 0): Boolean;
var
SyncProc: PSyncProc;
LocalSyncList: TList;
begin
if GetCurrentThreadID <> MainThreadID then
raise EThread.CreateResFmt(@SCheckSynchronizeError, [GetCurrentThreadID]);
if Timeout > 0 then
WaitForSyncEvent(Timeout)
else
I updated to 1.9.24 ,....
... but the result is even worse
The program hangs much faster,
sometimes at the point mentioned in my previous message,
sometimes at the point below.
I checked on 4 PC's, and at some PC's the problem can be generated faster then on other PC's. The PC's where it occures the fastest, are the fastest PC's, but these PC's have a small (32MB) video card on board.
Any more suggestions ?
thanks,
Stef Mientki
(Classes.pas)
function CheckSynchronize(Timeout: Integer = 0): Boolean;
var
SyncProc: PSyncProc;
LocalSyncList: TList;
begin
if GetCurrentThreadID <> MainThreadID then
raise EThread.CreateResFmt(@SCheckSynchronizeError, [GetCurrentThreadID]);
if Timeout > 0 then
WaitForSyncEvent(Timeout)
else
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
(un)fortunately I've worked for the past few years on just 1 (huge) application that uses RVE.
From about 10 users I know they have never seen this problem,
I now have one user (who is typing very fast) that reported the problem. From what we can remember, the problem occurred for the first time half a year ago, probably when I updated to 1.9.6, when I implemented spell checking, I Spell, (and a lot of other things not related to RVE).
Sergey, from your question, I assume that you until now never heard of this problem and don't have an idea if it's caused by RVE and where it's caused.
Because of the size of my program, I can also not garantee that it's caused by RVE, but as far as I can see, nothing special happens in my program (although deleting the animated image did influence the bahaviour).
Does it help if I try to make a small program, trying to get the same problem ?
cheers,
From about 10 users I know they have never seen this problem,
I now have one user (who is typing very fast) that reported the problem. From what we can remember, the problem occurred for the first time half a year ago, probably when I updated to 1.9.6, when I implemented spell checking, I Spell, (and a lot of other things not related to RVE).
Sergey, from your question, I assume that you until now never heard of this problem and don't have an idea if it's caused by RVE and where it's caused.
Because of the size of my program, I can also not garantee that it's caused by RVE, but as far as I can see, nothing special happens in my program (although deleting the animated image did influence the bahaviour).
Does it help if I try to make a small program, trying to get the same problem ?
cheers,
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
FOUND IT
But no explanantion:
This hangs the process:
this works fine (although I've no response from my fastest user
The combobox is a special one derived form customcombo-box,
but there's nothing special arounf "itemindex".
Any explanation ?
cheers,
Stef
But no explanantion:
This hangs the process:
Code: Select all
procedure Tform_rve_edit.RVESpellingCheck(Sender: TCustomRichView;
const AWord: String; StyleNo: Integer; var Misspelled: Boolean);
(*******************************************************************************
*******************************************************************************)
begin
misspelled:=false;
if SpellLanguageComboBox1.ItemIndex<=0) or
not(Speller_available) then exit;
end;
Code: Select all
procedure Tform_rve_edit.RVESpellingCheck(Sender: TCustomRichView;
const AWord: String; StyleNo: Integer; var Misspelled: Boolean);
(*******************************************************************************
*******************************************************************************)
begin
misspelled:=false;
if (Spell_language<=0) or
not(Speller_available) then exit;
end;
but there's nothing special arounf "itemindex".
Any explanation ?
cheers,
Stef
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: