Wav Deleting Info tag reading size as BigEndian instead of littleEndian
Hi. I'm working on a music application and I use jaudiotagger. I really appreciate your work. I'm trying to read/write information of wav files as this:
File file = new File(path);
WavFileReader wfr = new WavFileReader();
AudioFile audioFile = wfr.read(file);
WavTag tag = (WavTag) audioFile.getTag();
But the program freezes at the wfr.read() method. Am I doing it right? Do you have the same problem? I tried retrieving th AudioFile with AudioFileIO.read() but the result is the same. Thanks in advance
Comments (17)
-
repo owner -
reporter Version 2.2.4 on OS X 10.10.5 (Yosemite), working on Eclipse Mars 4.5.0
-
repo owner Please try building the latest source, if it still fails email support@jthink.net the file so I can test it
-
repo owner Ah, you shouldn't use wfr.read(file) try AudioFileIO.read(file) instead
-
reporter I changed the wav file to test with and using AudioFileIO.read() i get this:
oct 07, 2015 5:41:30 PM org.jaudiotagger.audio.wav.WavTagWriter write INFORMACIÓN: Writing tag to file oct 07, 2015 5:41:30 PM org.jaudiotagger.audio.generic.AudioFileWriter write GRAVE: Cannot make changes to file /Users/Octavio/Test/testeable.wav because null java.lang.IllegalArgumentException at sun.nio.ch.FileChannelImpl.position(FileChannelImpl.java:277) at org.jaudiotagger.audio.wav.WavTagWriter.deleteTagChunk(WavTagWriter.java:298) at org.jaudiotagger.audio.wav.WavTagWriter.deleteInfoTagChunk(WavTagWriter.java:257) at org.jaudiotagger.audio.wav.WavTagWriter.saveBoth(WavTagWriter.java:724) at org.jaudiotagger.audio.wav.WavTagWriter.write(WavTagWriter.java:332) at org.jaudiotagger.audio.wav.WavFileWriter.writeTag(WavFileWriter.java:37) at org.jaudiotagger.audio.generic.AudioFileWriter.write(AudioFileWriter.java:432) at org.jaudiotagger.audio.AudioFileIO.writeFile(AudioFileIO.java:483) at org.jaudiotagger.audio.AudioFileIO.write(AudioFileIO.java:212) at org.jaudiotagger.audio.AudioFile.commit(AudioFile.java:123) at tests.unit.WavParserTest.id3TagFile(WavParserTest.java:155) at tests.unit.WavParserTest.wavId3TagTest(WavParserTest.java:73)
-
repo owner Are you using the latest source compiling from scratch, or still using 2.2.4
-
reporter I've just test it with the current source code and I have this trace:
oct 07, 2015 8:05:23 PM org.jaudiotagger.audio.wav.WavInfoReader readChunk INFORMACIÓN: Reading Chunk:fmt :starting at:12:sizeIncHeader:24 oct 07, 2015 8:05:23 PM org.jaudiotagger.audio.wav.WavInfoReader readChunk INFORMACIÓN: Reading Chunk:LIST:starting at:36:sizeIncHeader:22150 oct 07, 2015 8:05:23 PM org.jaudiotagger.audio.wav.WavInfoReader readChunk INFORMACIÓN: Reading Chunk:data:starting at:22186:sizeIncHeader:38806684 oct 07, 2015 8:05:23 PM org.jaudiotagger.audio.wav.WavTagWriter write INFORMACIÓN: Writing tag to file oct 07, 2015 8:05:23 PM org.jaudiotagger.tag.datatype.AbstractString getTextEncodingCharSet GRAVE: text encoding:0 charset:ISO-8859-1 oct 07, 2015 8:05:23 PM org.jaudiotagger.tag.datatype.AbstractString getTextEncodingCharSet GRAVE: text encoding:0 charset:ISO-8859-1 oct 07, 2015 8:05:23 PM org.jaudiotagger.tag.datatype.AbstractString getTextEncodingCharSet GRAVE: text encoding:0 charset:ISO-8859-1 oct 07, 2015 8:05:23 PM org.jaudiotagger.tag.datatype.AbstractString getTextEncodingCharSet GRAVE: text encoding:0 charset:ISO-8859-1 oct 07, 2015 8:05:23 PM org.jaudiotagger.tag.datatype.AbstractString getTextEncodingCharSet GRAVE: text encoding:0 charset:ISO-8859-1 oct 07, 2015 8:05:23 PM org.jaudiotagger.tag.datatype.AbstractString getTextEncodingCharSet GRAVE: text encoding:0 charset:ISO-8859-1 oct 07, 2015 8:05:23 PM org.jaudiotagger.tag.datatype.AbstractString getTextEncodingCharSet GRAVE: text encoding:0 charset:ISO-8859-1 oct 07, 2015 8:05:23 PM org.jaudiotagger.tag.datatype.AbstractString getTextEncodingCharSet GRAVE: text encoding:0 charset:ISO-8859-1 oct 07, 2015 8:05:23 PM org.jaudiotagger.tag.datatype.AbstractString getTextEncodingCharSet GRAVE: text encoding:0 charset:ISO-8859-1 oct 07, 2015 8:05:23 PM org.jaudiotagger.tag.datatype.AbstractString getTextEncodingCharSet GRAVE: text encoding:0 charset:ISO-8859-1 oct 07, 2015 8:05:23 PM org.jaudiotagger.audio.generic.AudioFileWriter write GRAVE: Cannot make changes to file /Users/Octavio/Test/testeable.wav because null java.lang.IllegalArgumentException at sun.nio.ch.FileChannelImpl.position(FileChannelImpl.java:277) at org.jaudiotagger.audio.wav.WavTagWriter.deleteTagChunk(WavTagWriter.java:298) at org.jaudiotagger.audio.wav.WavTagWriter.deleteInfoTagChunk(WavTagWriter.java:257) at org.jaudiotagger.audio.wav.WavTagWriter.saveBoth(WavTagWriter.java:724) at org.jaudiotagger.audio.wav.WavTagWriter.write(WavTagWriter.java:332) at org.jaudiotagger.audio.wav.WavFileWriter.writeTag(WavFileWriter.java:37) at org.jaudiotagger.audio.generic.AudioFileWriter.write(AudioFileWriter.java:432) at org.jaudiotagger.audio.AudioFileIO.writeFile(AudioFileIO.java:483) at org.jaudiotagger.audio.AudioFileIO.write(AudioFileIO.java:212) at org.jaudiotagger.audio.AudioFile.commit(AudioFile.java:123) at tests.unit.WavParserTest.id3TagFile(WavParserTest.java:154) at tests.unit.WavParserTest.wavId3TagTest(WavParserTest.java:72)
-
repo owner - changed title to Wav Deleting Info tag that is not at end of file is failing with IllegalArgumentException
Renamed issue to reflect the current problem
-
repo owner Thankyou I have replicated this issue, there seems to be a problem with deleting exisiting INFO chunk when it is not at the end of the file.
-
repo owner - changed title to Wav Deleting Info tag reading size as BigEndian instead of littleEndian
- marked as blocker
-
repo owner - changed status to resolved
Fixed, when try and deleting existing tag we were incorrectly reading INFO/ID3 chunk header size as BigEndian instead of LittleEndian
-
reporter Very great work. Now it works fine, thank you!
-
reporter One last question. Until the 2.2.5 master version is released, I can build the project to a jar, but how can I modify the logger level to not to see the ones generated by
jaudiotagger
? I get dozens oforg.jaudiotagger.tag.datatype
log lines, mostly of typeSEVERE:text encoding:0 charset:ISO-8859-1
ingetTextEncodingCharSet
-
repo owner oh I should reduce that logging i'll do tomorrow. But it uses standard logging, you can adjust using a logging.properties file
-
repo owner Logging removed
-
reporter Hi again. I know now how to adjust the logging level by the logging.properties, but i wnt to report that i get several
org.jaudiotagger.tag.id3
log lines per file, likeWARNING:Problem reading datatype within Frame Body:Unable to find null terminated string
inread
SEVERE: [filename] :An error occurred within abstractID3v2FrameBody for identifier:COMM:Unable to find null terminated string
inreadBody
WARNING: [filename] :Corrupt Frame:Unable to find null terminated string
inreadFrames
but the program does not crash or something. jaudiotagger works good but it shows those logs.
-
repo owner These messages are nothing to do with this issue, but certainly the first one is already fixed in the latest source, it was due to jaudiotagger not recognising the null padding
- Log in to comment
What version of jaudiotagger and what OS, should work as expected.