projectM-visualizer / projectM-visualizer/projectm

[DEV BUG] Preset playlist parser stops when it contains random/cyrillic characters

Open
#962 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #966 by @kstauch — closed without merging
bug triage
Dominant language
C++
Stars
4.5k
Forks
485
Avg merge
3d 7h
Merged PRs (30d)
5

Description

Please confirm the following points:
  • This report is NOT about the Android apps in the Play Store
  • I have searched the project page to check if the issue was already reported
Affected Project

libprojectM (including the playlist library)

Affected Version

4.0+ (currently using 4.1.6)

Operating Systems and Architectures

Windows (x64)

Build Tools

No response

Additional Project, OS and Toolset Details

No response

Type of Defect

Specific bug in projectM code (please link the code in question)

Log Output

Describe the Issue

The playlist parser intentionally stops then it parses a file name with random/cyrillic characters (В, £, � and so on).
That means it only parses the first ones except the malformed file names to the end of the list in every directory.

Affected presets:

  • Daft Sex - $o £ong.milk
  • PowerMilk + Ech0 - Вown to the trip b.milk
  • Xiaolan233 - �.milk
  • ⚠ jnob - heat capacity ⏞ melting point⏞
  • etc.

A workaround for (maybe) only Windows builds are:

  • Create a temporary string variable and set UTF-8 locale with imbue
  • Implement a trick that skips BOM (byte order mark) if it detects
  • Convert it to wide string
  • Parse the preset file with the temporary wide string
    I have no idea about the another solution.

I don't know if this affects on other operating systems (Linux, MacOS, Android etc.).

EDIT: Forgot to send the code what it broke, so I think it's likely because of this: https://github.com/projectM-visualizer/projectm/blob/master/src/playlist/Playlist.cpp, else it's because of the - code elsewhere.

EDIT 2: OS I'm using: Windows 11 Pro
Display language or locale: Romania

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/playlist/Playlist.cpp, the file linked in the report, and reproduce the parser failure on Windows using the listed preset filenames containing Cyrillic, symbols, or malformed characters. Confirm that parsing continues through the complete directory and that the affected presets are recognized instead of stopping at the first malformed name.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.