USB sync carries a damaged device-name row forward; rekordbox 7 crashes when the drive is mounted

Please fill in this bug report template:

Lexicon version: 1.11.15
Operating system (remove one): Mac

Bug description:
My USB drive’s export.pdb ended up with a damaged device-name row (the single row of the table holding the drive name, track count and a date). It was 20 bytes long, cut off inside its date string, with no “1000” version string and no name. Every Lexicon sync copied that row into the new export.pdb unchanged (the log says “carrying device configuration” with deviceName rows: 1), even though Lexicon itself could not read a name from it and fell back to the name in exportLibrary.db.

With that row on the drive, rekordbox 7.2.19 (macOS 27.0) ran fine until the drive was mounted, then crashed within seconds, 15 times in one day. The crash reports show heap corruption, and in most of them rekordbox’s main thread was reading the drive’s device properties:

TE_GetUnicodeStr
TE_InternalRepToDFFI
edb_dyn_GetColumnValue
db::devGetProperty(juce::String&, unsigned char&, unsigned int&)
db::rekordboxDBController::getPropertyInfo(...)
browse::TreeViewer::addDeviceToDeviceRoot(...)

The damage most likely started with a rename of the drive in rekordbox. When I tried that again, rekordbox wrote its new device-name row with two extra bytes after the first two, shifting every later field, so the original fault looks like rekordbox’s. But Lexicon then wrote the damaged row back on every sync, so the drive never recovered.

Replacing the row by hand with the row Lexicon writes for a new drive (version “1000”, the name “PVMUSIC”, zero-padded to 40 bytes) stopped the crashes, and that row now survives Lexicon syncs with its track count updated.

Expected: when the drive’s existing device-name row cannot be read, the sync writes a fresh one, as it does for a new drive, instead of carrying the damaged row forward.

Possibly related: the device-name rows Lexicon writes when it sets a name are not padded to a multiple of 4 bytes. The rekordbox rename that went wrong was appending after such a row (38 bytes).

Step by step to reproduce:

  1. Sync to a fresh USB drive from Lexicon.
  2. In rekordbox 7, select the drive and change its Device Name, then quit rekordbox. In my case the name did not take, and the row was left damaged.
  3. Sync to the drive again from Lexicon.
  4. Result: the damaged device-name row is in the new export.pdb unchanged, and rekordbox crashes when the drive is mounted. Expected: a valid device-name row.

Screenshot:

None; the crash stack above is from the macOS crash reports.

Thanks, looking into that for the next update