Malabarba / spinner.el

Emacs mode-line spinner for operations in progress
104 stars 21 forks source link

Spinner blinking *invalid* (emacs 26.x) #11

Closed kaushalmodi closed 7 years ago

kaushalmodi commented 7 years ago

While debugging the issue in https://github.com/Malabarba/paradox/issues/139, I force byte recompiled my whole elpa dir. While that did not solve that issue, the spinner has now stopped working.. It blinks *invalid*.

spinner-gone-bad

Error during redisplay: (eval (spinner-print paradox--spinner)) signaled (wrong-type-argument spinner [cl-struct-spinner ["  " "▌ " "█ " "▐▌" " █" " ▐"] 0 10 [t nil nil nil nil nil nil nil nil] nil #<buffer *Packages*> 0]) [11774 times]

This occurs even after I deleted spinner.elc and restarted emacs.

larsbrinkhoff commented 7 years ago

I think this has the same root cause.

The error message (wrong-type-argument spinner [cl-struct-spinner ... says that something is making old-style defstruct instances, i.e. [cl-struct-spinner ...]. Something else is expecting new-style records.

EDIT: It's not the same cause after all.

larsbrinkhoff commented 7 years ago

If I would hazard a guess, it could be that the paradox package is passing paradox--spinner to spinner. The value might be a vector instead of a record. This would point to paradox not being recompiled properly (or having been properly recompiled, overwritten with a bad .elc).

But all this could be way off the mark.

larsbrinkhoff commented 7 years ago

I think the "paradox problem" has been solved (pending verification), but this report is probably something else. So let's keep trying to fix this. As always, a detailed description on how to reproduce the problem with a clean Emacs config would be great.

larsbrinkhoff commented 7 years ago

Looks like the call to spinner-print is made from paradox-menu.el.

Is it possible to set debug-on-error and get a backtrace?

larsbrinkhoff commented 7 years ago

It would be interesting to examine the files paradox-core.elc and spinner.elc. Does anyone of them contain the symbol cl-struct-spinner?

kaushalmodi commented 7 years ago

this report is probably something else

I found this problem only after doing a forced recompile of the whole elpa dir:

(byte-recompile-directory package-user-dir nil :force)

I had taken a backup of my elpa dir before doing that. After that forced recompile, I had seen issues show up in spinner and magit (and before more issues showed up, I switched back to the backed up elpa dir, and those issues 'went away').

Any chances that the bug in read caused problems in this forced recompile step?

I have taken a backup of the bad elpa too. I will post a backtrace of the spinner error after switching back to that (should have done that the first time).

It would be interesting to examine the files paradox-core.elc and spinner.elc. Does anyone of them contain the symbol cl-struct-spinner?

I'll post the pre and post forced recompile versions of those .elc files... If I remember correctly, both versions had instances of cl-struct...


I'll update on all of the above tomorrow.

larsbrinkhoff commented 7 years ago

Any chances that the bug in read caused problems in this forced recompile step?

It doesn't seem likely. If it would have affected the recompile, it should have showed up as a failure. Not silently corrupting files.

kaushalmodi commented 7 years ago

I am closing this issue as I cannot recreate it in emacs -Q. This could have been caused because of advices to package-compute-transaction and package-menu--find-upgrades functions in my config.