checking mp3 stream errors due to file tagging - mp3 diags & mp3val

I seriously doubt Mp3Tag could break a mp3 stream, but the fact is that i usually check my mp3 files before and even after using Mp3Tag and usually the latter does not create corrupted streams, but does not fix them either.

I know both mp3val and MP3 Diags do detect wrong tags, and even mp3 stream frame errors. being MP3 Diags for "Wahnsinnige leute".

So, the first question: Can anyone establish some guidelines on how to use MP3Tag together with mp3val and MP3 Diags, to minimise errors in MP3 files? I mean, do not just say "use/try/check mp3val/MP3 Diags", but HOW to use them. A recommendation on a "custom transformation list" in MP3 Diags, to be used together with MP3 Tag, would be very useful.
A simplified guideline could be sth like 1. save/export all tag info to a file, 2. fix tags with mp3val/MP3 Diags (default 'custom transformation list' in MP3 Diags could do), and 3. recover all tag info from exported file into mp3 streams.

The second one: is it really safe to use mp3val/MP3 Diags? Or shoud we care about the changes they make? I mean, is "garbage" really "garbage"? In other words, can "garbage" sound like music, or just like "garbage"? I'm about to make the acid test on this, but it'd be helpful if someone did it already.

MP3val documentation:
http://mp3val.sourceforge.net/docs/manual.html

First one: hard to say. As the errors is files vary from source to source and expertise that has been applied while ripping them, you have to check the errors anyway one by one.
Some errors cannot be corrected by these 2 tools but have to be remedied with mp3packer...
Some errors cannot be corrected by mp3diags but by mp3val ...
Some errors indicate missing or ambiguous information like duplicate covers or none at all which can better be fixed by MP3tag ...
This depends a lot on where the errors occur. If the stream is broken, then MP3tag can hardly do anything about it. If it has to do with stacked tags and other tag related errors, then MP3tag is probably a good tool.
Have a look at the errors and filter them in MP3diags with the yellow funnel and select only one error at the time and try to get rid of it. It will not be necessary to apply all actions to all files.

Is it safe?
I don't know. A lot of errors can be detected and removed and the file is better afterwards. But sometimes you simply get absolute garbage (not only at the end <_< ) that can do hardly anything about that file. All these tools are no magic wands.
So it boils down to the basic mantra in data processing: backups, backups, backups.

So, my simplified guideline, step 2, would become sth as an endless loop with a switch clause and a break instruction after no error detected?.
I'd like to add the acid test before and after that second step, which should convert mp3 stream into an uncompressed stream (say, PCM?), apply fixes in step 2, and uncompress fixed stream again, comparing "bit by bit" both PCMs. Any objection on the validity of this check?

Not really: i can confirm i have detected tag errors after using Mp3Tag to write tags. Not only Xing header errors, which are more than common; also ID3v2 errors.
The question is not about fixing broken streams, but only tag frames. I know there's no miracle to be done on the former.

Good. Me neither.

Anyway, most of the work is perfectly done by Mp3Tag. Great tool.

Doesn't a re-conversion of an mp3 to a pcm files lead to a loss of quality? Also, wav files (which is the most common pcm file I think) does not support any tags, really.
So what's the idea behind it?

I intend to check wether these tools (MP3 Diags, mp3val) make changes to the files that imply loss of sound data. I do not know of any tool that may check for that. So i intend to make a binary comparison between two files with any lossless compression (or uncompressed).

Anyway, i won't waste much time on that, i was just trying to get some help here on how to get it done. I'm mostly sure that mp3val does no affect the audio content in the MP3, and neither Mp3Diags does.