Skip to content

Update StatTree.cpp - #319

Merged
Vollstrecker merged 1 commit into
amule-project:masterfrom
SevC10:patch-1
Feb 24, 2026
Merged

Update StatTree.cpp#319
Vollstrecker merged 1 commit into
amule-project:masterfrom
SevC10:patch-1

Conversation

@SevC10

@SevC10 SevC10 commented Feb 27, 2022

Copy link
Copy Markdown
Contributor

In the statistic tree, if the session ratio is not available, show anyway the total U/D ratio

show the total ratio if the session ratio is not available
@Vollstrecker
Vollstrecker merged commit 287713b into amule-project:master Feb 24, 2026
got3nks added a commit to got3nks/amule that referenced this pull request May 2, 2026
…3nks

mrjimenez flagged on PR amule-project#514 review that these three contributors
were missing from the roster:

* Werner Mahr / Vollstrecker — has merge access on amule-project/amule
  and merges incoming PRs (e.g. amule-project#430, amule-project#385, amule-project#319, amule-project#330, amule-project#286). Goes
  under Maintainers based on that role.
* Pablo Barciela / Sc0w — recent contributor, e.g. wxWidgets 3.2.6
  build fixes, GTK version-check cleanup, dropping gtk1/gtk2 support,
  Chinese translation work. Goes under Developers.
* got3nks — Wayland app_id binding + SNI tray (amule-project#508), macOS UX
  (amule-project#508), libmaxminddb CI fix (amule-project#507), ip2country/upnp/nls/boost
  hard-fail series (amule-project#509/amule-project#511/amule-project#512/amule-project#513), packaging (amule-project#510),
  docs modernize (this PR). Goes under Developers.

Other recent folks may be missing too — those can be added in
follow-up commits as they're identified. mrjimenez explicitly noted
this is the priority subset to not block the rename PR.
mrjimenez pushed a commit that referenced this pull request May 2, 2026
…3nks

mrjimenez flagged on PR #514 review that these three contributors
were missing from the roster:

* Werner Mahr / Vollstrecker — has merge access on amule-project/amule
  and merges incoming PRs (e.g. #430, #385, #319, #330, #286). Goes
  under Maintainers based on that role.
* Pablo Barciela / Sc0w — recent contributor, e.g. wxWidgets 3.2.6
  build fixes, GTK version-check cleanup, dropping gtk1/gtk2 support,
  Chinese translation work. Goes under Developers.
* got3nks — Wayland app_id binding + SNI tray (#508), macOS UX
  (#508), libmaxminddb CI fix (#507), ip2country/upnp/nls/boost
  hard-fail series (#509/#511/#512/#513), packaging (#510),
  docs modernize (this PR). Goes under Developers.

Other recent folks may be missing too — those can be added in
follow-up commits as they're identified. mrjimenez explicitly noted
this is the priority subset to not block the rename PR.
mrjimenez pushed a commit to mrjimenez/amule that referenced this pull request Jul 7, 2026
…CTag + codec fixes (amule-project#319)

* Fix CTag::operator= freeing the wrong union member

CTag holds an owned pointer (wxString* / CMD4Hash* / unsigned char*) in a
union that is only valid for string / hash / blob / bsob tags. operator=
freed that pointer keyed on the *right-hand side*'s type, so assigning a
string tag onto a slot that currently holds an int freed a garbage pointer
(the int's bits reinterpreted), corrupting the heap. std::vector<CTag>::erase()
hits this whenever it shifts a string tag over a non-string one -- observed as
a double free in a wxString destructor when a media tag set ([int length,
int bitrate, string codec]) is re-attached via AddTagUnique.

Free based on THIS tag's current type first (mirroring the destructor), then
copy from rhs (mirroring the copy constructor). Pre-existing since well before
3.0.1; independent of the media-probe change that exposes it.

* Isolate media probing on a dedicated bounded worker thread

ffprobe media-metadata extraction (amule-project#280) ran on the shared CThreadScheduler
alongside hashing and download completion. A slow or hung ffprobe -- readily
reproducible on a headless daemon -- blocked the scheduler, wedging every
download at PS_COMPLETING indefinitely and stalling shutdown.

Move probing onto a dedicated CMediaProbeThread (mirrors CPartFileHashThread),
so a stuck probe can only ever delay other probes, never completions or hashing.

Bound and make each probe killable: the ffprobe invocation is now a native
posix_spawn / CreateProcess child rather than wxExecute. wxExecute's synchronous
path is uncancellable, and its async path couples termination and pipe draining
to the main-thread event loop -- polling it from the worker is a use-after-free.
The child is waited on with a 30s wall-clock timeout and a cancel flag that
EndThread flips at shutdown; on either it is killed (by process group on POSIX,
so wrapper-style ffprobe from snap/flatpak is fully reaped) and the join returns
promptly.

Add a dedicated "Media Probe" (logMediaProbe) debug category; probe tracing
lives there rather than at normal log level.

* Prefer the video track's codec (then audio) in media probing

The probe reported the first stream's codec_name, which for a container whose
first stream is a subtitle or data track (common in mkv: a leading subrip
track) advertised e.g. "subrip" as the file's codec. Query codec_type
alongside codec_name and select the first video track's codec, falling back to
the first audio track's; subtitle / data streams never win.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants