bug#37620: 26.1; ada-mode 6.2.1 partial parsing occasionally hangs while moving point

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#37620: 26.1; ada-mode 6.2.1 partial parsing occasionally hangs while moving point

Ludovic Brenta
X-Debbugs-CC: [hidden email]
Package: emacs, ada-mode
Version: 26.1
Severity: minor

I'm sorry but I cannot trigger this problem reliably.  Occasionally,
while simply moving in a source file (using up, down, page up, page
down etc.), the *Messages* buffer receives these errors:

Error during redisplay: (jit-lock-function 32410) signaled (error
"wisi-process-parse not getting more text (or bad syntax in process
output)")
Error during redisplay: (jit-lock-function 32910) signaled (error
"wisi-process-parse not getting more text (or bad syntax in process
output)")
Error during redisplay: (jit-lock-function 32940) signaled (error
"wisi-process-parse not getting more text (or bad syntax in process
output)")
Error during redisplay: (jit-lock-function 32971) signaled (error
"wisi-process-parse not getting more text (or bad syntax in process
output)")
Error during redisplay: (jit-lock-function 32973) signaled (error
"wisi-process-parse not getting more text (or bad syntax in process
output)")
Error during redisplay: (jit-lock-function 32988) signaled (error
"wisi-process-parse not getting more text (or bad syntax in process
output)")

and the redisplay freezes.  When this happens I usually have to do
M-x wiki-kill-parser to recover.

This happens once every 3-4 days, both on files that are syncatically
correct and on some being edited (I don't think it makes a difference
anymore as the partial parser is in use in both cases).  Has anyone
observed these errors before?  Could it be caused by moving point too
rapidly for the parser process to keep up?

--
Ludovic Brenta.



Reply | Threaded
Open this post in threaded view
|

bug#37620: update

Stephen Leake-3
The error message:

Error during redisplay: (jit-lock-function 32410) signaled (error
"wisi-process-parse not getting more text (or bad syntax in process
output)")

indicates that the parser running in the external process is taking too
long to responde, so the elisp interface is timing out.

This can be due to two causes;

1. the code has a syntax error that is particularly hard to correct

2. the computer is otherwise loaded, so the parser is running slowly.

Since you report it happening in several files at different places,
cause 1. is not likely.

You can try increasing wisi-process-time-out (default 5 seconds); that
is how long the elisp interace waits for the external parser.

I'll change the error message to mention wisi-process-time-out.

--
-- Stephe



Reply | Threaded
Open this post in threaded view
|

bug#37620: 26.1; ada-mode 6.2.1 partial parsing occasionally hangs while moving point

Ludovic Brenta
In reply to this post by Ludovic Brenta
No, the machine is not particularly loaded.  I believe the most
likely cause is "the code has a syntax error that is particularly
hard to correct"; but this is only because of partial parsing as
the entire file is syntactically correct.

I'll send you the next source file where this happens; maybe
you can reproduce.

Increasing wisi-process-time-out to more than 5 seconds does not
seem like a solution to me; parsing the entire buffer (resulting in
no syntax errors, no attempted recovery and no time-out) takes
less than that.  Also, since we are only moving point in an
unmodified buffer, interactive use requires 0.1 s response time or
less.  Therefore, perhaps a solution would be to /decrease/
wisi-process-time-out and automatically launch a full parse
whenever it happens; as long as the buffer remains unmodified, no
re-parsing will take place.

--
Ludovic Brenta.



Reply | Threaded
Open this post in threaded view
|

bug#37620: 26.1; ada-mode 6.2.1 partial parsing occasionally hangs while moving point

Ludovic Brenta
Triggering this bug is much easier when you jump into the
middle of a file using cross-references from another file
or etags, as opposed to opening the file at the beginning
and then scrolling.  Because if you simply visit a file
(even a large one), partial parsing starts from the beginning
of the file and has a much lower chance of finding syntax
errors.

--
Ludovic Brenta.