Lately, I have been facing this issue in the emacs built from master branch. I haven't yet seen this error occur on emacs 24.4.
I see it happen now and then and haven't been able to consistently reproduce it but here is the backtrace. I have not been able to create this error on "emacs -Q".
I get this error when I am trying to quit isearch. I don't know if this happens when I try to quit after I tried to search for a term that failed to be found in the buffer or when I try to quit after a successful search hit.
But once this started happening, repeated C-g hits keep on throwing this error and I can't quit isearch.
Then the only way is to restart emacs.
Debugger entered--Lisp error: (void-variable cursor-sensor-inhibit)
#<subr call-interactively>(isearch-abort nil nil)
ad-Advice-call-interactively(#<subr call-interactively> isearch-abort nil nil)
apply(ad-Advice-call-interactively #<subr call-interactively> (isearch-abort nil nil))
call-interactively(isearch-abort nil nil)
In GNU Emacs 18.104.22.168 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)
of 2015-05-05 on ...
Windowing system distributor `The X.Org Foundation', version 11.0.60900000
System Description: Red Hat Enterprise Linux Client release 5.10 (Tikanga)
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB
value of $LANG: en_US.UTF-8
Minor modes in effect: