Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 1322 - Extremely long files truncated after export and import
Extremely long files truncated after export and import
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Application Core
unspecified
Per OS All
: P4 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-31 08:47 UTC by Paul L
Modified: 2019-06-13 09:21 UTC (History)
3 users (show)

See Also:
Steps To Reproduce:
I generated 24 hours of silence. In fact 11 hours may be enough to demonstrate the problem. Export as .wav. (Have 7GB of disk free first!) Import again. Result is 10 h 28 m 24 s + 9952 samples.
Release Note:
First Git SHA:
Group: 64Bit
Workaround:
Closed: 2019-06-13 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul L 2016-01-31 08:47:33 UTC

    
Comment 1 Paul L 2016-01-31 08:53:41 UTC
The number of samples in a day at 44100 is 0xE3B1A600
But the number of samples in the import is 0x631BA600

So I think that proves some narrowing cast to a 32 bit integer is at fault.

Assuming Windows media player and Properties in Windows explorer are correct, the exported file really is as long as the imported result, so Audacity's error is on the export side.
Comment 2 Paul L 2016-01-31 08:56:04 UTC
Correction, 0xE31BA600 samples in a day.

It really is a difference in just the most significant bit.
Comment 3 Paul L 2016-01-31 09:51:16 UTC
2^31 seconds is 13 hours, 31 minutes, 35 seconds, 34148 samples.  That should be the length at which the problems start.  Would a file of exactly that length export as zero length?
Comment 4 Paul L 2016-01-31 14:22:55 UTC
I think it's in libsndfile code that the high bits are lost when writing out the length in the header.  Is .wav format even designed to accommodate such big sizes?  I don't know.
Comment 5 Paul L 2016-02-03 10:31:48 UTC
Hey look, here's a user who actually tried this.

https://plus.google.com/u/0/116616917459464443989/posts/Qk1DRUGjXyj?cfem=1
Comment 6 Peter Sampson 2019-06-13 09:13:53 UTC
This was fixed for 2.3.2

WAV and AIFF audio files are size limited to a maximum of 4 GB. This is a general restriction and not an Audacity restriction.

In earlier versions of Audacity if you exported a WAV or AIFF file that would exceed those limits the file would be corrupted and truncated and this would happen without warning.

For 2.3.2 we have implemented an error trap to catch this and stop it happening. Now when attempting to export an oversized WAV or AIFF file Audacity will not do this and you will get an error message:
Comment 7 Peter Sampson 2019-06-13 09:21:26 UTC
Documented in the 2.3.2 Manual in the What's New
and here
https://manual.audacityteam.org/man/export_formats_supported_by_audacity.html#wavtime

for all future Manuals