MinimServer Forum
NPE on upgrade to 0.70 - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: Support (/forumdisplay.php?fid=4)
+--- Thread: NPE on upgrade to 0.70 (/showthread.php?tid=559)



NPE on upgrade to 0.70 - bubbleguuum - 11-04-2013 22:24

Hi Simon,

I upgraded from an older version to 0.70 on Windows and got the NPE below which I solved by removing miniserver's data directory to start from scratch.

Quote:$ java -jar minimserver.jar
MinimServer 0.70, Copyright © 2012, 2013 Simon Nash. All rights reserved.
starting MinimServer
java.lang.NullPointerException
at com.minimserver.FileReader.readFileData(FileReader.java:69)
at com.minimserver.Server.readMetadata(Server.java:4037)
at com.minimserver.Server.scanFiles(Server.java:2934)
at com.minimserver.Server.scanFiles(Server.java:3393)
at com.minimserver.Server.scanFiles(Server.java:3393)
at com.minimserver.Server.readFiles(Server.java:2557)
at com.minimserver.Server.doStart(Server.java:1429)
at com.minimserver.Server.start(Server.java:375)
....

To give more context on how it happened, the previous version of minimserver had 3 contentDir like this:
C:\Music\Labels
C:\Music\Lossless
C:\Music\blargh

This was not correct as I had moved these folders to G: and blargh had been deleted, so I changed the list to be

G:\Music\Labels
G:\Music\Lossless

minimserver rescanned the files but failed to launch on NPE above.
My guess is that it is due to the removal of that blargh contentDir =).


RE: NPE on upgrade to 0.70 - simoncn - 11-04-2013 22:53

(11-04-2013 22:24)bubbleguuum Wrote:  Hi Simon,

I upgraded from an older version to 0.70 on Windows and got the NPE below which I solved by removing miniserver's data directory to start from scratch.

$ java -jar minimserver.jar
MinimServer 0.70, Copyright © 2012, 2013 Simon Nash. All rights reserved.
starting MinimServer
java.lang.NullPointerException
at com.minimserver.FileReader.readFileData(FileReader.java:69)
....

Thanks for reporting this.

There's a bug in the code that would cause this to happen if there was an EOFException reading a WAV file or an ADTS file. Does this seem possible?


RE: NPE on upgrade to 0.70 - bubbleguuum - 11-04-2013 23:07

(11-04-2013 22:53)simoncn Wrote:  
(11-04-2013 22:24)bubbleguuum Wrote:  Hi Simon,

I upgraded from an older version to 0.70 on Windows and got the NPE below which I solved by removing miniserver's data directory to start from scratch.

$ java -jar minimserver.jar
MinimServer 0.70, Copyright © 2012, 2013 Simon Nash. All rights reserved.
starting MinimServer
java.lang.NullPointerException
at com.minimserver.FileReader.readFileData(FileReader.java:69)
....

Thanks for reporting this.

There's a bug in the code that would cause this to happen if there was an EOFException reading a WAV file or an ADTS file. Does this seem possible?

Bingo! it was caused by a bogus 0 byte .aac file.


RE: NPE on upgrade to 0.70 - simoncn - 11-04-2013 23:09

(11-04-2013 23:07)bubbleguuum Wrote:  Bingo! it was caused by a bogus 0 byte .aac file.

It will be fixed in 0.71. Many thanks!