NetBSD Problem Report #60171

From www@netbsd.org  Thu Apr  2 18:42:17 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.netbsd.org", Issuer "R12" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 0253F1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  2 Apr 2026 18:42:17 +0000 (UTC)
Message-Id: <20260402184216.366C61A923C@mollari.NetBSD.org>
Date: Thu,  2 Apr 2026 18:42:16 +0000 (UTC)
From: opensauce04@gmail.com
Reply-To: opensauce04@gmail.com
To: gnats-bugs@NetBSD.org
Subject: mpv quickly segfaults when using libcaca video output
X-Send-Pr-Version: www-1.0
X-From4GNATS: "opensauce04@gmail.com via gnats" <gnats-admin@NetBSD.org>

>Number:         60171
>Category:       pkg
>Synopsis:       mpv quickly segfaults when using libcaca video output
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    leot
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 02 18:45:00 +0000 2026
>Last-Modified:  Sun Apr 05 10:20:01 +0000 2026
>Originator:     Daniel
>Release:        NetBSD 11.0_RC2 / pkgsrc 2026Q1
>Organization:
>Environment:
NetBSD netbook.powerhub 11.0_RC2 NetBSD 11.0_RC2 (GENERIC) #0: Wed Mar  4 21:02:00 UTC 2026  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When attempting to play a video via mpv using the libcaca video option via `mpv --vo=caca <url>`, I receive the following message:

zsh: segmentation fault (core dumped)  mpv --vo=caca <url>

I don't receive this message with the same video when using either the default or tct video output options, so this issue seems specific to the --vo=caca.

libcaca support must be explicitly enabled before building mpv by adding the following to mk.conf:

PKG_OPTIONS.mpv = caca
>How-To-Repeat:
Attempt to play a video with mpv while using the `--vo-caca` option, ensuring that mpv is built with libcaca support.
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->leot
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Sun, 05 Apr 2026 10:05:54 +0000
Responsible-Changed-Why:
Take


From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/60171: mpv quickly segfaults when using libcaca video output
Date: Sun, 05 Apr 2026 12:15:53 +0200

 Hello Daniel,
 thanks for the PR!

 opensauce04@gmail.com via gnats writes:
 > >Number:         60171
 > >Category:       pkg
 > >Synopsis:       mpv quickly segfaults when using libcaca video output
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       high
 > >Responsible:    pkg-manager
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu Apr 02 18:45:00 +0000 2026
 > >Originator:     Daniel
 > >Release:        NetBSD 11.0_RC2 / pkgsrc 2026Q1
 > >Organization:
 > >Environment:
 > NetBSD netbook.powerhub 11.0_RC2 NetBSD 11.0_RC2 (GENERIC) #0: Wed Mar  4 21:02:00 UTC 2026  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
 > >Description:
 > When attempting to play a video via mpv using the libcaca video option via `mpv --vo=caca <url>`, I receive the following message:
 >
 > zsh: segmentation fault (core dumped)  mpv --vo=caca <url>
 >
 > I don't receive this message with the same video when using either the default or tct video output options, so this issue seems specific to the --vo=caca.
 >
 > libcaca support must be explicitly enabled before building mpv by adding the following to mk.conf:
 >
 > PKG_OPTIONS.mpv = caca
 > >How-To-Repeat:
 > Attempt to play a video with mpv while using the `--vo-caca` option, ensuring that mpv is built with libcaca support.
 > >Fix:
 >

 Adding some more info... It seems that I can reproduce that too with
 NetBSD -current(ish) and pkgsrc-current and here the initial backtrace:

  [...]
  Core was generated by `mpv'.
  Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0x000075746a002384 in ti_getnum () from /usr/lib/libterminfo.so.1
  [Current thread is 1 (process 11304)]
  (gdb) bt
  #0  0x000075746a002384 in ti_getnum () from /usr/lib/libterminfo.so.1
  #1  0x000075746aa6d76e in _nc_locale_breaks_acs () from /usr/pkg/lib/libncurses.so.6
  #2  0x000075746aa55117 in _nc_setupscreen_sp () from /usr/pkg/lib/libncurses.so.6
  #3  0x000075746aa50585 in newterm_sp () from /usr/pkg/lib/libncurses.so.6
  #4  0x000075746aa509b0 in newterm () from /usr/pkg/lib/libncurses.so.6
  #5  0x000075746aa4c6d2 in initscr () from /usr/pkg/lib/libncurses.so.6
  #6  0x000075746ce4e303 in ncurses_init_graphics (dp=0x757465dc1000) at driver/ncurses.c:253
  #7  0x000075746ce3da9c in caca_install_driver (dp=dp@entry=0x757465dc1000, driver=driver@entry=0x0) at caca.c:318
  #8  0x000075746ce3dbfb in caca_create_display_with_driver (cv=0x757465dcc000, driver=0x0) at caca.c:131
  #9  0x0000000000e72126 in preinit ()
  #10 0x0000000000e4cb96 in vo_thread ()
  #11 0x000075746dbc336f in pthread__create_tramp (cookie=0x757467d06800) at /usr/src/lib/libpthread/pthread.c:607
  #12 0x000075746c96df60 in ?? () from /usr/lib/libc.so.12
  Backtrace stopped: Cannot access memory at address 0x7574611f0000

 I should try to rebuild more packages via:

  make install CFLAGS=-g2 INSTALL_UNSTRIPPED=yes

 To possibly have more helpful debug information.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.