phw / peek

Simple animated GIF screen recorder with an easy to use interface
GNU General Public License v3.0
10.3k stars 320 forks source link

Fedora 29 - compiled from source - crash dump after recording #419

Closed AronNovak closed 5 years ago

AronNovak commented 5 years ago
 aaron  ~  134  /usr/local/bin/peek 
Error: Failed to open file “/home/aaron/.config/gtk-3.0/settings.ini”: No such file or directory
Using screen recorder backend ffmpeg
free(): double free detected in tcache 2
Aborted (core dumped)
 aaron  ~  coredumpctl dump peek
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
      Pass -q to turn off this notice.
           PID: 4386 (peek)
           UID: 1000 (aaron)
           GID: 1000 (aaron)
        Signal: 6 (ABRT)
     Timestamp: Wed 2019-02-13 10:34:38 CET (1min 40s ago)
  Command Line: /usr/local/bin/peek
    Executable: /usr/local/bin/peek
 Control Group: /user.slice/user-1000.slice/session-2.scope
          Unit: session-2.scope
         Slice: user-1000.slice
       Session: 2
     Owner UID: 1000 (aaron)
       Boot ID: bcf6f9cfe589415dafdad2d3af525851
    Machine ID: 1748261118254a818f5cfcac35347eb0
      Hostname: villamvonat
       Storage: /var/lib/systemd/coredump/core.peek.1000.bcf6f9cfe589415dafdad2d3af525851.4386.1550050478000000.lz4
       Message: Process 4386 (peek) of user 1000 dumped core.

                Stack trace of thread 4386:
                #0  0x00007f2c4919553f raise (libc.so.6)
                #1  0x00007f2c4917f895 abort (libc.so.6)
                #2  0x00007f2c491d8927 __libc_message (libc.so.6)
                #3  0x00007f2c491df25c malloc_printerr (libc.so.6)
                #4  0x00007f2c491e0d45 _int_free (libc.so.6)
                #5  0x00007f2c49c38ed2 g_free (libglib-2.0.so.0)
                #6  0x0000000000424633 _vala_array_destroy (peek)
                #7  0x000000000042466a _vala_array_free (peek)
                #8  0x00000000004241d7 peek_post_processing_ffmpeg_post_processor_generate_animation_async_co (peek)
                #9  0x00000000004236df peek_post_processing_ffmpeg_post_processor_generate_animation_async_ready (peek)
                #10 0x000000000041f007 peek_post_processing_cli_post_processor_spawn_command_async_async_ready_wrapper (peek)
                #11 0x00007f2c49def834 n/a (libgio-2.0.so.0)
                #12 0x00007f2c49df0196 n/a (libgio-2.0.so.0)
                #13 0x000000000041f932 peek_post_processing_cli_post_processor_spawn_command_async_co (peek)
                #14 0x000000000041f1c4 peek_post_processing_cli_post_processor_spawn_command_async_ready (peek)
                #15 0x00007f2c49def834 n/a (libgio-2.0.so.0)
                #16 0x00007f2c49def86d n/a (libgio-2.0.so.0)
                #17 0x00007f2c49c2f97b n/a (libglib-2.0.so.0)
                #18 0x00007f2c49c3306d g_main_context_dispatch (libglib-2.0.so.0)
                #19 0x00007f2c49c33438 n/a (libglib-2.0.so.0)
                #20 0x00007f2c49c33762 g_main_loop_run (libglib-2.0.so.0)
                #21 0x00007f2c49641de7 gtk_dialog_run (libgtk-3.so.0)
                #22 0x0000000000435f9a peek_ui_application_window_show_file_chooser (peek)
                #23 0x0000000000431760 __lambda5_ (peek)
                #24 0x000000000043177f ___lambda5__peek_recording_screen_recorder_recording_postprocess_started (peek)
                #25 0x00007f2c49d153dd g_closure_invoke (libgobject-2.0.so.0)
                #26 0x00007f2c49d28983 n/a (libgobject-2.0.so.0)
                #27 0x00007f2c49d31aaa g_signal_emit_valist (libgobject-2.0.so.0)
                #28 0x00007f2c49d32584 g_signal_emit_by_name (libgobject-2.0.so.0)
                #29 0x0000000000427a58 peek_recording_base_screen_recorder_finalize_recording (peek)
                #30 0x0000000000429c2f ___lambda22_ (peek)
                #31 0x0000000000429ccd ____lambda22__gasync_ready_callback (peek)
                #32 0x00007f2c49def834 n/a (libgio-2.0.so.0)
                #33 0x00007f2c49def86d n/a (libgio-2.0.so.0)
                #34 0x00007f2c49c2f97b n/a (libglib-2.0.so.0)
                #35 0x00007f2c49c3306d g_main_context_dispatch (libglib-2.0.so.0)
                #36 0x00007f2c49c33438 n/a (libglib-2.0.so.0)
                #37 0x00007f2c49c334d0 g_main_context_iteration (libglib-2.0.so.0)
                #38 0x00007f2c49e03d25 g_application_run (libgio-2.0.so.0)
                #39 0x000000000040db87 _vala_main (peek)
                #40 0x000000000040dbca main (peek)
                #41 0x00007f2c49181413 __libc_start_main (libc.so.6)
                #42 0x000000000040da0e _start (peek)

                Stack trace of thread 4421:
                #0  0x00007f2c49254efd syscall (libc.so.6)
                #1  0x00007f2c49c7b50e g_cond_wait_until (libglib-2.0.so.0)
                #2  0x00007f2c49c04fa1 n/a (libglib-2.0.so.0)
                #3  0x00007f2c49c5cdf2 n/a (libglib-2.0.so.0)
                #4  0x00007f2c49c5c2aa n/a (libglib-2.0.so.0)
                #5  0x00007f2c4932b58e start_thread (libpthread.so.0)
                #6  0x00007f2c4925a6a3 __clone (libc.so.6)

                Stack trace of thread 4387:
                #0  0x00007f2c4924f421 __poll (libc.so.6)
                #1  0x00007f2c49c333a6 n/a (libglib-2.0.so.0)
                #2  0x00007f2c49c334d0 g_main_context_iteration (libglib-2.0.so.0)
                #3  0x00007f2c49c33521 n/a (libglib-2.0.so.0)
                #4  0x00007f2c49c5c2aa n/a (libglib-2.0.so.0)
                #5  0x00007f2c4932b58e start_thread (libpthread.so.0)
                #6  0x00007f2c4925a6a3 __clone (libc.so.6)

                Stack trace of thread 4419:
                #0  0x00007f2c49254efd syscall (libc.so.6)
                #1  0x00007f2c49c7b50e g_cond_wait_until (libglib-2.0.so.0)
                #2  0x00007f2c49c04fa1 n/a (libglib-2.0.so.0)
                #3  0x00007f2c49c5cdf2 n/a (libglib-2.0.so.0)
                #4  0x00007f2c49c5c2aa n/a (libglib-2.0.so.0)
                #5  0x00007f2c4932b58e start_thread (libpthread.so.0)
                #6  0x00007f2c4925a6a3 __clone (libc.so.6)

                Stack trace of thread 4389:
                #0  0x00007f2c4924f421 __poll (libc.so.6)
                #1  0x00007f2c49c333a6 n/a (libglib-2.0.so.0)
                #2  0x00007f2c49c334d0 g_main_context_iteration (libglib-2.0.so.0)
                #3  0x00007f2c3a2f3c7d n/a (libdconfsettings.so)
                #4  0x00007f2c49c5c2aa n/a (libglib-2.0.so.0)
                #5  0x00007f2c4932b58e start_thread (libpthread.so.0)
                #6  0x00007f2c4925a6a3 __clone (libc.so.6)

                Stack trace of thread 4388:
                #0  0x00007f2c4924f421 __poll (libc.so.6)
                #1  0x00007f2c49c333a6 n/a (libglib-2.0.so.0)
                #2  0x00007f2c49c33762 g_main_loop_run (libglib-2.0.so.0)
                #3  0x00007f2c49e3110a n/a (libgio-2.0.so.0)
                #4  0x00007f2c49c5c2aa n/a (libglib-2.0.so.0)
                #5  0x00007f2c4932b58e start_thread (libpthread.so.0)
                #6  0x00007f2c4925a6a3 __clone (libc.so.6)

                Stack trace of thread 4420:
                #0  0x00007f2c49254efd syscall (libc.so.6)
                #1  0x00007f2c49c7b50e g_cond_wait_until (libglib-2.0.so.0)
                #2  0x00007f2c49c04fa1 n/a (libglib-2.0.so.0)
                #3  0x00007f2c49c5cdf2 n/a (libglib-2.0.so.0)
                #4  0x00007f2c49c5c2aa n/a (libglib-2.0.so.0)
                #5  0x00007f2c4932b58e start_thread (libpthread.so.0)
                #6  0x00007f2c4925a6a3 __clone (libc.so.6)
