threerings / playn

Legacy 1.x version of PlayN library.
http://playn.io/
Apache License 2.0
195 stars 66 forks source link

[bug] invokes toString on an array #84

Closed waooog closed 7 years ago

waooog commented 7 years ago

We find the following bug inside playn/html, the reason of this bug is the code converts an array (the return value of the method soundController.getPreferredSoundTypes() is an array) to a string directly, which will deliver the address of this array not the strings inside the array.

Path: playn/html/src/playn/html/HtmlAudio.java Bug location: soundController.getPreferredSoundTypes() line 61

Code: void init() { HtmlPlatform.log.debug("Preferred sound type(s): " + soundController.getPreferredSoundTypes());

samskivert commented 7 years ago

I'm not sure what the concern is here. It's perfectly valid to convert a JavaScript array to a string. When the above code runs, it generates output like:

DEBUG: Preferred sound type(s): WEB_AUDIO,FLASH,HTML5