View Issue Details

IDProjectCategoryView StatusLast Update
0001685OpenMPTlibopenmptpublic2023-03-31 16:07
ReporterKingWolf Assigned To 
PrioritynormalSeveritymajorReproducibilityrandom
Status closedResolutionno change required 
Platformx86OSWindowsOS Version10
Product VersionOpenMPT 1.30.11.00 / libopenmpt 0.6.9 (upgrade first) 
Summary0001685: openmpt_module_select_subsong() randomly kills playback?
Description

hey all, I'm noticing an issue with openmpt_module_select_subsong(). it will randomly stop playback rather than switch to the requested song. The function will return 1(true) but playback will stop. Calling the function again will operate normally. I am calling this function via p/invoke in a c# wrapper.

Steps To Reproduce
  • Load module,
  • Start a read loop with openmpt_module_read_interleaved_stereo,
  • While it is playing, call openmpt_module_select_subsong() with different (or the same) song indexes multiple times.
Additional Information

If needed, demo with repo: https://github.com/TheKingEagle/rmsft.mptWrapper

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

Activities

Saga Musix

Saga Musix

2023-03-31 13:48

administrator   ~0005637

From my understanding of your sample code, the module is rendered in one thread while subsong manipulation happens in another thread. This can only work if you guard the libopenmpt calls with a mutex. Only one thread may modify the module state at a time, otherwise inconsistent state changes may happen as you observed.

KingWolf

KingWolf

2023-03-31 14:12

reporter   ~0005638

Last edited: 2023-03-31 14:13

I've updated the sample, which did seem to fix things, thanks so much! Sorry about the issue posted here

(I don't know how to close it out lol)

Issue History

Date Modified Username Field Change
2023-03-31 13:31 KingWolf New Issue
2023-03-31 13:48 Saga Musix Note Added: 0005637
2023-03-31 14:12 KingWolf Note Added: 0005638
2023-03-31 14:13 KingWolf Note Edited: 0005638
2023-03-31 14:13 KingWolf Note Edited: 0005638
2023-03-31 16:07 Saga Musix Status new => closed
2023-03-31 16:07 Saga Musix Resolution open => no change required