Bug 270223 - multimedia/dvdstyler: Update to 3.3b3
Summary: multimedia/dvdstyler: Update to 3.3b3
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: Daniel Engberg
URL: https://sourceforge.net/projects/dvds...
Keywords:
Depends on: 270220
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-14 21:31 UTC by Daniel Engberg
Modified: 2023-04-08 11:50 UTC (History)
2 users (show)

See Also:
ahicks: maintainer-feedback+


Attachments
Patch for dvdstyler (5.67 KB, patch)
2023-03-14 21:31 UTC, Daniel Engberg
no flags Details | Diff
Poudriere build log (258.36 KB, text/plain)
2023-03-17 09:52 UTC, Alan Hicks
ahicks: maintainer-approval+
Details
Compiling with gcc12 fails with bad C++ code (269.36 KB, text/plain)
2023-03-26 12:19 UTC, Alan Hicks
no flags Details
Patch fixes the crash. Tested and valgrind okay. (387 bytes, patch)
2023-04-02 17:28 UTC, Alan Hicks
ahicks: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2023-03-14 21:31:55 UTC
Created attachment 240853 [details]
Patch for dvdstyler

- Fixes build with FFmpeg 6.0

Compile tested on FreeBSD 13.2-BETA1 (amd64)
Poudriere testport OK 12.3-RELEASE (amd64)
Comment 1 Alan Hicks 2023-03-16 14:00:21 UTC
There's an issue compiling audio/mythplugin-mythmusic as it's pulling in ffmpeg
Comment 2 Alan Hicks 2023-03-16 14:15:19 UTC
Oops, sorry for last comment, wrong port
Comment 3 Alan Hicks 2023-03-17 09:52:53 UTC
Created attachment 240916 [details]
Poudriere build log

