mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.38k stars 1.26k forks source link

Engine prime export fails #13480

Open merspieler opened 1 month ago

merspieler commented 1 month ago

Bug Description

When I try to export my library to engine prime, I get this error:

Export failed Overview waveform data has less than the minimum length of 27 bytes

It does NOT tell me which file that is (so I could try to fix this) This happens after I had the stick connected to an SC Live 4 with EngineOS 4.0.0 and tried to load new music onto it.

Version

2.4.0

OS

NixOS 24.05

JoergAtGithub commented 1 month ago

@mr-smidge Can you help here?

merspieler commented 1 month ago

Another thing I just noticed now... after this issue I "fixed" it by directly exporting to the USB stick after removing the m.db file so it does a fresh export. Before I did create it by exporting to some directory and then rsyncing that to the stick. But now, with the direct export, file names which contain for example german umlaute ö, ä etc or spanish ñ are shown on denon gear as missing. I checked with the backup I've got... the files are named identically but in one case the file is found and in the other not (it also doesn't show up on the folder browse tab on engineOS)

mr-smidge commented 1 month ago

Looks like the code will write the details of which file failed to export in the log, but not in the message that appears in the dialog box. This could be easily tweaked:

        qInfo() << "Exporting track" << m_pLastLoadedTrack->getId().toString()
                << "at" << m_pLastLoadedTrack->getFileInfo().location() << "...";
        try {
            exportTrack(m_pRequest,
                    pDb.get(),
                    dbVersion,
                    &mixxxToEnginePrimeTrackIdMap,
                    m_pLastLoadedTrack,
                    m_pLastLoadedWaveform.get());
        } catch (std::exception& e) {
            qWarning() << "Failed to export track"
                       << m_pLastLoadedTrack->getId().toString() << ":"
                       << e.what();
            m_lastErrorMessage = e.what();  // HERE: message from the exception lacks context of which track!
            emit failed(m_lastErrorMessage);
            return;
        }

Regarding the actual error, some file in the existing collection has its overview waveform data stored in a way that the software doesn't expect (namely, being non-empty but less than 27 bytes in size). It would indeed be helpful to know which one!

mr-smidge commented 1 month ago

I've also raised https://github.com/xsco/libdjinterop/issues/125 to improve the clarity of error messages in libdjinterop.

merspieler commented 1 month ago

Another thing I just noticed now... after this issue I "fixed" it by directly exporting to the USB stick after removing the m.db file so it does a fresh export. Before I did create it by exporting to some directory and then rsyncing that to the stick. But now, with the direct export, file names which contain for example german umlaute ö, ä etc or spanish ñ are shown on denon gear as missing. I checked with the backup I've got... the files are named identically but in one case the file is found and in the other not (it also doesn't show up on the folder browse tab on engineOS)

Turns out, by backup stick which had working special characters was had an MBR partition table, the one which failed had GPT, reformating it with MBR worked at least for this issue (so ig an engineOS side issue)

mr-smidge commented 1 month ago

Raised a super-small PR to improve the error message shown to the user if a track fails to export to Engine: https://github.com/mixxxdj/mixxx/pull/13524

The PR is set to merge into main, but it can be back-ported to 2.4... not sure what the branching etiquette is here.