IndexOutOfBound Exception in MatchToSongs also causes null pointer in save songs

Description

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.jthink.songkong.analyse.analyser.AbstractMusicBrainzGroupMatcher.matchSongs(AbstractMusicBrainzGroupMatcher.java:123)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher1.doTask(MusicBrainzSongGroupMatcher1.java:211)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher.call(MusicBrainzSongGroupMatcher.java:446)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher1.call(MusicBrainzSongGroupMatcher1.java:78)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher1.call(MusicBrainzSongGroupMatcher1.java:21)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
25/12/2016 13.14.32:CET:com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher:call:GRAVE: ----MusicBrainzSongGroupMatcher:Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.jthink.songkong.analyse.analyser.AbstractMusicBrainzGroupMatcher.matchSongs(AbstractMusicBrainzGroupMatcher.java:123)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher1.doTask(MusicBrainzSongGroupMatcher1.java:211)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher.call(MusicBrainzSongGroupMatcher.java:446)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher1.call(MusicBrainzSongGroupMatcher1.java:78)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher1.call(MusicBrainzSongGroupMatcher1.java:21)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
25/12/2016 13.14.32:CET:com.jthink.songkong.analyse.general.Errors:addError:GRAVE: Adding Error:Unable to match group to MusicBrainz:G:\News\Wings\London Town:Index: 0, Size: 0
java.lang.Exception
at com.jthink.songkong.analyse.general.Errors.addError(Errors.java:36)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher.call(MusicBrainzSongGroupMatcher.java:475)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher1.call(MusicBrainzSongGroupMatcher1.java:78)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher1.call(MusicBrainzSongGroupMatcher1.java:21)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
25/12/2016 13.14.32:CET:com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher1:doTask:GRAVE: GROUP 2247:G:\News\Wojciech Kilar\Le Roi et l'Oiseau:false:start:1
25/12/2016 13.14.32:CET:com.jthink.songkong.analyse.analyser.SongSaver:handleFailedSaveErrors:GRAVE: Unable to save changes:class java.lang.NullPointerException
java.lang.NullPointerException
at com.jthink.songkong.analyse.analyser.SongSaver.saveSongToFile(SongSaver.java:604)
at com.jthink.songkong.analyse.analyser.SongSaver.saveChanges(SongSaver.java:189)
at com.jthink.songkong.analyse.analyser.SongSaver.call(SongSaver.java:164)
at com.jthink.songkong.analyse.analyser.SongSaver.call(SongSaver.java:58)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
25/12/2016 13.14.32:CET:com.jthink.songkong.analyse.analyser.SongSaver:handleFailedSaveErrors:GRAVE: Unable to save changes:class java.lang.NullPointerException
java.lang.NullPointerException
at com.jthink.songkong.analyse.analyser.SongSaver.saveSongToFile(SongSaver.java:604)
at com.jthink.songkong.analyse.analyser.SongSaver.saveChanges(SongSaver.java:189)
at com.jthink.songkong.analyse.analyser.SongSaver.call(SongSaver.java:164)
at com.jthink.songkong.analyse.analyser.SongSaver.call(SongSaver.java:58)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Environment

None

Status

Assignee

Unassigned

Reporter

Paul Taylor

Labels

None

Forum Username

vincentburgun

os

None

Components

Fix versions

Affects versions

4.4

Priority

Major
Configure