Refusing to dump core to tty (use shell redirection or specify --output).
karate commented 5 years ago

I have the same problem (using ffmpeg to save as GIF).

lisael commented 5 years ago

Same here with Peek 1.3.1 / ffmpeg 4.1-1 from debian sid.

I also use I3 + compton

Nirvandil commented 5 years ago

Same error on Gentoo, glibc 2.28, peek 1.3.1, ffmpeg 4.1.1

phw commented 5 years ago

I can't reproduce this here. Could be a vala issue, what version of vala are you using?

AronNovak commented 5 years ago

@phw

Available Packages
Name         : vala
Version      : 0.42.5
Release      : 1.fc29
Architecture : i686
Size         : 2.0 M
Source       : vala-0.42.5-1.fc29.src.rpm
Repository   : updates
Summary      : A modern programming language for GNOME
URL          : https://wiki.gnome.org/Projects/Vala
License      : LGPLv2+ and BSD
Description  : Vala is a new programming language that aims to bring modern
             : programming language features to GNOME developers without imposing any
             : additional runtime requirements and without using a different ABI
             : compared to applications and libraries written in C.
             : 
             : valac, the Vala compiler, is a self-hosting compiler that translates
             : Vala source code into C source and header files. It uses the GObject
             : type system to create classes and interfaces declared in the Vala
             : source code. It's also planned to generate GIDL files when gobject-
             : introspection is ready.
             : 
             : The syntax of Vala is similar to C#, modified to better fit the GObject
             : type system.

