Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception parsing "nan" #547

Closed
hurzl opened this issue May 14, 2014 · 11 comments
Closed

Exception parsing "nan" #547

hurzl opened this issue May 14, 2014 · 11 comments
Assignees

Comments

@hurzl
Copy link
Contributor

hurzl commented May 14, 2014

"nan" is an allowed setting for mixrampdelay in mpd.
http://www.musicpd.org/doc/protocol/ch03s02.html

MPDroid expects a Float

E/AndroidRuntime( 4474): FATAL EXCEPTION: MPDStatusMonitor
E/AndroidRuntime( 4474): Process: com.namelessdev.mpdroid, PID: 4474
E/AndroidRuntime( 4474): java.lang.NumberFormatException: Invalid float: "nan"
E/AndroidRuntime( 4474):        at java.lang.StringToReal.invalidReal(StringToReal.java:63)
E/AndroidRuntime( 4474):        at java.lang.StringToReal.parseFloat(StringToReal.java:310)
E/AndroidRuntime( 4474):        at java.lang.Float.parseFloat(Float.java:300)
E/AndroidRuntime( 4474):        at org.a0z.mpd.MPDStatus.updateStatus(MPDStatus.java:407)
E/AndroidRuntime( 4474):        at org.a0z.mpd.MPD.getStatus(MPD.java:1115)
E/AndroidRuntime( 4474):        at org.a0z.mpd.MPDStatusMonitor.run(MPDStatusMonitor.java:169)
W/ActivityManager( 2282):   Force finishing activity com.namelessdev.mpdroid/.MainMenuActivity
@abarisain
Copy link
Owner

Why are we even parsing that line ? Do we care about it ?

(All float parses should be in try/catch anyway)
Le 14 mai 2014 15:14, "hurzl" notifications@github.com a écrit :

"nan" is an allowed setting for mixrampdelay in mpd.
http://www.musicpd.org/doc/protocol/ch03s02.html

MPDroid expects a Float

E/AndroidRuntime( 4474): FATAL EXCEPTION: MPDStatusMonitor
E/AndroidRuntime( 4474): Process: com.namelessdev.mpdroid, PID: 4474
E/AndroidRuntime( 4474): java.lang.NumberFormatException: Invalid float: "nan"
E/AndroidRuntime( 4474): at java.lang.StringToReal.invalidReal(StringToReal.java:63)
E/AndroidRuntime( 4474): at java.lang.StringToReal.parseFloat(StringToReal.java:310)
E/AndroidRuntime( 4474): at java.lang.Float.parseFloat(Float.java:300)
E/AndroidRuntime( 4474): at org.a0z.mpd.MPDStatus.updateStatus(MPDStatus.java:407)
E/AndroidRuntime( 4474): at org.a0z.mpd.MPD.getStatus(MPD.java:1115)
E/AndroidRuntime( 4474): at org.a0z.mpd.MPDStatusMonitor.run(MPDStatusMonitor.java:169)
W/ActivityManager( 2282): Force finishing activity com.namelessdev.mpdroid/.MainMenuActivity


Reply to this email directly or view it on GitHubhttps://github.com//issues/547
.

@hurzl
Copy link
Contributor Author

hurzl commented May 14, 2014

Because we can (can't we?) ;)

@abarisain
Copy link
Owner

Well obviously we can't correctly :p

@avuton avuton self-assigned this May 14, 2014
@avuton
Copy link
Contributor

avuton commented May 14, 2014

I'll take care of this.

@hurzl
Copy link
Contributor Author

hurzl commented May 14, 2014

We could! It could be a future setting ...

@hurzl
Copy link
Contributor Author

hurzl commented May 14, 2014

Btw. "xfade" doesn't appear if it is zero. So crossfade should be set to zero before getting the status

... ok that's done ... but not for the mixRamp... values

@avuton
Copy link
Contributor

avuton commented May 14, 2014

Crossfade /is/ reset prior to status updating.

@avuton
Copy link
Contributor

avuton commented May 14, 2014

Granted, mixRampDelay doesn't always show during some status updates (this will be fixed soon). Are you saying there are times that mixRampDB doesn't show on the status?

@avuton
Copy link
Contributor

avuton commented May 14, 2014

Also, if you edit your comment, I never get notice that you replied :)

@hurzl
Copy link
Contributor Author

hurzl commented May 14, 2014

Sorry I meant that mixRampXX is not in resetValues

@avuton
Copy link
Contributor

avuton commented May 14, 2014

Yeah, no need to reset mixRampDB everytime, as it's in the status everytime; mixRampDelay on the other hand is fixed in another commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants