GNU bug report logs - #18165
24.3.92; cedet: semanticdb-needs-refresh-p sometimes report (wrong-type-argument number-or-marker-p nil) error

Previous Next

Package: emacs;

Reported by: Kan-Ru Chen (陳侃如) <kanru <at> kanru.info>

Date: Fri, 1 Aug 2014 09:08:01 UTC

Severity: normal

Found in version 24.3.92

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18165 in the body.
You can then email your comments to 18165 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18165; Package emacs. (Fri, 01 Aug 2014 09:08:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kan-Ru Chen (陳侃如) <kanru <at> kanru.info>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 01 Aug 2014 09:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kan-Ru Chen (陳侃如) <kanru <at> kanru.info>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.92; cedet: semanticdb-needs-refresh-p sometimes report
 (wrong-type-argument number-or-marker-p nil) error
Date: Fri, 01 Aug 2014 17:06:14 +0800
[Message part 1 (text/plain, inline)]
Sometimes when semanticdb-needs-refresh-p is called on a non-existing
file it will report (wrong-type-argument number-or-marker-p nil)

The backtrace is too large so I attached a cropped image instead.

Tentative patch:

diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index 76a49dd..0e68cb5 100644
*** a/lisp/cedet/semantic/db.el
--- b/lisp/cedet/semantic/db.el
***************
*** 593,609 ****
  	  )
        ;; Buffer isn't loaded.  The only clue we have is if the file
        ;; is somehow different from our mark in the semanticdb table.
        (let* ((stats (file-attributes ff))
  	     (actualsize (nth 7 stats))
  	     (actualmod (nth 5 stats))
  	     )
  
! 	(or (not (slot-boundp obj 'tags))
  	    ;; (not (oref obj tags)) -->  not needed anymore?
  	    (/= (or (oref obj fsize) 0) actualsize)
  	    (not (equal (oref obj lastmodtime) actualmod))
  	    )
  	))))
  
  
  ;;; Synchronization
--- 593,610 ----
  	  )
        ;; Buffer isn't loaded.  The only clue we have is if the file
        ;; is somehow different from our mark in the semanticdb table.
        (let* ((stats (file-attributes ff))
  	     (actualsize (nth 7 stats))
  	     (actualmod (nth 5 stats))
  	     )
  
! 	(or (not stats)
! 	    (not (slot-boundp obj 'tags))
  	    ;; (not (oref obj tags)) -->  not needed anymore?
  	    (/= (or (oref obj fsize) 0) actualsize)
  	    (not (equal (oref obj lastmodtime) actualmod))
  	    )
  	))))
  
  
  ;;; Synchronization


In GNU Emacs 24.3.92.3 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
 of 2014-08-01 on kanru-mozilla
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description:	Debian GNU/Linux 7.6 (wheezy)