Name         : vala
Version      : 0.42.5
Release      : 1.fc29
Architecture : x86_64
Size         : 1.8 M
Source       : vala-0.42.5-1.fc29.src.rpm
Repository   : updates
cdluminate commented 5 years ago

Same here on Debian sid: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926386

cdluminate commented 5 years ago

@hosiet

akien-mga commented 5 years ago

Confirmed on Mageia 7 (Cauldron) with the distro packaging for 1.3.1, built from source. Using GTK+ 3.24.7, vala 0.44.3 and ffmpeg 4.1.3.

qiankehan commented 5 years ago

Works for me on these versions: glibc-2.28-r4:2.2 vala-0.36.15:0.36 ffmpeg-4.1.3:0/56.58.58 peek-1.3.1-r2:0

qiankehan commented 5 years ago

Bug reproduced when update vala to vala-0.42.6.

qiankehan commented 5 years ago

I suspect it is something wrong in compilation. I install peek-1.3.1-r2 from emerge. The bug can be reproduced. My make.conf:

COMMON_FLAGS="-O2 -pipe -ggdb"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
MAKEOPTS="-j4"
USE="-qt5 -qt4 -kde gtk python X systemd gnome ssl abi_x86_64 -openrc -libressl debugsyms installsources alsa"
PYTHON_TARGETS="python2_7 python3_6"
PYTHON_SINGLE_TARGET="python3_6"
FEATURES="ccache nostrip"
ACCEPT_KEYWORDS="~amd64"
CCACHE_SIZE="3G"
GRUB_PLATFORMS="efi-64 pc"
PORTAGE_NICENESS=19
GENTOO_MIRRORS="http://mirrors.163.com/gentoo/ https://mirrors.tuna.tsinghua.edu.cn/gentoo"

While I build peek-1.3.1 from source, the bug cannot be reproduced. Build steps:

