I did my very best to make sure there wasn’t already a bug report on this.
My apologies if it’s a duplicate!
My workmate had a look, and I think he tracked the problem down.
Description from him:
"It appears that labels longer than 260 characters will silently not be
loaded from .aup files on Windows. Direct import from a label file
works as expected. Mac version works as expected. This is problematic
since we’re trying to use label files for transcription.
I traced the bug to how labels are loaded from the .aup files. In
LabelTrack.cpp:2175 LabelTrack::HandleXMLTag() extracts the “title”
attribute from the tag. This method calls
XMLValueChecker::IsGoodString() at line 2192. This is defined in
XMLTagHandler.cpp:42, and simply returns false (with no error message)
if the length of the text is longer than PLATFORM_MAX_PATH (set to 260
At a guess, the aup file originally only contained paths, so this was
sensible. But now that the label tag is there, it sure seems like an
arbitrary length limit with no error message is a bug.
I would suggest changing IsGoodString to not have an arbitrary length
limit and changing calls that actually are file paths from
IsGoodString to IsGoodPathString.
(This is the first time I’ve looked at Audacity source, so I’m not
comfortable doing a pull request myself)."
For now, I have workaround in that I can export the labels and reimport every
time I want to do work, but this is annoying since it should be unnecessary.
It isn’t easy to know what to do here given many users would be exporting files based on label names. I agree silently removing the label when reopening the AUP file is not very friendly.
I would guess only users with high resolution monitors could even read a one-line label in Audacity that is 260 characters long. What is your use case for labels - transcription?
Just to note, Windows 10 does now have a Registry/Group Policy Setting that turns off MAX_PATH. It doesn’t really help the export multiple case because Audacity has not been manifested as “longPathAware”, and even if that was done, the file name part of the path including the extension still has a Windows limit of 255 characters.