[slime-devel] Fontification bug

Carlos Konstanski ckonstanski at pippiandcarlos.com
Mon Oct 19 15:20:02 UTC 2009


On Mon, 19 Oct 2009, Alain Picard wrote:

> Date: Mon, 19 Oct 2009 13:19:32 +1100
> From: Alain Picard <Dr.Alain.Picard at gmail.com>
> To: slime-devel at common-lisp.net
> Subject: [slime-devel] Fontification bug
> 
>
> Slime spat this out at me:
>
>   Warning (slime): "ele-bdb.asd":46:33 (pt=1463).
>   Caught error during fontification while searching for forms
>   that are suppressed by reader-conditionals. The error was: (cl-assertion-failed (<= (point) limit)).
>
>   This is a bug in Slime itself. Please report this to the
>   mailinglist slime-devel at common-lisp.net and include your Emacs
>   version, the guilty Lisp source file, the header of this
>   message, and the following backtrace.
>
>   Backtrace:
>     backtrace()
>     slime-bug("Caught error during fontification while searching for forms
>   that are suppressed by reader-conditionals. The error was: %S." (cl-assertion-failed (<= (point) limit)))
>     byte-code("\302\303\304	\"\207" [result condition nil slime-bug "Caught error during fontification while searching for forms
>   that are suppressed by reader-conditionals. The error was: %S."] 3)
>     slime-search-suppressed-forms(1101)
>     font-lock-fontify-keywords-region(534 1101 nil)
>     font-lock-default-fontify-region(534 1101 nil)
>     font-lock-fontify-region(534 1101)
>     run-hook-with-args(font-lock-fontify-region 534 1101)
>     byte-code("\302\303	#\207" [start next run-hook-with-args jit-lock-functions] 4)
>     jit-lock-fontify-now(534 1034)
>     jit-lock-function(534)
>
>   --------------------------------------------------------------
>
> So I'm dutifully following its instructions, and including
> this file:

I get this one a lot too. Unfortunately it is difficult to reproduce
on demand. But it always seems to happen (to me) when I am inserting a
line of text into an existing block of code. Take the following code
for example:


        (unwind-protect
             (progn
               (get-session-travel-log session-travel-log travel-log-id)
               (when session-travel-log
                 (setf travel-log-id (id session-travel-log))
                 (setf lastaccessedby (get-lastaccessedby travel-log-pkg session-travel-log)))
               (setf travel-logs (get-travel-logs travel-log-pkg))
               (setf dealers (get-users travel-log-pkg authenticated-user :roles 'roles_dealer :permission 'permissions_travel_log_view))
               (setf dealer (let ((dealer (get-record travel-log-pkg (make-instance 'user :id (dealer_id session-travel-log)))))
                              (if dealer dealer (make-instance 'user)))))
          (disconnect travel-log-pkg))


If I insert an unfinished form and a newline in there somewhere,
causing an existing line of code to be pushed down a line, and (most
importantly) starting at the 0th column, that's when I get the error
message:


        (unwind-protect
             (progn
               (
(get-session-travel-log session-travel-log travel-log-id)
               (when session-travel-log
                 (setf travel-log-id (id session-travel-log))
                 (setf lastaccessedby (get-lastaccessedby travel-log-pkg session-travel-log)))
               (setf travel-logs (get-travel-logs travel-log-pkg))
               (setf dealers (get-users travel-log-pkg authenticated-user :roles 'roles_dealer :permission 'permissions_travel_log_view))
               (setf dealer (let ((dealer (get-record travel-log-pkg (make-instance 'user :id (dealer_id session-travel-log)))))
                              (if dealer dealer (make-instance 'user)))))
          (disconnect travel-log-pkg))


But it only happens once in a while. I cannot make it happen right
now, for instance. There must be some other factor(s) that cause the
error message to appear. Yet I am quite sure that having a line of
code at the leftmost column is a crucial element. When the error
message appears, it keeps popping up quite annoyingly and will not go
away. Indenting the left-justified line is a sure way to make the
error popups stop.

The next time it happens to me, I will send an email to the list
immediately, along with the entire buffer of code I am working on.

Carlos Konstanski




More information about the slime-devel mailing list