Many thanks for this update Daniel
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2023-03-17 19:57:28 UTC
Awesome, thanks for testing
Comment 5 Alan Hicks 2023-03-17 21:55:30 UTC
(In reply to Daniel Engberg from comment #4)
Struggling and failing to bump this into the Ports: Maintainer Approved list
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2023-03-18 16:09:24 UTC
Everything looks fine to me, thanks!
Comment 7 Alan Hicks 2023-03-19 15:36:48 UTC
I'm getting a SIGSEV when creating an iso image.
There's nothing unusual in the poudriere build log but the core dump offers the following backtrace:

(lldb) target create "/usr/local/bin/dvdstyler" --core "./dvdstyler.core"
Core file '/home/alan/dvdstyler.core' (x86_64) was loaded.
(lldb) bt
* thread #1, name = 'dvdstyler', stop reason = signal SIGSEGV
  * frame #0: 0x00000008035d9c45 libc.so.7`memset + 213
    frame #1: 0x00000000002cfade dvdstyler`___lldb_unnamed_symbol3150 + 414
    frame #2: 0x00000000002cef73 dvdstyler`___lldb_unnamed_symbol3148 + 419
    frame #3: 0x0000000000449fd9 dvdstyler`___lldb_unnamed_symbol5019 + 2793
    frame #4: 0x000000000044937c dvdstyler`___lldb_unnamed_symbol5018 + 1372
    frame #5: 0x0000000000406096 dvdstyler`___lldb_unnamed_symbol4654 + 5894
    frame #6: 0x00000000004048d6 dvdstyler`___lldb_unnamed_symbol4653 + 150
    frame #7: 0x00000000004342c4 dvdstyler`___lldb_unnamed_symbol4864 + 2228
    frame #8: 0x00000008011b4d6f libwx_baseu-3.2.so.0`wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 479
    frame #9: 0x00000008011b626d libwx_baseu-3.2.so.0`wxEvtHandler::ProcessEventLocally(wxEvent&) + 93
    frame #10: 0x00000008011b6100 libwx_baseu-3.2.so.0`wxEvtHandler::ProcessEvent(wxEvent&) + 96
    frame #11: 0x0000000800de0ead libwx_gtk3u_core-3.2.so.0`wxWindowBase::TryAfter(wxEvent&) + 221
    frame #12: 0x00000008011b67ec libwx_baseu-3.2.so.0`wxEvtHandler::SafelyProcessEvent(wxEvent&) + 12
    frame #13: 0x0000000800dc9d70 libwx_gtk3u_core-3.2.so.0`wxToolBarBase::OnLeftClick(int, bool) + 144
    frame #14: 0x0000000804708465 libgobject-2.0.so.0`___lldb_unnamed_symbol880 + 309
    frame #15: 0x00000008047206bb libgobject-2.0.so.0`g_signal_emit_valist + 1195
    frame #16: 0x00000008047212e1 libgobject-2.0.so.0`g_signal_emit_by_name + 433
    frame #17: 0x0000000804708465 libgobject-2.0.so.0`___lldb_unnamed_symbol880 + 309
    frame #18: 0x00000008047206bb libgobject-2.0.so.0`g_signal_emit_valist + 1195
    frame #19: 0x0000000804721116 libgobject-2.0.so.0`g_signal_emit + 134
    frame #20: 0x0000000803f40e7e libgtk-3.so.0`___lldb_unnamed_symbol11889 + 222
    frame #21: 0x0000000804708465 libgobject-2.0.so.0`___lldb_unnamed_symbol880 + 309
    frame #22: 0x00000008047206bb libgobject-2.0.so.0`g_signal_emit_valist + 1195
    frame #23: 0x0000000804721116 libgobject-2.0.so.0`g_signal_emit + 134
    frame #24: 0x0000000803f41486 libgtk-3.so.0`___lldb_unnamed_symbol11899 + 38
    frame #25: 0x0000000804224394 libgtk-3.so.0`___lldb_unnamed_symbol19852 + 196
    frame #26: 0x0000000804708465 libgobject-2.0.so.0`___lldb_unnamed_symbol880 + 309
    frame #27: 0x00000008047206bb libgobject-2.0.so.0`g_signal_emit_valist + 1195
    frame #28: 0x0000000804721116 libgobject-2.0.so.0`g_signal_emit + 134
    frame #29: 0x000000080401784e libgtk-3.so.0`___lldb_unnamed_symbol14881 + 126
    frame #30: 0x000000080470b7d6 libgobject-2.0.so.0`g_cclosure_marshal_VOID__BOXEDv + 166
    frame #31: 0x0000000804708465 libgobject-2.0.so.0`___lldb_unnamed_symbol880 + 309
    frame #32: 0x00000008047206bb libgobject-2.0.so.0`g_signal_emit_valist + 1195
    frame #33: 0x0000000804721116 libgobject-2.0.so.0`g_signal_emit + 134
    frame #34: 0x000000080401581a libgtk-3.so.0`___lldb_unnamed_symbol14845 + 954
    frame #35: 0x000000080401935f libgtk-3.so.0`___lldb_unnamed_symbol14907 + 431
    frame #36: 0x0000000803fd96ea libgtk-3.so.0`gtk_event_controller_handle_event + 154
    frame #37: 0x00000008041cb7cc libgtk-3.so.0`___lldb_unnamed_symbol18911 + 140
    frame #38: 0x000000080421ebea libgtk-3.so.0`___lldb_unnamed_symbol19748 + 170
    frame #39: 0x0000000804708465 libgobject-2.0.so.0`___lldb_unnamed_symbol880 + 309
    frame #40: 0x00000008047206bb libgobject-2.0.so.0`g_signal_emit_valist + 1195
    frame #41: 0x0000000804721116 libgobject-2.0.so.0`g_signal_emit + 134
    frame #42: 0x00000008041cb519 libgtk-3.so.0`___lldb_unnamed_symbol18908 + 601
    frame #43: 0x00000008040678df libgtk-3.so.0`gtk_propagate_event + 255
    frame #44: 0x0000000804067436 libgtk-3.so.0`gtk_main_do_event + 1366
    frame #45: 0x000000080390e9d1 libgdk-3.so.0`___lldb_unnamed_symbol2634 + 49
    frame #46: 0x0000000803944857 libgdk-3.so.0`___lldb_unnamed_symbol3152 + 39
    frame #47: 0x000000080481ad94 libglib-2.0.so.0`g_main_context_dispatch + 372
    frame #48: 0x000000080481b124 libglib-2.0.so.0`___lldb_unnamed_symbol2443 + 548
    frame #49: 0x000000080481b47a libglib-2.0.so.0`g_main_loop_run + 266
    frame #50: 0x0000000804066d6b libgtk-3.so.0`gtk_main + 75
    frame #51: 0x0000000800c303a5 libwx_gtk3u_core-3.2.so.0`wxGUIEventLoop::DoRun() + 37
    frame #52: 0x00000008010d77c7 libwx_baseu-3.2.so.0`wxEventLoopBase::Run() + 183
    frame #53: 0x00000008010a5fa6 libwx_baseu-3.2.so.0`wxAppConsoleBase::MainLoop() + 102
    frame #54: 0x000000080110fb96 libwx_baseu-3.2.so.0`wxEntry(int&, wchar_t**) + 102
    frame #55: 0x000000000043bb55 dvdstyler`___lldb_unnamed_symbol4950 + 53
    frame #56: 0x00000000002c3a30 dvdstyler`___lldb_unnamed_symbol5367 + 256
Comment 8 Daniel Engberg freebsd_committer freebsd_triage 2023-03-19 19:52:12 UTC
No idea what that's about, while I doubt it's a LLVM/Clang issue I guess you could try using GCC (USE_GCC= yes) in (ports) makefile just to confirm. If you also build with DEBUG enabled you'll also get symbols.

Perhaps easier to test first and since you're on  FFmpeg 4.x, does the current version of dvdstyler in tree crash (using the new version of wxsvg)?
Comment 9 Daniel Engberg freebsd_committer freebsd_triage 2023-03-21 09:41:51 UTC
Since this doesn't seem to be related to FFmpeg lets exclude it for now and stick with current version in tree...

I'm assuming that current versions of dvdstyler and wxSVG don't crash...

Does 3.3b3 work with wxSVG 1.5.23 ?
Does 3.3b3 work with wxSVG 1.5.24 ?
Does 3.2.1 work with wxSVG 1.5.24 ?
Comment 10 Alan Hicks 2023-03-21 12:12:12 UTC
I've just recompiled on another machine and all combinations of dvdstyler and wxsvg work ok without any errors both with and without debug builds.

I'll recheck at the weekend when I get access to my poudriere machine.
Comment 11 Daniel Engberg freebsd_committer freebsd_triage 2023-03-25 09:53:59 UTC
Sounds great, thanks
Comment 12 Alan Hicks 2023-03-26 10:50:19 UTC
Although the crash is repeatable when creating a DVD,
my c++ debugging foo is lacking the ability to discover why memset is failing.

Also unable to select any frame from a video for the menu.

Process 78346 stopped
* thread #1, name = 'dvdstyler', stop reason = step in
    frame #0: 0x0000000000311df6 dvdstyler`wxFfmpegMediaEncoder::addAudioStream(this=0x00007fffffffa410, codecId=86016) at mediaenc_ffmpeg.cpp:333:10
   330                  return false;
   331          for (int i = 0; i < c->channels; i++) {
   332                  uint16_t *samples = (uint16_t*)m_audioFrame->data[i];
-> 333                  memset(samples, 0, c->frame_size * av_get_bytes_per_sample(c->sample_fmt));
   334          }
   335 
   336          return true;
(lldb) 
Process 78346 stopped
* thread #1, name = 'dvdstyler', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: 0x00000008036a3c45 libc.so.7`memset + 213
libc.so.7`memset:
->  0x8036a3c45 <+213>: rep    stosq    %rax, %es:(%rdi)
    0x8036a3c48 <+216>: movq   %r9, %rax
    0x8036a3c4b <+219>: andl   $0x7, %edx
    0x8036a3c4e <+222>: jne    0x8036a3c51               ; <+225>
(lldb) ^D
Comment 13 Daniel Engberg freebsd_committer freebsd_triage 2023-03-26 11:01:59 UTC
Thanks for looking into it further, this looks like its something you should report to upstream. Just for reference, if it you re-build dvdstyler with USE_GCC=yes in port Makefile do you see the same behaviour?
Comment 14 Alan Hicks 2023-03-26 12:19:35 UTC
Created attachment 241122 [details]
Compiling with gcc12 fails with bad C++ code

Compiling with gcc12 fails with bad C++ code
Comment 15 Alan Hicks 2023-03-27 11:55:54 UTC
Upstream bug created:
Unable to browse menu image or create iso image on FreeBSD
https://sourceforge.net/p/dvdstyler/bugs/728/
Comment 16 Alan Hicks 2023-04-02 17:28:36 UTC
Created attachment 241270 [details]
Patch fixes the crash. Tested and valgrind okay.
Comment 17 Daniel Engberg freebsd_committer freebsd_triage 2023-04-02 19:19:55 UTC
That's great, thanks for looking into it and submitting upstream!
Comment 18 Alan Hicks 2023-04-03 11:52:35 UTC
As this was an interesting bug and I got to learn more about ffmpeg, here is my more detailed write up:
https://p-o.co.uk/tech-articles/debugging-dvdstyler-a-maintainers-point-of-view/
Comment 19 commit-hook freebsd_committer freebsd_triage 2023-04-08 11:48:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=56be636b7f70848199f09c3036c7051690c42965

commit 56be636b7f70848199f09c3036c7051690c42965
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2023-04-08 11:37:55 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2023-04-08 11:40:39 +0000

    multimedia/dvdstyler: Update to 3.3b3

    - Fixes build with FFmpeg 6
    - Additional runtime patch by Alan Hicks (maintainer)

    Changelog:
    https://sourceforge.net/projects/dvdstyler/files/dvdstyler-devel/3.3b3/

    PR:             270223
    Reviewed by:    Alan Hicks <ahicks@p-o.co.uk> (maintainer)
    Tested by:      Alan Hicks <ahicks@p-o.co.uk>

 multimedia/dvdstyler/Makefile                        | 20 +++++++++-----------
 multimedia/dvdstyler/distinfo                        |  6 +++---
 multimedia/dvdstyler/files/patch-configure.ac (gone) | 20 --------------------
 .../files/patch-src_mediaenc__ffmpeg.cpp (new)       | 12 ++++++++++++
 .../files/patch-wxVillaLib-PropDlg.cpp (gone)        | 10 ----------
 multimedia/dvdstyler/pkg-plist                       | 11 ++++++++++-
 6 files changed, 34 insertions(+), 45 deletions(-)
Comment 20 Daniel Engberg freebsd_committer freebsd_triage 2023-04-08 11:50:37 UTC
Thanks for working on this issue and documenting the process.

Best regards,
Daniel