git clone https://github.com/phw/peek.git
mkdir peek/build
cd peek/build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DGSETTINGS_COMPILE=OFF ..
make

@phw

NathanPB commented 5 years ago

Same on OpenSuse Tumbleweed 20190402

pbeza commented 5 years ago

Same on Ubuntu Disco Dingo (19.04).

xsellier commented 5 years ago

Confirmed on Debian 10 with the distro packaging for 1.3.1, built from source. Using vala 0.44.3 and ffmpeg 4.1.3.

bernhardu commented 5 years ago

Hello, please have a look at debian bug#926386, message 19 again. There I received a backtrace with all debug symbols. Unfortunately the patch got just applied to the debian package but upstream seems got no notification of this.

carestad commented 5 years ago

Are there any workarounds at this time for Ubuntu 19.04 users?

bherrmann7 commented 5 years ago

On Ubuntu 19.04, I've found I can run peek, do the recording, then when it dumps, it leaves behind a valid webm file in the cache. You can either use the webm or convert it using ffmpeg to gif... Note that Ubuntu 19.04 updated 10-May-2019 and may have effected this.

$ peek
Recording to file /home/bob/.cache/peek/peekFMXU1Z.webm
ffmpegfree(): double free detected in tcache 2
Aborted (core dumped)
$ ffmpeg -i /home/bob/.cache/peek/peekFMXU1Z.webm -pix_fmt rgb24 output.gif
kfogel commented 5 years ago

This was also reported in Debian GNU/Linux for the gnuplot package, in bug 926658, and that ticket says it was fixed in Debian:

    [6ddeb7e] Fix incomplete/unsafe initialization of ARGV array. (Closes: #926658)

It's a Debian-specific fix that is apparently not (yet) present anywhere in the upstream repository. It is mentioned in the Debian ChangeLog for the gnuplot package, and the Debian Developer Information Page for gnuplot links to corresponding Debian gnuplot maintenance team repository, in which we can find commit 6ddeb7e on the experimental branch. The change is fairly small. I don't know if it has been submitted upstream or not.

I hope this helps.

kfogel commented 5 years ago

For convenience, here's the corresponding Debian patch for peek (as mentioned earlier by @bernhardu):

commit ac5db3c729

carestad commented 5 years ago

On Ubuntu 19.04, I've found I can run peek, do the recording, then when it dumps, it leaves behind a valid webm file in the cache. You can either use the webm or convert it using ffmpeg to gif... Note that Ubuntu 19.04 updated 10-May-2019 and may have effected this.

Wow! You are quite right. Not even have I got the .webm files there, but also PNG and the converted GIF resides in the cache folder itself. It just hasn't been moved to the folder it was supposed to :slightly_smiling_face:

carestad commented 5 years ago

Seems to have been fixed in Debian. Just tried the .deb file from stretch-backports in 19.04 and I have no problem saving the GIFs now.

AlexBezuska commented 5 years ago

Seems to have been fixed in Debian. Just tried the .deb file from stretch-backports in 19.04 and I have no problem saving the GIFs now.

Thanks, I had the same Issue with Ubuntu 19.04 and using the version of Peek you linked works for me. :smile: my error:

Using screen recorder backend gnome-shell
Recording to file /home/abezuska/.cache/peek/peekNK5S3Z.webm
free(): double free detected in tcache 2
Aborted (core dumped)
akien-mga commented 5 years ago

@bernhardu You seem to be the author of the Debian patch that fixes this bug. Would you make a Pull Request so that it can be easily integrated upstream?

bernhardu commented 5 years ago

You seem to be the author of the Debian patch that fixes this bug. Would you make a Pull Request so that it can be easily integrated upstream?

Thought that would/should go through the debian maintainer @hosiet. Just created a pull request now.

akien-mga commented 5 years ago

Fixed by #449, could be closed.

suside commented 5 years ago

This is still happening on the latest version 1.3.1 :cry: Is there any particular reason why this has not been released?

gcarq commented 5 years ago

Same here, a release with this fix would be really nice, since its broken rn.

metal3d commented 5 years ago

1.3.1 released one year ago... flathub not updated, is anyone here is the maintainer ?