Audacity 4.0.1 Windows: Save As fails with sampleblocks.blockid constraint

Hello Audacity support team,

Since switching to Audacity 4, I have experienced intermittent failures when saving projects on Windows. I have hundreds of projects in the same locations and previously used these folders without this intermittent problem. The issue persists after updating to Audacity 4.0.1, build 262721353.

The error message suggests that drive D: is not writable or the disk is full, but the logs show a database constraint error.

On 6 October 2026 at 20:12:44, using Audacity 4.0.1, “Save As” from Bez nazvu2.aup4 to Bez nazvu2b.aup4 failed with:

SQLite error (1555):
UNIQUE constraint failed: sampleblocks.blockid

INSERT INTO outbound.sampleblocks
(blockid, sampleformat, summin, summax, sumrms,
 summary256, summary64k, samples)
SELECT blockid, sampleformat, summin, summax, sumrms,
       summary256, summary64k, samples
FROM main.sampleblocks WHERE blockid = ?;

ErrorCode: 19
LastError: Failed to update the project file.
LibraryError: UNIQUE constraint failed: sampleblocks.blockid

The destination was:

D:/zvuk LD vychozi/LD/divotvorny mec/2026/Bez nazvu2b.aup4

This path contains no accented characters. Audacity then displayed:

Audacity failed to write to a file.
Perhaps D: is not writable or the disk is full.

An earlier session using 4.0.0, build 262451524, recorded the same constraint error at 19:54:43 when saving to KM1a2a3_6.10.aup4 in the same folder.

Other 4.0.0 sessions also recorded:

  • Corrupted accented characters in project paths, followed by “file does not exist” or “unable to open database file”.
  • Failed to create thumbnail, followed by the same generic warning about drive D:.

I also encountered a Windows save dialog stating that I did not have permission to save to C:\KM123zmenaB.aup4. I understand that this may be a separate issue from the database failures on D:.

Could you please advise whether the sampleblocks.blockid conflict is a known issue that remains in 4.0.1, and whether there is a fix or a reliable workaround that preserves the project’s tracks and edits?

I can provide the full logs and, if needed, a copy of an affected project. Please let me know which files or additional diagnostic information would be most useful.

Thank you for your help.

Thank you. I had to recover the project and continue editing it, so I no longer have the original project in the state where the error occurred.

I am attaching the log that recorded the failed “Save As” operation in Audacity 4.0.1, including the error “UNIQUE constraint failed: sampleblocks.blockid”.

Can this log help you investigate the saving failure?
Audacity_261006_201119.txt (150.6 KB)

@teetow asked for the files in this post … https://forum.audacityteam.org/t/we-want-your-corrupted-projects/154460