camcorder.el icon indicating copy to clipboard operation
camcorder.el copied to clipboard

camcorder-recrod Freezing emacs

Open olymk2 opened this issue 7 years ago • 5 comments

When i launch camcorder-record and select a filename it shows me the command it runs and says finished in the message bar.

At this point emacs is not responsive it never started recording and i have to hit CTRL G or close the window.

running the command it spits out in a terminal does record the emacs session so not sure why i get the freeze, I have tried this on 2 machines now both ubuntu based machines with gnome one on 16.04 the other on 16.10.

Also worth noting i do get the countdown before it starts.

Any tips to make it work, also might be nice to check for recordmydesktop before initiating the recording.

olymk2 avatar Oct 29 '16 11:10 olymk2

Could you try the following to figure out where the hang happens?

  1. Do M-x toggle-debug-on-quit.
  2. Reproduce the hang (or wait for it to happen)
  3. Hit C-g while it's hanged.

You'll get a backtrace you can paste here.

Malabarba avatar Nov 01 '16 14:11 Malabarba

Okay this is the trace i am getting,

Debugger entered--Lisp error: (quit)
  sleep-for(0.1)
  camcorder--start-recording()
  camcorder-mode()
  camcorder-record()
  call-interactively(camcorder-record record nil)
  command-execute(camcorder-record record)
  helm-M-x(nil #("camcorder-record" 0 16 (match-part "camcorder-record")))
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)

olymk2 avatar Nov 03 '16 18:11 olymk2

Found the cause now, its because i am using fish as my shell so camcorder is trying to run the command through fish and throws an error.

Illegal command name “(recordmydesktop --fps 20 --no-sound --windowid 0x1c005ff -o ~/Videos/test.mpg-2.ogv)”
fish: (recordmydesktop --fps 20 --no-sound --windowid 0x1c005ff -o /home/oly/Videos/test.mpg-2.ogv)

I have not found a way to rectify this, but am putting it here for future people. I had these suggested as fixes but emacs still seems to use fish so i dont know if there is another way to define the default for shell-command to be /bin/bash.

(setenv "SHELL" "/bin/bash")
(setq explicit-shell-file-name "/bin/bash")

olymk2 avatar Nov 13 '16 22:11 olymk2

Put in a small PR to clarify the issue in the readme.

https://github.com/Malabarba/camcorder.el/pull/10

using this resolves the issue (setq shell-file-name "/bin/bash")

olymk2 avatar Nov 14 '16 18:11 olymk2

Hmm. Here's an idea . Try changing the let in line 311 from this:

(let ((display-buffer-overriding-action
       (list (lambda (_x _y) t))))

to this:

(let ((display-buffer-overriding-action
       (list (lambda (_x _y) t)))
      (explicit-shell-file-name (executable-find "bash")))

Malabarba avatar Nov 16 '16 16:11 Malabarba