Forums: 

Currently I'm trying to learn the SDK. While I was messing up with local file identification, found a bug in GNSDK.

Calling 

gnMusicIdFile.doLibraryId( GnMusicIdFileResponseType.kResponseAlbums );

by itself results in this fatal error :

    Process: com.emrahgunduz.anothermusicplayer, PID: 1244
    java.lang.NoClassDefFoundError: com/gracenote/gnsdk/GnError
            at com.gracenote.gnsdk.gnsdk_javaJNI.SwigDirector_IGnMusicIdFileEventsProxyL_musicIdFileComplete(gnsdk_javaJNI.java:1223)
            at com.gracenote.gnsdk.gnsdk_javaJNI.GnMusicIdFile_doLibraryId(Native Method)
            at com.gracenote.gnsdk.GnMusicIdFile.doLibraryId(GnMusicIdFile.java:92)
            at com.emrahgunduz.AppBase.Gracenote.Gracenote.FingerprintSong(Gracenote.java:183)
            at com.emrahgunduz.UI.Adapters.AdapterSong$4.run(AdapterSong.java:335)
            at java.lang.Thread.run(Thread.java:841)
     Caused by: java.lang.IllegalArgumentException
            at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:63)
            at com.emrahgunduz.AppBase.Gracenote.Gracenote$GNMusicIDFileEvents.gatherMetadata(Gracenote.java:298)
            at com.gracenote.gnsdk.IGnMusicIdFileEventsProxyU.gatherMetadata(IGnMusicIdFileEventsProxyU.java:28)
            at com.gracenote.gnsdk.gnsdk_javaJNI.SwigDirector_IGnMusicIdFileEventsProxyL_gatherMetadata(gnsdk_javaJNI.java:1211)
            at com.gracenote.gnsdk.gnsdk_javaJNI.GnMusicIdFile_doLibraryId(Native Method)
            at com.gracenote.gnsdk.GnMusicIdFile.doLibraryId(GnMusicIdFile.java:92)
            at com.emrahgunduz.AppBase.Gracenote.Gracenote.FingerprintSong(Gracenote.java:183)
            at com.emrahgunduz.UI.Adapters.AdapterSong$4.run(AdapterSong.java:335)
            at java.lang.Thread.run(Thread.java:841)

It seems that GNError is not accessible from the C method. I believe this should be calling IGnMusicIdFileEvents > musicIdFileComplete with the GNError  that was supposed to be created?

Generating any exception on IGnMusicIdFileEvents > gatherMetadata causes the fatal error to surface. For example set a string for trackNumber (which requires a long), by simply adding a string to parser, something like Long.parseLong( "Something" ). And let it throw an exception. Right after the exception, calling doLibraryId results in GNError crash in native method.

 

Thanks so much for this detailed report. We are investigating the matter, and will update you as soon as we have an answer.

Forum Discussions