Bug 202765 - multimedia/mpv: crash in certain cases, reason still unknown
Summary: multimedia/mpv: crash in certain cases, reason still unknown
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Some People
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-30 05:52 UTC by Peyton
Modified: 2015-09-16 18:48 UTC (History)
3 users (show)

See Also:
cjpm: maintainer-feedback+


Attachments
v0 (891 bytes, patch)
2015-08-30 06:16 UTC, Carlos J Puga Medina
no flags Details | Diff
v1 (717 bytes, patch)
2015-08-30 07:28 UTC, Carlos J Puga Medina
no flags Details | Diff
Undo the previous change (717 bytes, patch)
2015-08-31 05:51 UTC, Carlos J Puga Medina
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peyton 2015-08-30 05:52:49 UTC
Without freetype, mpv will crash outputting a bus error when it tries to draw the menu text.
Comment 1 Carlos J Puga Medina 2015-08-30 06:14:05 UTC
(In reply to Peyton from comment #0)

Thanks for report!
Comment 2 Carlos J Puga Medina 2015-08-30 06:16:22 UTC
Created attachment 160512 [details]
v0

- Add missing FreeType dependency
- Fix ZSH option helper
- Bump PORTREVISION
Comment 3 Carlos J Puga Medina 2015-08-30 07:28:57 UTC
Created attachment 160514 [details]
v1

Fix ZSH option helper was committed in r395599, so I removed it from patch.
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-08-30 07:43:54 UTC
A commit references this bug:

Author: pi
Date: Sun Aug 30 07:43:12 UTC 2015
New revision: 395600
URL: https://svnweb.freebsd.org/changeset/ports/395600

Log:
  multimedia/mpv: Add freetype as a required dependency

  Without freetype, mpv will crash outputting a bus error when it
  tries to draw the menu text.

  PR:		202765
  Submitted by:	Peyton@openmailbox.org
  Approved by:	Carlos J Puga Medina <cpm@fbsd.es> (maintainer)

Changes:
  head/multimedia/mpv/Makefile
Comment 5 Kurt Jaeger freebsd_committer freebsd_triage 2015-08-30 07:44:41 UTC
Committed, thanks!
Comment 6 Jan Beich freebsd_committer freebsd_triage 2015-08-31 00:42:59 UTC
mpv renders any text via libass, including OSD and OSC (pseudo-GUI). The only exception is rasterized text such as in DVD/Vobsubs. Here're relevant upstream commits killing freetype2 usage.

https://github.com/mpv-player/mpv/commit/85a3a0d5bc1294f88dea42a515bb3dce16c9d951
https://github.com/mpv-player/mpv/commit/74e7a1e937c10d9f4d8ce9b0ba4edee52044a757
http://repo.or.cz/w/mplayer2.git/commit/083e6e3e1a9bf9ee470f59cfd1c775c8724c5ed9

So, what was the issue here? Adding freetype2 dep when mpv doesn't use any symbol in it or link against should have zero effect. And comment 0 didn't provide nearly enough details such as a stacktrace necessary to figure out the culprit.
Comment 7 Carlos J Puga Medina 2015-08-31 05:51:10 UTC
Created attachment 160553 [details]
Undo the previous change

You're right Jan,

Peyton, is this a joke or what?
Comment 8 Peyton 2015-08-31 15:09:34 UTC
(In reply to Carlos J Puga Medina from comment #7)
This isn't a joke, however, I thought for sure freetype was the culprit. Here is the output after opening mpv.core in gdb: http://pastebin.com/PD75y7en
After I installed freetype1.3.1_5 mpv stopped crashing.
Comment 9 Kurt Jaeger freebsd_committer freebsd_triage 2015-08-31 15:34:34 UTC
How did you conclude that freetype was the cause of the crash from that dump ?

I looked at it and did not find a cause ?
Comment 10 Peyton 2015-08-31 15:42:50 UTC
I was looking at: https://github.com/mpv-player/mpv-build#instructions
And noticed that freetype was a dependency, and I didn't have it.
Comment 11 Jan Beich freebsd_committer freebsd_triage 2015-09-01 02:46:48 UTC
mpv-build is not supported by this port. It's an upstream way to build mpv and dependencies then link them statically in case libass/ffmpeg/etc aren't in repo e.g., on Windows. Otherwise, the method is frowned upon by many Unix distributions including FreeBSD:

https://www.freebsd.org/doc/en/books/porters-handbook/bundled-libs.html

So, if you have issues with mpv-build file a bug upstream.
Comment 12 Carlos J Puga Medina 2015-09-01 10:03:13 UTC
Mpv is using the GH repo sources, therefore all bugs not related with the port maintainership should be filed via upstream.
Comment 13 commit-hook freebsd_committer freebsd_triage 2015-09-02 05:54:30 UTC
A commit references this bug:

Author: pi
Date: Wed Sep  2 05:53:29 UTC 2015
New revision: 395823
URL: https://svnweb.freebsd.org/changeset/ports/395823

Log:
  multimedia/mpv: removing freetype dependency

  PR:		202765
  Submitted by:	Carlos J Puga Medina <cpm@fbsd.es> (maintainer)

Changes:
  head/multimedia/mpv/Makefile
Comment 14 Kurt Jaeger freebsd_committer freebsd_triage 2015-09-02 05:55:22 UTC
peyton, can you describe in more detail how to reproduce the crash ?
Comment 15 Peyton 2015-09-03 14:01:13 UTC
Hmm, I haven't been able able to reproduce it again. The only thing that has changed between now and then was freetype. I apologize for taking up your time, I'll be sure more thoroughly record details in the future.