View Issue Details

IDProjectCategoryView StatusLast Update
0001857OpenMPTlibopenmptpublic2025-01-14 21:03
ReporterToothless Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product VersionOpenMPT 1.31.13.00 / libopenmpt 0.7.12 (upgrade first) 
Summary0001857: Infinite length reported for a file that VLC handles correctly (.MOD 4-channel Protracker module)
Description

I have this file beyondmy_control.mod - https://cloud.rys.rs/s/HBAqLWF7gr35YSZ

% file beyondmy_control.mod 
beyondmy_control.mod: 4-channel Protracker module sound data Title: "beyond'my control"

libopenmpt reports "infinity" duration from get_duration_seconds(), which seems to be in spec for "too complex pattern data" as per https://lib.openmpt.org/doc/classopenmpt_1_1module.html#a7a9ba10dd86296f1239f74dbc9dd26d1

But VLC correctly gets the duration - 34:32 - so I suppose this library should be able to get it too and there's some other issue?

Steps To Reproduce

The function is called as such from a Python application (user reported it to crash Tauon, the music player, as it was not handling infinity):

            MOD1 = MOD.from_address(
                mpt.openmpt_module_create_from_memory(
                    ctypes.c_char_p(data), ctypes.c_size_t(len(data)), None, None, None))

            nt.length = mpt.openmpt_module_get_duration_seconds(byref(MOD1))
Additional Information

The file is seemingly from 1995, which is older than me...

Downstream PR - https://github.com/Taiko2k/Tauon/pull/1389

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Activities

Saga Musix

Saga Musix

2025-01-14 20:21

administrator   ~0006301

Last edited: 2025-01-14 21:03

VLC uses libmodplug, which cannot compute nested loop lengths correctly. 34:32 is not the correct length of this module - the correct length is about 50 minutes. Since OpenMPT - unlike libmodplug - actually correctly evaluates nested loops, and since this can be very costly on both runtime and memory consumption, a line has to be drawn somewhere when to stop loop evaluation - otherwise tracking every possible loop state will consume gigabytes of memory. This module has 4 extremely long nested loops that exceed the threshold for amount of rows spent in nested loops by a large amount, so libopenmpt stops counting and reports infinity. While it might potentially be possible to relax this limitation in the future, I don't see an easy way right now.

Issue History

Date Modified Username Field Change
2025-01-14 17:16 Toothless New Issue
2025-01-14 17:26 Toothless Additional Information Updated
2025-01-14 20:21 Saga Musix Note Added: 0006301
2025-01-14 20:38 Saga Musix Summary Infinite length reported for a file that VLC handles correctly (.MOD 4-channel Protracker module) => Infinite length reported ~for a file that VLC handles correctly~ (.MOD 4-channel Protracker module)
2025-01-14 20:38 Saga Musix Summary Infinite length reported ~for a file that VLC handles correctly~ (.MOD 4-channel Protracker module) => Infinite length reported for a file that VLC handles correctly (.MOD 4-channel Protracker module)
2025-01-14 21:03 Saga Musix Note Edited: 0006301