Bug 268487 - multimedia/lms: crash when transcoding is activated for subsonic API when using STB as image library
Summary: multimedia/lms: crash when transcoding is activated for subsonic API when usi...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL: https://github.com/epoupon/lms/issues...
Keywords: crash
Depends on:
Blocks:
 
Reported: 2022-12-20 14:50 UTC by Baptiste Daroussin
Modified: 2023-01-23 00:37 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Baptiste Daroussin freebsd_committer freebsd_triage 2022-12-20 14:50:54 UTC
When connecting to lms via the subsonic API (tested with audinaut and ultrasonic android clients) lms crashes. (tested with default settings on lms side)

When I disable transcoding it works fine.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2022-12-20 20:48:53 UTC
Hi Baptiste,


I am able to stream from lms to the Ultrasonic Android app.

How to turn transcoding on?

Please post step-by-step instructions how to reproduce the problem.


Thanks,
Yuri
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2022-12-20 21:04:39 UTC
It might be the same problem: https://github.com/epoupon/lms/issues/285
Comment 3 Baptiste Daroussin freebsd_committer freebsd_triage 2022-12-21 07:38:39 UTC
parameters > Subsonic API -> checkbox activate transcoding
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2022-12-21 08:38:58 UTC
Confirmed.
Comment 5 Baptiste Daroussin freebsd_committer freebsd_triage 2022-12-21 11:33:54 UTC
before going upstream maybe we should look at our side.

First thing: we do not use graphicmagic because it use the default which is stb, to maybe 1 drop the dep dep on graphicmagic. or we should test with graphicmagic instead of stb.

(Both are mutually exclusive).

Also note that your patch for the child process is no longer required, it guard something which is already guarded y a check on __linux now.
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2022-12-21 11:59:24 UTC
(In reply to Baptiste Daroussin from comment #5)

There might be some error in the lms code that it says that it will use STB bit then it uses Magick.

I'll clean up these issues.
Comment 7 Baptiste Daroussin freebsd_committer freebsd_triage 2022-12-21 13:07:44 UTC
(In reply to Yuri Victorovich from comment #6)

This is what I am looking at, but for sure nothing in the end built package is linked to graphicmagick. (I have checked it)
Comment 8 Baptiste Daroussin freebsd_committer freebsd_triage 2022-12-21 15:31:14 UTC
forcing the build with graphicsmagick instead stb fixes the issue.
So the issue is in the STB support.
The problem is we cannot option out STB from the Cmakefile so a local patch which has to be make is modifying te cmakefile.txt to not look anymore for STB. otherwise people will STB locally installed will have the STB picked instead of GraphicsMagick
Comment 9 Yuri Victorovich freebsd_committer freebsd_triage 2022-12-21 20:58:09 UTC
(In reply to Baptiste Daroussin from comment #8)

Let's see if the upstream is able to come up with a fix within a few days.
Otherwise we definitely can disable STB.
Comment 10 commit-hook freebsd_committer freebsd_triage 2022-12-22 08:44:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=34dce7ec4dba8810371c7862983eb3cfe19dd20b

commit 34dce7ec4dba8810371c7862983eb3cfe19dd20b
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-12-22 08:28:21 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-12-22 08:43:32 +0000

    multimedia/lms: Add options STB, MAGICK for image library

    This fixes SEGV when transcoding is activated for subsonic
    API when using STB as image library.

    PR:             268487

 multimedia/lms/Makefile                               | 18 +++++++++++++++---
 multimedia/lms/files/patch-CMakeLists.txt (new)       | 19 +++++++++++++++++++
 .../patch-src_libs_utils_impl_ChildProcess.cpp (gone) | 18 ------------------
 3 files changed, 34 insertions(+), 21 deletions(-)
Comment 11 Yuri Victorovich freebsd_committer freebsd_triage 2023-01-23 00:37:15 UTC
Fixed upstream.