[2014-08-01-153725_659x468_scrot.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18165; Package emacs. (Mon, 15 Sep 2014 04:01:02 GMT) Full text and rfc822 format available.

Message #8 received at 18165 <at> debbugs.gnu.org (full text, mbox):

From: Kan-Ru Chen (陳侃如) <kanru <at> kanru.info>
To: 18165 <at> debbugs.gnu.org
Subject: [PATCH] Fix error when semanticdb-needs-refresh-p is called on a
 non-existing file
Date: Mon, 15 Sep 2014 12:00:34 +0800
[Message part 1 (text/plain, inline)]
Could someone help me install this patch to emacs-24 branch?

[0001-Fix-error-when-semanticdb-needs-refresh-p-is-called-.patch (text/x-diff, inline)]
From f284dcc3ed0345769ed8863df36800f98af574b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kan-Ru=20Chen=20=28=E9=99=B3=E4=BE=83=E5=A6=82=29?=
 <kanru <at> kanru.info>
Date: Mon, 15 Sep 2014 11:47:47 +0800
Subject: Fix error when semanticdb-needs-refresh-p is called on a non-existing
 file. (Bug#18165)

 * semantic/db.el (semanticdb-needs-refresh-p): Ignore nil file
 stats. (Bug#18165)

diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog
index f9f0cf8..626f449 100644
--- a/lisp/cedet/ChangeLog
+++ b/lisp/cedet/ChangeLog
@@ -1,8 +1,13 @@
+2014-09-15  Kan-Ru Chen (陳侃如)  <kanru <at> kanru.info>
+
+	* semantic/db.el (semanticdb-needs-refresh-p): Ignore nil file
+	stats. (Bug#18165)
+
 2014-05-01  Glenn Morris  <rgm <at> gnu.org>
 
 	* ede.el (ede-project-directories, ede-check-project-directory):
 	* semantic/ia-sb.el (semantic-ia-sb-show-doc):
 	* semantic/tag.el (semantic-tag-in-buffer-p):
 	* semantic/bovine/c.el (semantic-tag-abstract-p):
 	Doc fixes (replace `iff').
 
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index 76a49dd..0e68cb5 100644
--- a/lisp/cedet/semantic/db.el
+++ b/lisp/cedet/semantic/db.el
@@ -593,17 +593,18 @@ The file associated with OBJ does not need to be in a buffer."
 	  )
       ;; Buffer isn't loaded.  The only clue we have is if the file
       ;; is somehow different from our mark in the semanticdb table.
       (let* ((stats (file-attributes ff))
 	     (actualsize (nth 7 stats))
 	     (actualmod (nth 5 stats))
 	     )
 
-	(or (not (slot-boundp obj 'tags))
+	(or (not stats)
+	    (not (slot-boundp obj 'tags))
 	    ;; (not (oref obj tags)) -->  not needed anymore?
 	    (/= (or (oref obj fsize) 0) actualsize)
 	    (not (equal (oref obj lastmodtime) actualmod))
 	    )
 	))))
 
 
 ;;; Synchronization
-- 
1.9.1


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18165; Package emacs. (Mon, 15 Sep 2014 19:41:01 GMT) Full text and rfc822 format available.

Message #11 received at 18165 <at> debbugs.gnu.org (full text, mbox):

From: David Engster <deng <at> randomsample.de>
To: Kan-Ru Chen (陳侃如) <kanru <at> kanru.info>
Cc: 18165 <at> debbugs.gnu.org
Subject: Re: bug#18165: [PATCH] Fix error when semanticdb-needs-refresh-p is
 called on a non-existing file
Date: Mon, 15 Sep 2014 21:40:21 +0200
Kan-Ru Chen (陳侃如) writes:
> Could someone help me install this patch to emacs-24 branch?

I wonder why semanticdb-needs-refresh-p is called on a non-existing file
in the first place. Could you please provide a recipe to reproduce this
bug?

Thanks,
David




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Wed, 12 Aug 2020 18:40:02 GMT) Full text and rfc822 format available.

Notification sent to Kan-Ru Chen (陳侃如) <kanru <at> kanru.info>:
bug acknowledged by developer. (Wed, 12 Aug 2020 18:40:02 GMT) Full text and rfc822 format available.

Message #16 received at 18165-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Kan-Ru Chen <kanru <at> kanru.info>, 18165-done <at> debbugs.gnu.org
Subject: Re: bug#18165: [PATCH] Fix error when semanticdb-needs-refresh-p is
 called on a non-existing file
Date: Wed, 12 Aug 2020 11:39:23 -0700
David Engster <deng <at> randomsample.de> writes:

> Kan-Ru Chen (陳侃如) writes:
>> Could someone help me install this patch to emacs-24 branch?
>
> I wonder why semanticdb-needs-refresh-p is called on a non-existing file
> in the first place. Could you please provide a recipe to reproduce this
> bug?

More information was requested, but none was given within 6 years, so
I'm closing this bug.  If this is still an issue, please reply to this
email (use "Reply to all" in your email client) and we can reopen the
bug report.

Best regards,
Stefan Kangas




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 Sep 2020 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 345 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.