jaudiotagger
  1. jaudiotagger
  2. JAUDIOTAGGER-258

Cannot write tags to files whose size is <3 characters

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: 2.0.4
    • Component/s: mp3
    • Labels:
      None
    • Environment:

      Operating System: Linux
      Platform: PC

    • Issuezilla Id:
      258

      Description

      Using JAudiotagger 1.156

      When trying to tag a file named, for ie, 01.mp3, I got this exception :
      Caused by: java.lang.IllegalArgumentException: Prefix string too short
      at java.io.File.createTempFile(File.java:1782)
      at
      org.jaudiotagger.tag.id3.AbstractID3v2Tag.adjustPadding(AbstractID3v2Tag.java:1156)
      at
      org.jaudiotagger.tag.id3.AbstractID3v2Tag.writeBufferToFile(AbstractID3v2Tag.java:1321)
      at org.jaudiotagger.tag.id3.ID3v23Tag.write(ID3v23Tag.java:735)
      at org.jaudiotagger.audio.mp3.MP3File.save(MP3File.java:777)
      at org.jaudiotagger.audio.mp3.MP3File.save(MP3File.java:693)
      at org.jaudiotagger.audio.mp3.MP3File.commit(MP3File.java:705)
      at org.jajuk.services.tags.JAudioTaggerTagImpl.commit(JAudioTaggerTagImpl.java:68)
      at
      org.jajuk.services.tags.JAudioTaggerTagImpl.createTagIfNeeded(JAudioTaggerTagImpl.java:247)
      at
      org.jajuk.services.tags.JAudioTaggerTagImpl.setAlbumName(JAudioTaggerTagImpl.java:194)
      at org.jajuk.services.tags.Tag.setAlbumName(Tag.java:305)

      This looks to be a known bug of JRE. You should probably create longer temporary
      files if that cases...

        Activity

        Hide
        paultaylor added a comment -

        Fixed with test.
        (Only occurred for mp3s, but added tests to cover other formats as well)

        Show
        paultaylor added a comment - Fixed with test. (Only occurred for mp3s, but added tests to cover other formats as well)

          People

          • Assignee:
            paultaylor
            Reporter:
            bflorat
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: