xyzzy42 / tg

A program for timing mechanical watches
GNU General Public License v2.0
34 stars 10 forks source link

TG crashes at startup, sometimes stays open for a second before crashing #1

Closed ghost closed 2 years ago

ghost commented 2 years ago

Description

TG will crash at startup most of the time. But sometimes it stays open for a couple seconds, then crashes for seemingly no reason.

System info

System: Void Linux, kernel 5.15.45_1 PulseAudio: 15.0 Alsa: 1.2.6 Audio Device(built into laptop): Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01) Audio Driver: snd_hda_intel

Terminal output

Terminal output when TG immediately crashes crashearly.txt

Terminal output when TG crashes after a few seconds crashlate.txt

Other info

TG was compiled with tg-timer-dbg

When using the vacaboja branch, TG would crash at startup most of the time. But sometimes it would would stay open for a while, and then crash as soon as it detected ticking audio. This is a crash after detecting audio with the vacaboja branch: crashvacaboja.txt

It seems to be related to the computation of the audio, which is well over my head. I say that because of the messages in the terminal output that say START OF COMPUTATION CYCLE.

trentp-igor commented 2 years ago

Crash is caused by an assert inside PortAudio. What version of portaudio do you have installed?

ghost commented 2 years ago

architecture: x86_64 automatic-install: yes build-options: ~sndio filename-sha256: 590758b6b8ab544def789adab0cd5e97733472cf8f5f408eb1ba4688722271ac filename-size: 74KB homepage: http://www.portaudio.com install-date: 2022-06-02 20:29 UTC installed_size: 195KB license: MIT maintainer: Érico Nogueira ericonr@disroot.org metafile-sha256: ca19634f8839915a71301c8713133679d038cd4e159a541ce67661caa830ed7c pkgname: portaudio pkgver: portaudio-190600.20161030_6 repository: https://repo-us.voidlinux.org/current run_depends: glibc>=2.29_1 alsa-lib>=1.0.20_1 libjack>=1.9.7_1 shlib-provides: libportaudio.so.2 shlib-requires: librt.so.1 libasound.so.2 libjack.so.0 libm.so.6 libpthread.so.0 libc.so.6 short_desc: Portable cross-platform audio I/O library source-revisions: portaudio:f7f8341645 state: installed

trentp-igor commented 2 years ago

Pretty sure I found the bug in PortAudio. https://github.com/PortAudio/portaudio/pull/344

It was fixed in version 19.7 and it looks like you've got 19.6.

ghost commented 2 years ago

I've compiled and installed the latest stable portaudio (19.7) and the TG crashing seems to be fixed. I was able to make install it without having to touch any Void packages. Probably not best practice, but hey it works.