jaudiotagger
  1. jaudiotagger
  2. JAUDIOTAGGER-392

NumberFormatException thrown on certain fields

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Ubuntu 10.04 (Lucid)
      Linux lapator 2.6.32-34-generic x86_64 GNU/Linux
      java version "1.6.0_20"
      OpenJDK Runtime Environment (IcedTea6 1.9.9) (6b20-1.9.9-0ubuntu1~10.04.2)
      OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

      Description

      When parsing files with tag fields that are supposed to contain numbers, if a number is too big or a number isn't in the field unsuspecting developers won't watch that exception (java.lang.NumberFormatException).

        Activity

        Hide
        paultaylor added a comment -

        More informatation, exact stack traces would be useful.

        Show
        paultaylor added a comment - More informatation, exact stack traces would be useful.
        Hide
        TemporaryUser-_- added a comment -

        The issue is fairly easy to reproduce. Take any mp3 file, write a number bigger than the system's Integer.MAX_VALUE and let jaudiotagger loose on it.

        Below is my stack trace:
        GRAVE: Brokencyde - Sex Toyz.mp3:An error occurred within abstractID3v2FrameBody for identifier:TRCK:For input string: "99999999999999"
        Exception in thread "main" java.lang.NumberFormatException: For input string: "99999999999999"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:484)
        at java.lang.Integer.parseInt(Integer.java:514)
        at org.jaudiotagger.tag.datatype.PartOfSet$PartOfSetValue.<init>(PartOfSet.java:218)
        at org.jaudiotagger.tag.datatype.PartOfSet.readByteArray(PartOfSet.java:97)
        at org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody.read(AbstractID3v2FrameBody.java:181)
        at org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody.<init>(AbstractID3v2FrameBody.java:81)
        at org.jaudiotagger.tag.id3.framebody.FrameBodyTRCK.<init>(FrameBodyTRCK.java:98)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at org.jaudiotagger.tag.id3.AbstractID3v2Frame.readBody(AbstractID3v2Frame.java:272)
        at org.jaudiotagger.tag.id3.ID3v24Frame.read(ID3v24Frame.java:644)
        at org.jaudiotagger.tag.id3.ID3v24Frame.<init>(ID3v24Frame.java:327)
        at org.jaudiotagger.tag.id3.ID3v24Tag.readFrames(ID3v24Tag.java:900)
        at org.jaudiotagger.tag.id3.ID3v24Tag.read(ID3v24Tag.java:873)
        at org.jaudiotagger.tag.id3.ID3v24Tag.<init>(ID3v24Tag.java:605)
        at org.jaudiotagger.audio.mp3.MP3File.readV2Tag(MP3File.java:208)
        at org.jaudiotagger.audio.mp3.MP3File.<init>(MP3File.java:391)
        at org.jaudiotagger.audio.mp3.MP3FileReader.read(MP3FileReader.java:39)
        at org.jaudiotagger.audio.AudioFileIO.readFile(AudioFileIO.java:286)
        at org.jaudiotagger.audio.AudioFileIO.read(AudioFileIO.java:150)
        at net.sourceforge.deathgorepain.sound.JAudioTaggerTesting.main(JAudioTaggerTesting.java:61)

        Cheers !

        Show
        TemporaryUser-_- added a comment - The issue is fairly easy to reproduce. Take any mp3 file, write a number bigger than the system's Integer.MAX_VALUE and let jaudiotagger loose on it. Below is my stack trace: GRAVE: Brokencyde - Sex Toyz.mp3:An error occurred within abstractID3v2FrameBody for identifier:TRCK:For input string: "99999999999999" Exception in thread "main" java.lang.NumberFormatException: For input string: "99999999999999" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:484) at java.lang.Integer.parseInt(Integer.java:514) at org.jaudiotagger.tag.datatype.PartOfSet$PartOfSetValue.<init>(PartOfSet.java:218) at org.jaudiotagger.tag.datatype.PartOfSet.readByteArray(PartOfSet.java:97) at org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody.read(AbstractID3v2FrameBody.java:181) at org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody.<init>(AbstractID3v2FrameBody.java:81) at org.jaudiotagger.tag.id3.framebody.FrameBodyTRCK.<init>(FrameBodyTRCK.java:98) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at org.jaudiotagger.tag.id3.AbstractID3v2Frame.readBody(AbstractID3v2Frame.java:272) at org.jaudiotagger.tag.id3.ID3v24Frame.read(ID3v24Frame.java:644) at org.jaudiotagger.tag.id3.ID3v24Frame.<init>(ID3v24Frame.java:327) at org.jaudiotagger.tag.id3.ID3v24Tag.readFrames(ID3v24Tag.java:900) at org.jaudiotagger.tag.id3.ID3v24Tag.read(ID3v24Tag.java:873) at org.jaudiotagger.tag.id3.ID3v24Tag.<init>(ID3v24Tag.java:605) at org.jaudiotagger.audio.mp3.MP3File.readV2Tag(MP3File.java:208) at org.jaudiotagger.audio.mp3.MP3File.<init>(MP3File.java:391) at org.jaudiotagger.audio.mp3.MP3FileReader.read(MP3FileReader.java:39) at org.jaudiotagger.audio.AudioFileIO.readFile(AudioFileIO.java:286) at org.jaudiotagger.audio.AudioFileIO.read(AudioFileIO.java:150) at net.sourceforge.deathgorepain.sound.JAudioTaggerTesting.main(JAudioTaggerTesting.java:61) Cheers !
        Show
        paultaylor added a comment - Moved to https://bitbucket.org/ijabz/jaudiotagger/issue/34/numberformatexception-thrown-on-certain

          People

          • Assignee:
            Unassigned
            Reporter:
            TemporaryUser-_-
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: