[X] WAV file cannot be opened for writing

Thank you very much, once again for .wav tag support!

After thoroughly testing v2.76, I found repeated occurrences of this error:

If you open the folder with this file and simply Right click on Test.wav > Extend Tags... > OK :

Test.zip (65.8 KB)

If you figure out the bug, could you release a new Beta with it fixed?

Test.zip (65.8 KB)

I tested it with your file and did not get the message.

See this thread on the "Cannot be opened for writing" message.
Another "file cannot be opened for writing" issue
It should be a problem with your setup.

Very well, thank you for posting that this problem is not universal.

Here's what I did to further test this and this eliminates some previous assumptions about the source of this bug:

First I used this program to add a random tag to the problem .wav file

This somehow changed the file tag - allowing it now be manipulated in Mp3tag 2.76 thereafter.

If this information helps you then great... But I have multiple individual files where this happens but not the others. Once tags on those files are changed by AudioShell program, this enables those files to be manipulated by Mp3tag as well.

Could access rights be an issue? Perhaps the other program reads the files and re-writes them with a different owner? Whereas MP3tag does not rewrite the files as padding is sufficient?
Just an idea.

The thread topic is not universal, but it is not unique either.
Since Mp3tag is the best editor, it would be nice to have it incorporate a workaround.

If you'd like me to test this, you can post how, and I would do it.

But if another program can edit a tag on a .wav file, then Mp3tag should as well.
I suppose whatever the other program does - makes the tag editable in Mp3tag, it makes Mp3tag work with all files on all systems (presumably) so finding out what changes would be a first step...

How would you determine the 'owner'?
And what other suggestions are there as far as what the other program might be doing to the tag to make it readable by Mp3tag?

Okay, this zip file contains Before.wav and After.wav

Edit: see attachment in next post

Find out what is different about them and you will find out why After.wav can be edited in Mp3tag and Before.wav cannot, on some systems.

Actually, this is a better example since both files in it appear to have no tag but Before.wav cannot be edited and After.wav can be:

Before_After.zip (131 KB)

Before_After.zip (131 KB)

Hi there,

thanks for taking the time to report this and providing test data. This is really helpful.

I've analyzed the original file you've sent and want to shed some light in this thread. It's a valid WAV file with a broken ID3v2 tag. This tag contains a title frame, but the size of this frame is reported as being 1128556902 bytes in size – you can do the math :slight_smile:

Edit: It's the same with Before.wav. After.wav has no tags.

If Mp3tag encounters something like this for MP3, it usually reports the tag as "!BAD ID3v2" in the tag column, and I think I'll add something similar for WAV to the next release.

You can remove the tag and write a new and valid one with Mp3tag.

Kind regards
– Florian

Thank you.
Yes, that would be a perfect solution.

Now if a bad tag is there, Mp3tag simply displays an error.
So instead: it would first automatically remove the bad tag and then immediately execute whatever tag action the user tries to implement, without displaying an error. This would be a great solution.

Additional note: I have at least one .wav file which displays the same "cannot be opened for writing" error when I try to get Mp3tag to Remove tag from it.

It is 44MB in size, I cannot attach it because unlike others, as soon as I cut the file down to a few seconds, the problem cannot be replicated in Mp3tag any more.

It can only be replicated on the original 44MB .wav file. I can upload it elsewhere if you'd like, if it's necessary?

Removing the tag then executing the command would work for other files but with this file, it displays the same error for Removing the tag as well as trying to execute a tag command.

So for that one, I am forced to use the other program to remove the tag from it before it can be used in Mp3tag.
Since another program can remove the tag from it, perhaps Mp3tag could be made to as well.

Here is the file, please let me know when you get it so I can remove it.


And separately, I have files from which tags can be removed, yet still display the same error afterwards:


So for this file, you can remove the tag in Mp3tag but you cannot execute a tag command even after you remove tags inside Mp3tag.

Please also let me know when you get this one so I can remove it too.

I've downloaded the files, so you can remove them from your server.

Kind regards
– Florian

There seems to be a pattern.
A wave file that M3tag 2.77 cannot handle under any circumstances can be generated by converting a .flac file to a .wav file using v3.1 of this program: http://www.wav-mp3.com/

You cannot remove tag from it or edit it in any way.

You are forced to use this freeware to assign a random tag,
which then makes the file editable by Mp3tag.
Interestingly, using AudioShell freeware to just remove the tag does not make it editable in Mp3tag.

You have to actually assign a random tag to the wave file which then becomes editable in Mp3tag.

Obviously this is just about finding a reliable way to make wave files which do not work with Mp3tag for test purposes... I hope you can maybe figure out how AudioShell assigns tags to these files so the same approach could be used by Mp3tag for wider compatibility.

I have reproduced this problem by editing a WAV file containing album art with the WAV editor Cool Edit Pro 2.1. Editing the tag in the WAV file with Mp3tag produces the error message "cannot be opened for writing." The tag fields are subsequently displayed as blank by Mp3tag. Editing a copy of the Cool Edit Pro output with Mp3tag reveals that, contrary to the error message, the file IS modified by Mp3tag and differs from the original. The tag fields in the file produced by Mp3tag are still displayed correctly by dpPowerAmp. The file can be fixed by converting it to FLAC and back to WAV with dbPowerAmp. The album art alone exceeds 200k, so there is no way I can upload the file, but I can email it on request (It's just under 4MB and was produced by converting a free MP3 to WAV with dbPowerAmp, so there should be no copyright issues.)

Hi Loren,

I'm interested in having a look at this file. Can you send it to my contact email address?


– Florian

OK, no update here. I'm closing this as "No Bug" as long as there is no new data to reproduce this.

Kind regards
– Florian

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.